[vlc-devel] [vlc-commits] demux: ts: add support for multiview descriptor

Steve Lhomme robux4 at gmail.com
Thu Jul 27 10:52:32 CEST 2017


On Thu, Jul 27, 2017 at 10:36 AM, Francois Cartegnie <git at videolan.org> wrote:
> vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 27 10:33:04 2017 +0200| [800f01edded9399f4c4721f1fcc35747d5f04678] | committer: Francois Cartegnie
>
> demux: ts: add support for multiview descriptor
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=800f01edded9399f4c4721f1fcc35747d5f04678
> ---
>
>  modules/demux/mpeg/ts_psi.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>
> diff --git a/modules/demux/mpeg/ts_psi.c b/modules/demux/mpeg/ts_psi.c
> index 4c5d0c7871..37ebab8555 100644
> --- a/modules/demux/mpeg/ts_psi.c
> +++ b/modules/demux/mpeg/ts_psi.c
> @@ -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:

If default means "I don't know this value" it should be set to unknown
(which doesn't exist yet).
Mohammed Huzaifa Danish has a patch to add it:

https://code.videolan.org/GSoC2017/Shaan/vlc/commit/016a953f3e91c015fdbc2e41aeac64497edc9212


> +                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 );
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits


More information about the vlc-devel mailing list