[vlc-devel] [PATCH v2 5/5] libvlc: media: set WITH_ASSOCIATED_MEDIA option to preparser
Rémi Denis-Courmont
remi at remlab.net
Sat Feb 8 15:35:49 CET 2020
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.
> ---
> 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/
More information about the vlc-devel
mailing list