[vlc-devel] [PATCH] libvlc: add libvlc_media_parse_with_options

Thomas Guillem thomas at gllm.fr
Fri Jan 16 18:46:30 CET 2015

On Thu, Jan 15, 2015, at 19:37, Rémi Denis-Courmont wrote:
> Le 2015-01-15 21:11, Felix Paul Kühne a écrit :
> > Tbh, I’d appreciate a sync mode, as in some corner cases, a certain
> > client app needs to wait until libvlc finished parsing before 
> > starting
> > playback. Using sync parsing is a simple and efficient way to
> > accomplish this.
> You're confusing the sync mode with the ability to be signaled of 
> completion.
> Sync mode is highly undesirable in any circumstance because the calling 
> thread gets stuck for arbitrarily long with no way out. The only 
> reasonable way to use sync mode is in a dedicated process, e.g. a CLI 
> tool.

I agree, the libvlc_media_parse_sync function does just a cond_wait on
vlc_InputItemPreparsedChanged event.
If libvlc users want a sync function, they should implement their own
cond_wait on libvlc_MediaParsedChanged event. This way, they can have
more control and can signal the waiting thread.

> -- 
> Rémi Denis-Courmont
> _______________________________________________
> 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