[vlc-devel] Services Discovery Item Management

Austin Burrow atburrow at gmail.com
Sat Jul 3 22:35:54 CEST 2010


Hello,

 

I have been working on a permanent fix for an item duplication bug that
exists within the UPnP SD Client. I had submitted a patch earlier on, but it
introduced a possible annoyance to the end-user. Allow me to explain what
the current issues are.

 

The current fix is essentially only a "small hack". Although it fixes the
problem, it introduces cosmetic issues with the playlist. For example, when
the UPnP Server rebroadcasts it's directory structure, the VLC Client
discards the old directory tree, causing the user to go back to the root
node of the directory. The directory listing is then rebuilt with the new
information, but  the user is forced to traverse through the directory to
find the item they were looking for again. Some servers may not push the
directory structure too often, but we cannot rely on the server, as I would
be annoyed if it were to happen once every 10 minutes.

 

I have thought up another fix, but this would require certain features to be
present within the VLC services discovery functions. Currently,
services_discovery_AddItem does not allow the programmer to nest items
within one another. It only allows a "2 deep" scope. An example of the
limitation is below:

 

Root Directory

  + Item 1

  + Item 2

 

services_discovery_AddItem will not let the programmer specify a child-node
to insert items into, so we would not be able to do the following:

 

Root Directory

  + Item 1

    + Sub Item 1 under Item 1

  + Item 2

    + Sub Item 1 of Item 2

      + Sub-Sub Item 1 of Sub Item 1

 

This creates a limitation on what we are able to do. If we were able to do
the above, we could simply preserve the old directory listing, then compare
what items do not exist in the new directory listing, then remove them from
the listing that's being shown to the user using
services_discovery_RemoveItem. If new files were introduced within an
already existing container, we could simply insert them with an updated
services_discovery_AddItem function.

 

I hope I explained this clearly. Please let me know if I need to explain
anything further.

 

Thanks for reading,

Austin Burrow

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100703/3bf31f48/attachment.html>


More information about the vlc-devel mailing list