<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks for your detailed response, that helped out a lot. 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. This seems like it would add more frustration for the user as they
would be unable to expand the tree while the server is pushing updates. An
example would be if a person added a large folder (which contained subfolders)
to MediaTomb.  MediaTomb would then scan the directory constantly pushing
updates. This could go on for minutes depending on how large the folder was. A
solution could be to not display the list until it is built, but on the client
side there is no way to know how big the list will be. 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.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Austin B<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> vlc-devel-bounces@videolan.org
[mailto:vlc-devel-bounces@videolan.org] <b>On Behalf Of </b>Jakob Leben<br>
<b>Sent:</b> Monday, June 07, 2010 6:57 AM<br>
<b>To:</b> Mailing list for VLC media player developers<br>
<b>Subject:</b> Re: [vlc-devel] Question about input_item_node_* functions<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<p class=MsoNormal>On Mon, Jun 7, 2010 at 6:02 AM, Austin Burrow <<a
href="mailto:atburrow@gmail.com">atburrow@gmail.com</a>> wrote:<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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.<o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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.<o:p></o:p></p>

</div>

</div>

<div>

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

</div>

</div>

</div>

</body>

</html>