Revision 72415b2a libavformat/mpeg.c

View differences:

libavformat/mpeg.c
417 417
    AVStream *st;
418 418
    int len, startcode, i, es_type;
419 419
    enum CodecID codec_id = CODEC_ID_NONE;
420
    enum CodecType type;
420
    enum AVMediaType type;
421 421
    int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
422 422
    uint8_t av_uninit(dvdaudio_substream_type);
423 423

  
......
443 443
    if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){
444 444
        if(es_type == STREAM_TYPE_VIDEO_MPEG1){
445 445
            codec_id = CODEC_ID_MPEG2VIDEO;
446
            type = CODEC_TYPE_VIDEO;
446
            type = AVMEDIA_TYPE_VIDEO;
447 447
        } else if(es_type == STREAM_TYPE_VIDEO_MPEG2){
448 448
            codec_id = CODEC_ID_MPEG2VIDEO;
449
            type = CODEC_TYPE_VIDEO;
449
            type = AVMEDIA_TYPE_VIDEO;
450 450
        } else if(es_type == STREAM_TYPE_AUDIO_MPEG1 ||
451 451
                  es_type == STREAM_TYPE_AUDIO_MPEG2){
452 452
            codec_id = CODEC_ID_MP3;
453
            type = CODEC_TYPE_AUDIO;
453
            type = AVMEDIA_TYPE_AUDIO;
454 454
        } else if(es_type == STREAM_TYPE_AUDIO_AAC){
455 455
            codec_id = CODEC_ID_AAC;
456
            type = CODEC_TYPE_AUDIO;
456
            type = AVMEDIA_TYPE_AUDIO;
457 457
        } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
458 458
            codec_id = CODEC_ID_MPEG4;
459
            type = CODEC_TYPE_VIDEO;
459
            type = AVMEDIA_TYPE_VIDEO;
460 460
        } else if(es_type == STREAM_TYPE_VIDEO_H264){
461 461
            codec_id = CODEC_ID_H264;
462
            type = CODEC_TYPE_VIDEO;
462
            type = AVMEDIA_TYPE_VIDEO;
463 463
        } else if(es_type == STREAM_TYPE_AUDIO_AC3){
464 464
            codec_id = CODEC_ID_AC3;
465
            type = CODEC_TYPE_AUDIO;
465
            type = AVMEDIA_TYPE_AUDIO;
466 466
        } else {
467 467
            goto skip;
468 468
        }
......
475 475
            codec_id = CODEC_ID_CAVS;
476 476
        else
477 477
            codec_id = CODEC_ID_PROBE;
478
        type = CODEC_TYPE_VIDEO;
478
        type = AVMEDIA_TYPE_VIDEO;
479 479
    } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
480
        type = CODEC_TYPE_AUDIO;
480
        type = AVMEDIA_TYPE_AUDIO;
481 481
        codec_id = m->sofdec > 0 ? CODEC_ID_ADPCM_ADX : CODEC_ID_MP2;
482 482
    } else if (startcode >= 0x80 && startcode <= 0x87) {
483
        type = CODEC_TYPE_AUDIO;
483
        type = AVMEDIA_TYPE_AUDIO;
484 484
        codec_id = CODEC_ID_AC3;
485 485
    } else if (  ( startcode >= 0x88 && startcode <= 0x8f)
486 486
               ||( startcode >= 0x98 && startcode <= 0x9f)) {
487 487
        /* 0x90 - 0x97 is reserved for SDDS in DVD specs */
488
        type = CODEC_TYPE_AUDIO;
488
        type = AVMEDIA_TYPE_AUDIO;
489 489
        codec_id = CODEC_ID_DTS;
490 490
    } else if (startcode >= 0xa0 && startcode <= 0xaf) {
491
        type = CODEC_TYPE_AUDIO;
491
        type = AVMEDIA_TYPE_AUDIO;
492 492
        /* 16 bit form will be handled as CODEC_ID_PCM_S16BE */
493 493
        codec_id = CODEC_ID_PCM_DVD;
494 494
    } else if (startcode >= 0xb0 && startcode <= 0xbf) {
495
        type = CODEC_TYPE_AUDIO;
495
        type = AVMEDIA_TYPE_AUDIO;
496 496
        codec_id = CODEC_ID_TRUEHD;
497 497
    } else if (startcode >= 0xc0 && startcode <= 0xcf) {
498 498
        /* Used for both AC-3 and E-AC-3 in EVOB files */
499
        type = CODEC_TYPE_AUDIO;
499
        type = AVMEDIA_TYPE_AUDIO;
500 500
        codec_id = CODEC_ID_AC3;
501 501
    } else if (startcode >= 0x20 && startcode <= 0x3f) {
502
        type = CODEC_TYPE_SUBTITLE;
502
        type = AVMEDIA_TYPE_SUBTITLE;
503 503
        codec_id = CODEC_ID_DVD_SUBTITLE;
504 504
    } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
505
        type = CODEC_TYPE_VIDEO;
505
        type = AVMEDIA_TYPE_VIDEO;
506 506
        codec_id = CODEC_ID_VC1;
507 507
    } else if (startcode == 0x1bd) {
508 508
        // check dvd audio substream type
509
        type = CODEC_TYPE_AUDIO;
509
        type = AVMEDIA_TYPE_AUDIO;
510 510
        switch(dvdaudio_substream_type & 0xe0) {
511 511
        case 0xa0:  codec_id = CODEC_ID_PCM_DVD;
512 512
                    break;

Also available in: Unified diff