[vlc-devel] [PATCH v2 5/5] libvlc: media: set WITH_ASSOCIATED_MEDIA option to preparser

Alexandre Janniaux ajanni at videolabs.io
Tue Mar 24 11:42:34 CET 2020


Hi,

On Sat, Feb 08, 2020 at 04:35:49PM +0200, Rémi Denis-Courmont wrote:
> Le perjantaina 7. helmikuuta 2020, 23.04.49 EET Alexandre Janniaux a écrit :
> > When a LibVLC client associates multiple inputs to a media through the
> > input slave mechanism, it should expect that all associated media get
> > preparsed so that listing tracks and elementary stream ids give
> > a comprehensive result.
> >
> > To achieve this, always set the WITH_ASSOCIATED_MEDIA when requesting
> > a preparsing from the LibVLC API.
>
> For tracks, that's very agreeable. For meta-data, not so much: You probably
> don't want the meta of an external subtitle file clobbering the meta of the
> main input. It's not clear if this controls onl the first case, or both, which
> IMO would be wrong.
>
> Also, if it's always set, then I'm not exactly clear why it needs a flag.

Actually, the metdata are never clobbered when adding a
SPU_ES associated media and are already clobbered during
usual playback when adding an AUDIO_ES associated media.

I'm not sure whether a fix for this would belong to that
patchset, nor whether we should provide different metadata
between prepase and playback.

What do you think?

The key points are in input_SlaveSourceAdd which is called
by LoadSlaves, which is what I enabled with slave preparsing
enabled.

Regards,
--
Alexandre Janniaux
Videolabs

>
> > ---
> >  lib/media.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/lib/media.c b/lib/media.c
> > index f045c729d2..bd40fc388a 100644
> > --- a/lib/media.c
> > +++ b/lib/media.c
> > @@ -801,6 +801,9 @@ static int media_parse(libvlc_media_t *media, bool
> > b_async, if (parse_flag & libvlc_media_do_interact)
> >              parse_scope |= META_REQUEST_OPTION_DO_INTERACT;
> >
> > +        /* Always preparse associated media when using libvlc. */
> > +        parse_scope |= META_REQUEST_OPTION_WITH_ASSOCIATED_MEDIA;
> > +
> >          ret = libvlc_MetadataRequest(libvlc, item, parse_scope,
> >                                       &input_preparser_callbacks, media,
> >                                       timeout, media);
>
>
> --
> Реми Дёни-Курмон
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list