Commit 40e3fb15 authored by Antoine Cellerier's avatar Antoine Cellerier

* add stream assignements for DTS(-HD) / (E-)AC3 / MLP / VC1 used by HD DVDs.

   * the dts/ac3 changes fix some files from http://samples.mplayerhq.hu/evob/ and some other sources.
   * MLP doesn't have any know free decoder (nor do i have any sample) so this is basically "for the future"
   * VC1 doesn't work ... most likely needs some more changes to the code.
 * remove trailing spaces
parent dc0f2c1d
......@@ -66,16 +66,22 @@ static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id )
tk->i_id = i_id;
if( ( i_id&0xff00 ) == 0xbd00 )
{
if( ( i_id&0xf8 ) == 0x88 )
if( ( i_id&0xf8 ) == 0x88 || (i_id&0xf8) == 0x98 )
{
es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('d','t','s',' ') );
tk->i_skip = 4;
}
else if( ( i_id&0xf0 ) == 0x80 )
else if( ( i_id&0xf0 ) == 0x80
|| (i_id&0xf0) == 0xc0 ) /* AC-3, Can also be used for DD+/E-AC-3 */
{
es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('a','5','2',' ') );
tk->i_skip = 4;
}
else if( (i_id&0xf0) == 0xb0 )
{
es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('m','l','p',' ') );
/* FIXME / untested ... no known decoder (at least not in VLC/ffmpeg) */
}
else if( ( i_id&0xe0 ) == 0x20 )
{
es_format_Init( &tk->fmt, SPU_ES, VLC_FOURCC('s','p','u',' ') );
......@@ -100,6 +106,18 @@ static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id )
return VLC_EGENERIC;
}
}
else if( (i_id&0xff00) == 0xfd00 )
{
if( i_id>=0x55 && i_id<=0x5f )
{
es_format_Init( &tk->fmt, VIDEO_ES, VLC_FOURCC('v','c','1',' ') );
}
else
{
es_format_Init( &tk->fmt, UNKNOWN_ES, 0 );
return VLC_EGENERIC;
}
}
else
{
int i_type = ps_id_to_type( p_psm , i_id );
......@@ -391,7 +409,7 @@ static inline int ps_id_to_type( ps_psm_t *p_psm, int i_id )
int i;
for( i = 0; p_psm && i < p_psm->i_es; i++ )
{
if( p_psm->es[i]->i_id == i_id ) return p_psm->es[i]->i_type;
if( p_psm->es[i]->i_id == i_id ) return p_psm->es[i]->i_type;
}
return 0;
}
......@@ -401,7 +419,7 @@ static inline uint8_t *ps_id_to_lang( ps_psm_t *p_psm, int i_id )
int i;
for( i = 0; p_psm && i < p_psm->i_es; i++ )
{
if( p_psm->es[i]->i_id == i_id ) return p_psm->es[i]->lang;
if( p_psm->es[i]->i_id == i_id ) return p_psm->es[i]->lang;
}
return 0;
}
......@@ -497,7 +515,7 @@ static inline int ps_psm_fill( ps_psm_t *p_psm, block_t *p_pkt,
p_psm->es = realloc( p_psm->es, sizeof(ps_es_t *) * (p_psm->i_es+1) );
p_psm->es[p_psm->i_es] = malloc( sizeof(ps_es_t) );
*p_psm->es[p_psm->i_es++] = es;
i_es_base += 4 + i_info_length;
i_es_base += 4 + i_info_length;
}
/* TODO: CRC */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment