1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00

Add partial support for dirac to TS demuxer.

E.g. no header parsing is implemented so -fps must be specified manually.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31327 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-06-05 16:37:10 +00:00
parent 29b2cae621
commit eced1edd7e

View File

@ -70,6 +70,7 @@ typedef enum
VIDEO_MPEG4 = 0x10000004, VIDEO_MPEG4 = 0x10000004,
VIDEO_H264 = 0x10000005, VIDEO_H264 = 0x10000005,
VIDEO_AVC = mmioFOURCC('a', 'v', 'c', '1'), VIDEO_AVC = mmioFOURCC('a', 'v', 'c', '1'),
VIDEO_DIRAC = mmioFOURCC('d', 'r', 'a', 'c'),
VIDEO_VC1 = mmioFOURCC('W', 'V', 'C', '1'), VIDEO_VC1 = mmioFOURCC('W', 'V', 'C', '1'),
AUDIO_MP2 = 0x50, AUDIO_MP2 = 0x50,
AUDIO_A52 = 0x2000, AUDIO_A52 = 0x2000,
@ -246,7 +247,7 @@ typedef struct {
#define IS_AUDIO(x) (((x) == AUDIO_MP2) || ((x) == AUDIO_A52) || ((x) == AUDIO_LPCM_BE) || ((x) == AUDIO_AAC) || ((x) == AUDIO_DTS) || ((x) == AUDIO_TRUEHD)) #define IS_AUDIO(x) (((x) == AUDIO_MP2) || ((x) == AUDIO_A52) || ((x) == AUDIO_LPCM_BE) || ((x) == AUDIO_AAC) || ((x) == AUDIO_DTS) || ((x) == AUDIO_TRUEHD))
#define IS_VIDEO(x) (((x) == VIDEO_MPEG1) || ((x) == VIDEO_MPEG2) || ((x) == VIDEO_MPEG4) || ((x) == VIDEO_H264) || ((x) == VIDEO_AVC) || ((x) == VIDEO_VC1)) #define IS_VIDEO(x) (((x) == VIDEO_MPEG1) || ((x) == VIDEO_MPEG2) || ((x) == VIDEO_MPEG4) || ((x) == VIDEO_H264) || ((x) == VIDEO_AVC) || ((x) == VIDEO_DIRAC) || ((x) == VIDEO_VC1))
#define IS_SUB(x) (((x) == SPU_DVD) || ((x) == SPU_DVB) || ((x) == SPU_TELETEXT)) #define IS_SUB(x) (((x) == SPU_DVD) || ((x) == SPU_DVB) || ((x) == SPU_TELETEXT))
static int ts_parse(demuxer_t *demuxer, ES_stream_t *es, unsigned char *packet, int probe); static int ts_parse(demuxer_t *demuxer, ES_stream_t *es, unsigned char *packet, int probe);
@ -2327,6 +2328,10 @@ static int parse_descriptors(struct pmt_es_t *es, uint8_t *ptr)
{ {
es->type = VIDEO_VC1; es->type = VIDEO_VC1;
} }
else if(d[0] == 'd' && d[1] == 'r' && d[2] == 'a' && d[3] == 'c')
{
es->type = VIDEO_DIRAC;
}
else else
es->type = UNKNOWN; es->type = UNKNOWN;
mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor); mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor);
@ -2524,6 +2529,9 @@ static int parse_pmt(ts_priv_t * priv, uint16_t progid, uint16_t pid, int is_sta
case 0x86: case 0x86:
pmt->es[idx].type = AUDIO_DTS; pmt->es[idx].type = AUDIO_DTS;
break; break;
case 0xD1:
pmt->es[idx].type = VIDEO_DIRAC;
break;
case 0xEA: case 0xEA:
pmt->es[idx].type = VIDEO_VC1; pmt->es[idx].type = VIDEO_VC1;
break; break;