[vlc-devel] [PATCH 00/11] Load subtitles (and audio slaves) from network shares

Thomas Guillem thomas at gllm.fr
Fri Apr 1 10:30:59 CEST 2016


Last month, without consulting each others, Benjamin and me proposed 2 set of
patches to enable subtitles on network shares. There were both rejected, for a
good reason: there were adding too much network overload.

We worked together and found a better solution:

 - Don't improve subtitles only but every slaves: Audio (ac3 tracks for
   examples) and SPU.

 - Add a slave detection in the Demux of modules/playlist/directory.c. Because
   here, we already receive all children of a directory (coming from local or
   network directories). But instead of dropping items that are not audio/video
   (see "ignore-filetypes" option), we keep item slaves in order to attach them
   to the good input item (and we drop all other slaves that are not attached).

 - Load input item slaves (fetched by the demuxer) and the ones found by
   subtitles_Detect when creating a new input thread.

TODO:
 - Expose libvlc_media slaves from LibVLC. Apps using LibVLC should be able to
   get and set slaves of an input_item_t/libvlc_media_t. Indeed, apps may want
   to open a media directly, not passing by a directory demuxer (from a
   database), and they need a way to add slaves previously parsed.

Questions:
 - Maybe the last patch could be squashed with the second and the third ones.
 - Do we keep "spu-*" options ? Do we rename them to "slave-*" ?
 - Shall subtitles_Detect detect audio slaves too (it's like 2 lines change) ?
   Then, shall we rename input/subtitles.c to input/slaves.c ?

Benjamin Adolphi (4):
  input/item: add slave entries
  input/subtitles: refactor subtitles_Detect
  input/input: load slaves from input items
  playlist/directory: attach slaves to input items

Thomas Guillem (7):
  playlist/directory: refactor
  playlist/directory: add missing return check
  input/input: move .sub/.idx/.cdg check
  input/input: simplify LoadSubtitles flags use
  input/input: remove input_SubtitleFileAdd
  input/input: split LoadSubtitles with SetSubtitlesOptions
  input/input: also load unknown/audio slaves from demuxers

 include/vlc_input_item.h           |  48 +++++++++
 modules/demux/playlist/directory.c | 192 +++++++++++++++++++++++++++++++--
 src/input/input.c                  | 212 +++++++++++++++++++++++++++++++------
 src/input/input_internal.h         |   2 +-
 src/input/item.c                   |  46 ++++++++
 src/input/subtitles.c              | 172 ++++++++----------------------
 src/libvlccore.sym                 |   3 +
 7 files changed, 505 insertions(+), 170 deletions(-)

-- 
2.8.0.rc3



More information about the vlc-devel mailing list