[vlc-devel] Question about input_item_node_* functions

Austin Burrow atburrow at gmail.com
Wed Jun 9 04:14:55 CEST 2010

Sorry, I will attempt to explain more clearly. I am a GSoC student working on the UPnP SD. One bug that I have found was that duplicate entries of the same directory would be shown under a server. For example:



|- My Directory

|- My Directory


As you can see, the second "My Directory" does not belong. This can be replicated by altering an item under "My Directory" on the UPnP server, causing the server to re-broadcast its contents. The UPnP client (in VLC) then rebuilds the directory and adds it to the list (under "MyUPnPServer"), not removing the old, outdated directory. The way to fix it would be to remove the old directory which is why I was asking about input_item_node_* and if it provided a means of deleting specific nodes. I took your advice and created a patch using services_discovery_RemoveItem, but it removes "MyUPnPServer" as well as all of its children. Once I remove it, I add "MyUPnPServer" to the list using services_discovery_AddItem. Once "MyUPnPServer" is added, I use input_item_node_* and input_item_* to create the directory tree.


The caveat now is that it causes "MyUPnPServer" to flash, and the user is now required to go through the directory tree to find an item they are looking for.


One solution would be to check each item from the old list and check if it's in the new list, if not, simply delete it and move on. But it is not possible with input_item_node_* and please correct me if I'm wrong, but it doesn't look like services_discovery_RemoveItem is capable of removing a sub-item of "MyUPnPServer" without removing "MyUPnPServer" as well.


I hope this is more clear.


Thanks again,

Austin B


From: vlc-devel-bounces at videolan.org [mailto:vlc-devel-bounces at videolan.org] On Behalf Of Jakob Leben
Sent: Tuesday, June 08, 2010 8:31 PM
To: Mailing list for VLC media player developers
Subject: Re: [vlc-devel] Question about input_item_node_* functions



On Wed, Jun 9, 2010 at 2:04 AM, Austin Burrow <atburrow at gmail.com> wrote:

The downside about using services_discovery_AddItem/services_discovery_RemoveItem is that the whole tree must be rebuilt causing it to flash when it is being rebuilt. 


... A complete fix for this would be to have access to each node being displayed and having the option to remove it from the list, but as you said, input_item_node_* does not offer that capability, and services_discovery_RemoveItem will remove the whole list.


Sorry, I do not understand what you mean by "remove the whole list". The services_discovery_RemoveItem() should remove only the item given as argument plus all the item's children.
If the whole tree of items currently presented is refreshed after adding and removing an item is very much GUI-dependent. In Qt GUI interface of VLC 1.1 and above the refreshing does not take place and any open node in a tree view stays open when an item is add or removed. I don't know about the Mac interface or other LibVLC clients.

If I understand right, you are trying to fix something that appears as a bug in the upnp_intel VLC plugin? Could you please describe the issue better or post a bug report?

Best regards,


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

More information about the vlc-devel mailing list