[vlc-devel] [RFC PATCH 0/7] Browse via LibVLC V2

Thomas Guillem thomas at gllm.fr
Wed Jan 7 12:06:35 CET 2015


Hello,

Second try to enable browsing via libvlc.

My last attempt "libvlc_media_list: add parse_start / parse_stop" was not good.
Indeed, the parse should be done in libvlc_media since there is already
subitems support.

To browse (a playlist, an archive, a directory, a network share) via libvlc:

Create a media from path, location of from a subitem. A location can be
"file:///sdcard", "smb://MYSHARE", "file:///myplaylist.m3u".

Then call libvlc_media_parse_async or libvlc_media_parse.

To get notified of new items asynchronously: either, you listen to
libvlc_MediaSubItemAdded events. Or you can also get the medialist associated
with the media (via libvlc_media_subitems()) and listen to
libvlc_MediaListItemAdded events.

You can also wait for libvlc_MediaParsedChanged event, and use the medialist
(via libvlc_media_subitems()) directly.

Now my question. I decided to use the same parse function that is used to fetch
Meta. This choice can be discussed. I hesitated with adding a new
libvlc_media_parse_full function, that would call a new function: input_Parse
instead of input_Preparse. Parsing a directory or a playlist would be done only
in the newinput_Parse function.


Best regards,
Thomas.

Thomas Guillem (7):
  lib: change libvlc_media_discoverer_t creation
  preparser: pass meta request options to Preparse
  libvlc_media_subitems: lock and always return a medialist
  libvlc_media_parse: parse any scope
  demux: add DEMUX_CAN_HAVE_SUB_ITEMS
  input: preparsing not only for files
  input: Preparse: parse for subitems too

 include/vlc/libvlc_media_discoverer.h | 30 ++++++++++++++++--
 include/vlc_demux.h                   |  4 +++
 lib/libvlc.sym                        |  3 ++
 lib/media.c                           | 48 ++++++++++++++++++++---------
 lib/media_discoverer.c                | 53 +++++++++++++++++++++++++-------
 lib/media_internal.h                  |  1 +
 modules/demux/playlist/playlist.c     | 11 ++++++-
 src/input/demux.c                     |  3 ++
 src/input/input.c                     | 13 +++++---
 src/playlist/preparser.c              | 58 +++++++++++++++++++++++++++++------
 10 files changed, 182 insertions(+), 42 deletions(-)

-- 
2.1.3




More information about the vlc-devel mailing list