Mercurial > mplayer.hg
changeset 22162:1ca423133265
vc1 in mpegts
author | nicodvb |
---|---|
date | Fri, 09 Feb 2007 19:39:31 +0000 |
parents | f5a72835fbee |
children | 0e60f69c9dc4 |
files | libmpdemux/demux_ts.c libmpdemux/video.c |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c Fri Feb 09 18:10:17 2007 +0000 +++ b/libmpdemux/demux_ts.c Fri Feb 09 19:39:31 2007 +0000 @@ -70,6 +70,7 @@ VIDEO_MPEG4 = 0x10000004, VIDEO_H264 = 0x10000005, VIDEO_AVC = mmioFOURCC('a', 'v', 'c', '1'), + VIDEO_VC1 = mmioFOURCC('W', 'V', 'C', '1'), AUDIO_MP2 = 0x50, AUDIO_A52 = 0x2000, AUDIO_DTS = 0x2001, @@ -243,7 +244,7 @@ #define IS_AUDIO(x) (((x) == AUDIO_MP2) || ((x) == AUDIO_A52) || ((x) == AUDIO_LPCM_BE) || ((x) == AUDIO_AAC) || ((x) == AUDIO_DTS)) -#define IS_VIDEO(x) (((x) == VIDEO_MPEG1) || ((x) == VIDEO_MPEG2) || ((x) == VIDEO_MPEG4) || ((x) == VIDEO_H264) || ((x) == VIDEO_AVC)) +#define IS_VIDEO(x) (((x) == VIDEO_MPEG1) || ((x) == VIDEO_MPEG2) || ((x) == VIDEO_MPEG4) || ((x) == VIDEO_H264) || ((x) == VIDEO_AVC) || ((x) == VIDEO_VC1)) static int ts_parse(demuxer_t *demuxer, ES_stream_t *es, unsigned char *packet, int probe); @@ -831,6 +832,8 @@ mp_msg(MSGT_DEMUXER, MSGL_INFO, "VIDEO MPEG4(pid=%d) ", param->vpid); else if(param->vtype == VIDEO_H264) mp_msg(MSGT_DEMUXER, MSGL_INFO, "VIDEO H264(pid=%d) ", param->vpid); + else if(param->vtype == VIDEO_VC1) + mp_msg(MSGT_DEMUXER, MSGL_INFO, "VIDEO VC1(pid=%d) ", param->vpid); else if(param->vtype == VIDEO_AVC) mp_msg(MSGT_DEMUXER, MSGL_INFO, "VIDEO AVC(NAL-H264, pid=%d) ", param->vpid); } @@ -1414,7 +1417,7 @@ return 1; } } - else if((stream_id >= 0xe0) && (stream_id <= 0xef)) + else if(((stream_id >= 0xe0) && (stream_id <= 0xef)) || (stream_id == 0xfd && type_from_pmt != UNKNOWN)) { es->start = p; es->size = packet_len; @@ -2199,6 +2202,10 @@ { es->type = AUDIO_DTS; } + else if(d[0] == 'V' && d[1] == 'C' && d[2] == '-' && d[3] == '1') + { + es->type = AUDIO_DTS; + } else es->type = UNKNOWN; mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor); @@ -2393,6 +2400,9 @@ case 0x8A: pmt->es[idx].type = AUDIO_DTS; break; + case 0xEA: + pmt->es[idx].type = VIDEO_VC1; + break; default: mp_msg(MSGT_DEMUX, MSGL_DBG2, "UNKNOWN ES TYPE=0x%x\n", es_type); pmt->es[idx].type = UNKNOWN;
--- a/libmpdemux/video.c Fri Feb 09 18:10:17 2007 +0000 +++ b/libmpdemux/video.c Fri Feb 09 19:39:31 2007 +0000 @@ -75,7 +75,7 @@ ((d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_PS) && (sh_video->format==0x10000005)) ) video_codec = VIDEO_H264; - else if((d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_PS) && (sh_video->format==mmioFOURCC('W', 'V', 'C', '1'))) + else if((d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_PS || d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_TS) && (sh_video->format==mmioFOURCC('W', 'V', 'C', '1'))) video_codec = VIDEO_VC1; else video_codec = VIDEO_OTHER; @@ -613,7 +613,7 @@ *start=videobuffer; in_size=videobuf_len; videobuf_len=0; - } else if((demuxer->file_format==DEMUXER_TYPE_MPEG_PS) && (sh_video->format==mmioFOURCC('W', 'V', 'C', '1'))) { + } else if((demuxer->file_format==DEMUXER_TYPE_MPEG_PS || demuxer->file_format==DEMUXER_TYPE_MPEG_TS) && (sh_video->format==mmioFOURCC('W', 'V', 'C', '1'))) { while(videobuf_len<VIDEOBUFFER_SIZE-MAX_VIDEO_PACKET_SIZE) { int i=sync_video_packet(d_video); if(!i) return -1;