Commit cb2fda7d authored by Francois Cartegnie's avatar Francois Cartegnie

demux: ts: handle different LPCM types

parent 69adf3b6
...@@ -2423,9 +2423,6 @@ static void PIDFillFormat( const ts_es_t *es, int i_stream_type ) ...@@ -2423,9 +2423,6 @@ static void PIDFillFormat( const ts_es_t *es, int i_stream_type )
case 0x82: /* SCTE-27 (sub) */ case 0x82: /* SCTE-27 (sub) */
es_format_Init( fmt, SPU_ES, VLC_CODEC_SCTE_27 ); es_format_Init( fmt, SPU_ES, VLC_CODEC_SCTE_27 );
break; break;
case 0x83: /* LPCM (audio) */
es_format_Init( fmt, AUDIO_ES, VLC_CODEC_DVD_LPCM );
break;
case 0x84: /* SDDS (audio) */ case 0x84: /* SDDS (audio) */
es_format_Init( fmt, AUDIO_ES, VLC_CODEC_SDDS ); es_format_Init( fmt, AUDIO_ES, VLC_CODEC_SDDS );
break; break;
...@@ -3788,6 +3785,21 @@ static void PMTSetupEs0xA0( demux_t *p_demux, ts_pid_t *pid, ...@@ -3788,6 +3785,21 @@ static void PMTSetupEs0xA0( demux_t *p_demux, ts_pid_t *pid,
p_fmt->b_packetized = true; p_fmt->b_packetized = true;
} }
static void PMTSetupEs0x83( const dvbpsi_pmt_t *p_pmt, ts_pid_t *pid )
{
/* WiDi broadcasts without registration on PMT 0x1, PCR 0x1000 and
* with audio track pid being 0x1100..0x11FF */
if ( p_pmt->i_program_number == 0x1 &&
p_pmt->i_pcr_pid == 0x1000 &&
( pid->i_pid >> 8 ) == 0x11 )
{
/* Not enough ? might contain 0x83 private descriptor, 2 bytes 0x473F */
es_format_Init( &pid->es->fmt, AUDIO_ES, VLC_CODEC_WIDI_LPCM );
}
else
es_format_Init( &pid->es->fmt, AUDIO_ES, VLC_CODEC_DVD_LPCM );
}
static void PMTSetupEsHDMV( ts_pid_t *pid, const dvbpsi_pmt_es_t *p_es ) static void PMTSetupEsHDMV( ts_pid_t *pid, const dvbpsi_pmt_es_t *p_es )
{ {
es_format_t *p_fmt = &pid->es->fmt; es_format_t *p_fmt = &pid->es->fmt;
...@@ -4093,6 +4105,11 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt ) ...@@ -4093,6 +4105,11 @@ static void PMTCallBack( void *data, dvbpsi_pmt_t *p_pmt )
{ {
PMTSetupEs0xA0( p_demux, pid, p_es ); PMTSetupEs0xA0( p_demux, pid, p_es );
} }
else if ( p_es->i_type == 0x83 )
{
/* LPCM (audio) */
PMTSetupEs0x83( p_pmt, pid );
}
else if( registration_type == TS_REGISTRATION_HDMV ) else if( registration_type == TS_REGISTRATION_HDMV )
{ {
PMTSetupEsHDMV( pid, p_es ); PMTSetupEsHDMV( pid, p_es );
......
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