[vlc-devel] Services Discovery interface upgrade

Jakob Leben jakob.leben at gmail.com
Tue Jun 8 02:42:52 CEST 2010


Hello world,

I propose the change / addition / upgrade to Services Discovery interface as
indicated by the attached patch to vlc_services_discovery.h, which addresses
issues that I have come across when working on and dealing with the current
SD and playlist implementation.

Most notably it allows the following three features:
- SD modules can publish items in unlimited depth of hierarchy
- It is on clients to decide whether and when they want the SD to fetch and
fill the children of a particular parent item.
- It allows SD clients to distinguish pure container items from others that
can actually be played.

As a bonus cool feature that I don't really see an actual purpose yet :), it
allows SD modules to provide items within their item tree that are obtained
and controlled from other SD modules.

A detailed explanation of the proposed functionality is in the patch, but I
also post it here for instant preview.

You are very welcome to comment and to constructively brainstorm on any
conflicting SD usage case that I might not have foreseen or anything that
might be an obstacle to implementation of the proposed interface.

Please note that this is rather a sketch proposal than an actual patch to be
applied.

Best regards,

J.L.

/******************************************************************************
  VLC Services Discovery Protocol:

  A SD client creates and starts a SD service.

  The service will provide a tree structure of nodes of type sd_node_t that
may
  or may not be associated with actual playable items at their p_input_item
  field. The b_is_container field of a node indicates if any children can be
  provided for that node. Typically, container nodes will not themselves be
  associated with any playable items (p_input_item == NULL).

  The method by which the service provides nodes is as follows:

  The service fills a particular parent node with children only AFTER the
client
  requests so with services_discovery_Fetch(). If b_is_container field of
the
  (parent) node is false then trying to fetch children should do nothing,
and
  the opposite: the service should set the field to true if children can be
  provided for that particular (parent) node.
  For every child node provided, the system will emit an "item-added" event.

  The b_has_live_update field of a node indicates that the service is able
to
  spontaneously and continuously update the set of node's children AFTER the
  children have first been fetched AND the client has requested updating
with
  services_discovery_SwitchLiveUpdate(... , true). For every child node
  added/removed an "item-added"/"item-removed" event will be emitted.

  Already when started up, the service provides the abstract root node at
its
  p_root field, of which children will be the actual meaningful nodes.

  Except for i_children, pp_children and p_parent, no fields of sd_node_t
should
  be modified after it has been "published" by the service.

*******************************************************************************/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100608/41dfcda1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SD-API.patch
Type: text/x-diff
Size: 5515 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100608/41dfcda1/attachment.patch>


More information about the vlc-devel mailing list