[vlc-devel] [PATCH 5/5] input: change "sub-file" option to "sub-url"

Thomas Guillem thomas at gllm.fr
Tue Feb 23 08:52:54 CET 2016

On Tue, Feb 23, 2016, at 02:50, Rémi Denis-Courmont wrote:
> Le 2016-02-15 16:00, Thomas Guillem a écrit :
> > On Sat, Feb 13, 2016, at 19:32, Rémi Denis-Courmont wrote:
> >> This specific change was already rejected before and I don´t see any 
> >> new
> >> elements to discuss and potentially change the decision.
> >
> > So, my plan (that will be longer to develop):
> >
> >  - When parsing a directory via vlc: add input slaves (.ac3,.srt and 
> > co)
> >  to each new input items (using/adapting/improving the code in
> >  subtitles_Detect)
> I am not sure what you mean. I think the only practically deployable 
> way to scan for subtitles is when opening a directory. It can either be 
> done by the directory demuxer (ugly) or by a for-directories stream 
> filter (less ugly).

My plan was to plug it in the Demux or playlist/directory.c.
Because here, we already receive all children of the directory. Instead
of dropping items that are not audio/video (see "ignore-filetypes"
option), I'll keep item slaves (srt, ac3 and co) in order to attach them
to the good input item, then I'll drop all slaves that are not attached.
The big advantage of this solution is that it doesn't add any network

That way, subtitles detection will work when browsing network
directories. Also, the application that use libvlc will be able to store
the input slaves in a db for a later use.

> It won't work if the input item was not created by the directory 
> demuxer. But I fail to conceive an acceptable solution. Blocking 
> scanning during input initialization is a non-starter for performance 
> reasons. Non-blocking scanning is a non-starter because we would need 
> the subtitles immediately (unlike covert art), and because it could 
> overload the network in some cases.
> >  - Add input_item_get_slaves()/input_item_add_slave()
> >  - Add libvlc_media_get_slaves()/libvlc_media_set_slaves(): This will 
> > be
> >  used to store/restore the media slaves (.ac3, .srt and co) from a 
> > media
> >  library.
> -- 
> Rémi Denis-Courmont
> 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