Revision 72415b2a libavformat/mpegts.c

View differences:

libavformat/mpegts.c
486 486

  
487 487
typedef struct {
488 488
    uint32_t stream_type;
489
    enum CodecType codec_type;
489
    enum AVMediaType codec_type;
490 490
    enum CodecID codec_id;
491 491
} StreamType;
492 492

  
493 493
static const StreamType ISO_types[] = {
494
    { 0x01, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
495
    { 0x02, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
496
    { 0x03, CODEC_TYPE_AUDIO,        CODEC_ID_MP3 },
497
    { 0x04, CODEC_TYPE_AUDIO,        CODEC_ID_MP3 },
498
    { 0x0f, CODEC_TYPE_AUDIO,        CODEC_ID_AAC },
499
    { 0x10, CODEC_TYPE_VIDEO,      CODEC_ID_MPEG4 },
500
    { 0x11, CODEC_TYPE_AUDIO,        CODEC_ID_AAC }, /* LATM syntax */
501
    { 0x1b, CODEC_TYPE_VIDEO,       CODEC_ID_H264 },
502
    { 0xd1, CODEC_TYPE_VIDEO,      CODEC_ID_DIRAC },
503
    { 0xea, CODEC_TYPE_VIDEO,        CODEC_ID_VC1 },
494
    { 0x01, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
495
    { 0x02, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
496
    { 0x03, AVMEDIA_TYPE_AUDIO,        CODEC_ID_MP3 },
497
    { 0x04, AVMEDIA_TYPE_AUDIO,        CODEC_ID_MP3 },
498
    { 0x0f, AVMEDIA_TYPE_AUDIO,        CODEC_ID_AAC },
499
    { 0x10, AVMEDIA_TYPE_VIDEO,      CODEC_ID_MPEG4 },
500
    { 0x11, AVMEDIA_TYPE_AUDIO,        CODEC_ID_AAC }, /* LATM syntax */
501
    { 0x1b, AVMEDIA_TYPE_VIDEO,       CODEC_ID_H264 },
502
    { 0xd1, AVMEDIA_TYPE_VIDEO,      CODEC_ID_DIRAC },
503
    { 0xea, AVMEDIA_TYPE_VIDEO,        CODEC_ID_VC1 },
504 504
    { 0 },
505 505
};
506 506

  
507 507
static const StreamType HDMV_types[] = {
508
    { 0x80, CODEC_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },
509
    { 0x81, CODEC_TYPE_AUDIO, CODEC_ID_AC3 },
510
    { 0x82, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
511
    { 0x83, CODEC_TYPE_AUDIO, CODEC_ID_TRUEHD },
512
    { 0x84, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 },
513
    { 0x90, CODEC_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
508
    { 0x80, AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },
509
    { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
510
    { 0x82, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
511
    { 0x83, AVMEDIA_TYPE_AUDIO, CODEC_ID_TRUEHD },
512
    { 0x84, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 },
513
    { 0x90, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
514 514
    { 0 },
515 515
};
516 516

  
517 517
/* ATSC ? */
518 518
static const StreamType MISC_types[] = {
519
    { 0x81, CODEC_TYPE_AUDIO,   CODEC_ID_AC3 },
520
    { 0x8a, CODEC_TYPE_AUDIO,   CODEC_ID_DTS },
519
    { 0x81, AVMEDIA_TYPE_AUDIO,   CODEC_ID_AC3 },
520
    { 0x8a, AVMEDIA_TYPE_AUDIO,   CODEC_ID_DTS },
521 521
    { 0 },
522 522
};
523 523

  
524 524
static const StreamType REGD_types[] = {
525
    { MKTAG('d','r','a','c'), CODEC_TYPE_VIDEO, CODEC_ID_DIRAC },
526
    { MKTAG('A','C','-','3'), CODEC_TYPE_AUDIO,   CODEC_ID_AC3 },
525
    { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
526
    { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO,   CODEC_ID_AC3 },
527 527
    { 0 },
528 528
};
529 529

  
530 530
/* descriptor present */
531 531
static const StreamType DESC_types[] = {
532
    { 0x6a, CODEC_TYPE_AUDIO,             CODEC_ID_AC3 }, /* AC-3 descriptor */
533
    { 0x7a, CODEC_TYPE_AUDIO,            CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
534
    { 0x7b, CODEC_TYPE_AUDIO,             CODEC_ID_DTS },
535
    { 0x56, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
536
    { 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
532
    { 0x6a, AVMEDIA_TYPE_AUDIO,             CODEC_ID_AC3 }, /* AC-3 descriptor */
533
    { 0x7a, AVMEDIA_TYPE_AUDIO,            CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
534
    { 0x7b, AVMEDIA_TYPE_AUDIO,             CODEC_ID_DTS },
535
    { 0x56, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
536
    { 0x59, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
537 537
    { 0 },
538 538
};
539 539

  
......
554 554
{
555 555
    av_set_pts_info(st, 33, 1, 90000);
556 556
    st->priv_data = pes;
557
    st->codec->codec_type = CODEC_TYPE_DATA;
557
    st->codec->codec_type = AVMEDIA_TYPE_DATA;
558 558
    st->codec->codec_id   = CODEC_ID_NONE;
559 559
    st->need_parsing = AVSTREAM_PARSE_FULL;
560 560
    pes->st = st;
......
588 588

  
589 589
            av_set_pts_info(sub_st, 33, 1, 90000);
590 590
            sub_st->priv_data = sub_pes;
591
            sub_st->codec->codec_type = CODEC_TYPE_AUDIO;
591
            sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
592 592
            sub_st->codec->codec_id   = CODEC_ID_AC3;
593 593
            sub_st->need_parsing = AVSTREAM_PARSE_FULL;
594 594
            sub_pes->sub_st = pes->sub_st = sub_st;
......
1394 1394
        if (!st)
1395 1395
            goto fail;
1396 1396
        av_set_pts_info(st, 60, 1, 27000000);
1397
        st->codec->codec_type = CODEC_TYPE_DATA;
1397
        st->codec->codec_type = AVMEDIA_TYPE_DATA;
1398 1398
        st->codec->codec_id = CODEC_ID_MPEG2TS;
1399 1399

  
1400 1400
        /* we iterate until we find two PCRs to estimate the bitrate */

Also available in: Unified diff