Commit 800f01ed authored by François Cartegnie's avatar François Cartegnie 🤞

demux: ts: add support for multiview descriptor

parent 2b310f3e
......@@ -922,6 +922,28 @@ explicit_config_too_short:
msg_Err(demux, "Opus descriptor too short");
}
static void PMTSetupEs0x02( ts_es_t *p_es,
const dvbpsi_pmt_es_t *p_dvbpsies )
{
/* MPEG2_stereoscopic_video_format_descriptor */
dvbpsi_descriptor_t *p_dr = PMTEsFindDescriptor( p_dvbpsies, 0x34 );
if( p_dr && p_dr->i_length > 0 && (p_dr->p_data[0] & 0x80) )
{
video_multiview_mode_t mode;
switch( p_dr->p_data[0] & 0x7F )
{
case 0x03:
mode = MULTIVIEW_STEREO_SBS; break;
case 0x04:
mode = MULTIVIEW_STEREO_TB; break;
case 0x08:
default:
mode = MULTIVIEW_2D; break;
}
p_es->fmt.video.multiview_mode = mode;
}
}
static void PMTSetupEs0x05PrivateData( demux_t *p_demux, ts_es_t *p_es,
const dvbpsi_pmt_es_t *p_dvbpsies )
{
......@@ -1427,6 +1449,9 @@ static void FillPESFromDvbpsiES( demux_t *p_demux,
switch( p_dvbpsies->i_type )
{
case 0x02:
PMTSetupEs0x02( p_pes->p_es, p_dvbpsies );
break;
case 0x05: /* Private data in sections */
p_pes->transport = TS_TRANSPORT_SECTIONS;
PMTSetupEs0x05PrivateData( p_demux, p_pes->p_es, p_dvbpsies );
......
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