<div class="gmail_quote">On Mon, Jun 7, 2010 at 6:02 AM, Austin Burrow <span dir="ltr"><<a href="mailto:atburrow@gmail.com">atburrow@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal">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.</p>

<p class="MsoNormal"></p>

<p class="MsoNormal">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.</p></div></div></blockquote><div><br>Hi,<br><br>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.<br>
<br>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.<br>
<br>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.<br>
<br>Best regards,<br><br>J.L.<br></div></div>