[vlc-devel] [PATCH v6 0/3] Media source and media tree

Romain Vimont rom1v at videolabs.io
Thu Nov 22 18:58:36 CET 2018


Here is an update of my (old) v5 patchset.

I removed the patch "Use new media source API from the playlist", since
there is no need to maintain it (the new playlist is merged). I added
unit tests to use the API instead.

I "merged" media source and media tree into the same header
(include/vlc_media_source.h), and squashed the two first patches into
one.

The media tree callbacks were confusing in previous versions:
 - listener_added
 - node_added
 - node_removed
 - subtree_added

They were created based on the underlying events (node_added and
node_removed when the SD notified a change, subtree_added when
preparsing notified new children, listener_added to retrieve the initial
state when the client registered a listener).

I replaced them by 3 callbacks notifying changes on a specific node
(possibly the root node), whatever the cause:
 - on_children_reset
 - on_children_added
 - on_children_removed

I also updated many details/naming to make the API and implementation
consistent with the playlist.

After that, in a separate patch, I added functions to get the available
media source metadata for a specific category.

Romain Vimont (3):
  vlc_input_item: export RemoveNode()
  media source: introduce media source/tree API
  media source: add API to get available sources

 include/vlc_input_item.h             |   4 +-
 include/vlc_media_source.h           | 293 ++++++++++++++++++++++
 src/Makefile.am                      |  13 +-
 src/libvlc.c                         |   9 +
 src/libvlc.h                         |   2 +
 src/libvlccore.sym                   |  15 ++
 src/media_source/media_source.c      | 355 +++++++++++++++++++++++++++
 src/media_source/media_source.h      |  33 +++
 src/media_source/media_tree.c        | 325 ++++++++++++++++++++++++
 src/media_source/media_tree.h        |  42 ++++
 src/media_source/test.c              | 316 ++++++++++++++++++++++++
 test/Makefile.am                     |   3 +
 test/src/media_source/media_source.c | 108 ++++++++
 13 files changed, 1515 insertions(+), 3 deletions(-)
 create mode 100644 include/vlc_media_source.h
 create mode 100644 src/media_source/media_source.c
 create mode 100644 src/media_source/media_source.h
 create mode 100644 src/media_source/media_tree.c
 create mode 100644 src/media_source/media_tree.h
 create mode 100644 src/media_source/test.c
 create mode 100644 test/src/media_source/media_source.c

-- 
2.19.1



More information about the vlc-devel mailing list