<div class="gmail_quote">On Tue, Feb 2, 2010 at 8:50 AM, Pierre d'Herbemont <span dir="ltr"><<a href="mailto:pdherbemont@free.fr">pdherbemont@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br></blockquote><div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Well, input_item_AddSubItem2 is non obvious. Very suspicious. <br></blockquote>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
+    input_item_node_t *p_subitems = input_item_node_Create( p_current_input );<br>
<br>
Why do you need this? Couldn't you emulate this with input_item_AddSubItem()?<br>
<br>
It seems that this new API is much more complicated than it was<br>
before, and there is no reason why. Mostly everything could be done on<br>
top of the previous API.<br></blockquote><div><br> Well, to be honest, I took the option of a flat playlist as a must. Based on this assumption, after thinning the playlist to not store separate tree / flat hierarchy, we need to know when an input item _stops_ adding subitems to implement the flattening properly.<br>
<br>The most efficient design was to let playlist demuxers actually transmit over the whole tree of subitems that they create at the same time. input_item_node was a logical step. And _Create, _Append, _Delete are there for manipulation of the input item tree, before it is actually sent over with input_item_AddSubItemTree.<br>
<br>To be handy, I also implemented input_item_AddSubItem2 for demuxers that create only one single subitem - there is couple of them; but as a difference from input_item_AddSubItem, the version 2 emits the same event as input_item_AddSubItemTree.<br>
<br>I kept the input_item_AddSubItem everywhere, so everything works also where the old event is being observed, for example in vlc_media_xxx - that is, until those places are converted to observe the react to the new input item event. Then we can remove the number 2 next to function name...<br>
<br>Cheers,<br><br>Jakob<br></div></div>