[vlc-devel] Question about input_item_node_* functions

Jakob Leben jakob.leben at gmail.com
Mon Jun 7 13:57:01 CEST 2010


On Mon, Jun 7, 2010 at 6:02 AM, Austin Burrow <atburrow at gmail.com> wrote:

>  I had a quick question about the workings of input_item_node_*
> functions.  Looking through the documentation and some code, I've pretty
> much figured out how to make an item node, but I was wondering how to remove
> an item from the actual list after you've done a call to
> input_item_node_PostAndDelete.  I've looked around and found
> input_item_node_Delete, but it looks like that just deletes my locally
> created list before (or after) it was posted internally.
>
> For example, the upnp_intel SD module creates a list of UPnP servers and
> their sub-items, but when the UPnP servers rebroadcast their files, some
> files could be out of date but they aren't being removed from the tree
> list.  Knowing the workings of input_item_node_* would help me fix this bug.
>

Hi,

Your observation about input_item_node_X is correct. An "input item node"
with all it's children can either be posted and deleted or only deleted.
After that, it is freed and inaccessible.

Please note that input_item_node_t is not meant for continuous storage of
information but only to pass information from a Playlist Demuxer to the VLC
core. Usage of it for SD is anomalous anyway. SDs should instead use
services_discovery_AddItem / services_discovery_RemoveItem. However, that
only allows for two levels of item hierarchy, which is the reason for some
SDs to go for other means of publishing their items.

Anyway, if a SD needs to "un-publish" an item it has published, it should
have internally (by it's own means and data structures) stored a reference
to the input_item_t it has published and then call
services_discovery_RemoveItem with that item as an argument.

Best regards,

J.L.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100607/a97b083c/attachment.html>


More information about the vlc-devel mailing list