]> git.sesse.net Git - vlc/commitdiff
input_item: Remove input_item_AddSubItem2 and send subitem_added event from input_ite...
authorPierre d'Herbemont <pdherbemont@free.fr>
Wed, 3 Feb 2010 00:32:06 +0000 (01:32 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Wed, 3 Feb 2010 01:19:22 +0000 (02:19 +0100)
This means that we don't need input_item_AddSubItem if there is an input_item_node_Append*().
input_item_AddSubItem now send the subitem_tree_added event as well.

22 files changed:
include/vlc_input_item.h
modules/access/cdda.c
modules/access/mms/mmsh.c
modules/demux/playlist/asx.c
modules/demux/playlist/b4s.c
modules/demux/playlist/dvb.c
modules/demux/playlist/gvp.c
modules/demux/playlist/ifo.c
modules/demux/playlist/itml.c
modules/demux/playlist/m3u.c
modules/demux/playlist/pls.c
modules/demux/playlist/podcast.c
modules/demux/playlist/qtl.c
modules/demux/playlist/ram.c
modules/demux/playlist/sgimb.c
modules/demux/playlist/shoutcast.c
modules/demux/playlist/wpl.c
modules/demux/playlist/xspf.c
modules/misc/lua/vlc.c
modules/services_discovery/upnp_intel.cpp
src/input/item.c
src/libvlccore.sym

index 57ea28346d49e34ec80a1081aace97f69ffb49e3..72f9d39b08eed159ebd042cf000e9be297ddd474 100644 (file)
@@ -118,16 +118,53 @@ struct input_item_node_t
 VLC_EXPORT( void, input_item_CopyOptions, ( input_item_t *p_parent, input_item_t *p_child ) );
 VLC_EXPORT( void, input_item_SetName, ( input_item_t *p_item, const char *psz_name ) );
 
-/* This won't hold the item, but can tell to interested third parties
+/**
+ * Add one subitem to this item
+ *
+ * This won't hold the item, but can tell to interested third parties
  * Like the playlist, that there is a new sub item. With this design
  * It is not the input item's responsability to keep all the ref of
  * the input item children. */
 VLC_EXPORT( void, input_item_AddSubItem, ( input_item_t *p_parent, input_item_t *p_child ) );
 
+
+/**
+ * Start adding multiple subitems at once.
+ *
+ * This is a hint for the client that he should probably wait for
+ * input_item_AddSubItemTree()'s input_item_subitemtree_added event before
+ * processing any added subitem.
+ */
+VLC_EXPORT( input_item_node_t *, input_item_node_Create, ( input_item_t *p_input ) );
+
+/**
+ * Notify that we are done adding subitems to this tree.
+ *
+ * This send a input_item_subitemtree_added event.
+ */
 VLC_EXPORT( void, input_item_AddSubItemTree, ( input_item_node_t *p_root ) );
 
-/* Will send vlc_InputItemSubItemTreeAdded event, just as input_item_AddSubItemTree */
-VLC_EXPORT( void, input_item_AddSubItem2, ( input_item_t *p_parent, input_item_t *p_child ) );
+/**
+ * Add a subitem to this input_item and to this input_item_node.
+ *
+ * An input_item_subitem_added event will be sent right away.
+ */
+VLC_EXPORT( input_item_node_t *, input_item_node_AppendItem, ( input_item_node_t *p_node, input_item_t *p_item ) );
+
+/**
+ * Add a subitem to this input_item and to this input_item_node.
+ *
+ * An input_item_subitem_added event will be sent right away for the subitem
+ * pointed by input_item_node_t.
+ */
+VLC_EXPORT( void, input_item_node_AppendNode, ( input_item_node_t *p_node, input_item_node_t *p_item ) );
+
+/**
+ * Delete the result of input_item_node_Create().
+ */
+VLC_EXPORT( void, input_item_node_Delete, ( input_item_node_t *p_node ) );
+
+
 
 
 /**
@@ -225,14 +262,6 @@ VLC_EXPORT( input_item_t *, __input_item_NewExt, (vlc_object_t *, const char *ps
  */
 #define input_item_New( a,b,c ) input_item_NewExt( a, b, c, 0, NULL, 0, -1 )
 
-VLC_EXPORT( input_item_node_t *, input_item_node_Create, ( input_item_t *p_input ) );
-
-VLC_EXPORT( void, input_item_node_Delete, ( input_item_node_t *p_node ) );
-
-VLC_EXPORT( input_item_node_t *, input_item_node_AppendItem, ( input_item_node_t *p_node, input_item_t *p_item ) );
-
-VLC_EXPORT( void, input_item_node_AppendNode, ( input_item_node_t *p_node, input_item_node_t *p_item ) );
-
 /******************
  * Input stats
  ******************/
index 833e36aff0cc453ef11c105778cdbef984313045..8cee1b627d40084d457676159bb255b9e6cb28bf 100644 (file)
@@ -577,7 +577,6 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
         snprintf( psz_num, sizeof(psz_num), "%d", 1+i );
         input_item_SetTrackNum( p_input_item, psz_num );
 
-        input_item_AddSubItem( p_current, p_input_item );
         input_item_node_AppendItem( p_root, p_input_item );
         vlc_gc_decref( p_input_item );
         free( psz_uri ); free( psz_opt ); free( psz_name );
index fceea8b965fe12c61d4f11b433bcfa775c5dc916..c689c2776989af966de134386165e1005398d204 100644 (file)
@@ -167,7 +167,6 @@ int MMSHOpen( access_t *p_access )
         p_new_loc = input_item_New( p_access, psz_location, psz_location );
         input_item_t *p_item = input_GetItem( p_input );
         input_item_AddSubItem( p_item, p_new_loc );
-        input_item_AddSubItem2( p_item, p_new_loc );
 
         vlc_gc_decref( p_new_loc );
         vlc_object_release( p_input );
index 5099c9a8cccda6f848bcbc2f711481c006b951ab..4d467cfd3bf3b431a053c2634a7fb41187b5c458 100644 (file)
@@ -473,7 +473,6 @@ static int Demux( demux_t *p_demux )
                             input_item_t *p_input;
                             p_input = input_item_New( p_demux, psz_string, psz_title_asx );
                             input_item_CopyOptions( p_current_input, p_input );
-                            input_item_AddSubItem( p_current_input, p_input );
                             input_item_node_AppendItem( p_subitems, p_input );
                             vlc_gc_decref( p_input );
                             free( psz_string );
@@ -572,7 +571,6 @@ static int Demux( demux_t *p_demux )
                                 uniq_entry_ad_backup = NULL;
                                 vlc_gc_decref( uniq_entry_ad_backup );
                             }
-                            input_item_AddSubItem( p_current_input, p_entry );
                             input_item_node_AppendItem( p_subitems, p_entry );
                             vlc_gc_decref( p_entry );
                         }
@@ -650,7 +648,6 @@ static int Demux( demux_t *p_demux )
                                 if( psz_copyright_entry ) input_item_SetCopyright( p_entry, psz_copyright_entry );
                                 if( psz_moreinfo_entry ) input_item_SetURL( p_entry, psz_moreinfo_entry );
                                 if( psz_abstract_entry ) input_item_SetDescription( p_entry, psz_abstract_entry );
-                                input_item_AddSubItem( p_current_input, p_entry );
                                 input_item_node_AppendItem( p_subitems, p_entry );
                                 vlc_gc_decref( p_entry );
                             }
@@ -754,7 +751,6 @@ static int Demux( demux_t *p_demux )
         {
             msg_Dbg( p_demux, "added unique entry even if ad");
             /* If ASX contains a unique entry, we add it, it is probably not an ad */
-            input_item_AddSubItem( p_current_input, uniq_entry_ad_backup );
             input_item_node_AppendItem( p_subitems, uniq_entry_ad_backup );
             vlc_gc_decref( uniq_entry_ad_backup);
         }
index c9d12ad4b9ca6f1fceee38ac8f5067df94f18202..ac33bc7debcf1b5a5ee4b963d9990632c9f43a30 100644 (file)
@@ -267,7 +267,6 @@ static int Demux( demux_t *p_demux )
                     if( psz_bitrate )
                         msg_Err( p_demux, "Unsupported meta bitrate" );
 
-                    input_item_AddSubItem( p_current_input, p_input );
                     input_item_node_AppendItem( p_subitems, p_input );
                     vlc_gc_decref( p_input );
                     FREENULL( psz_title );
index b7c1dbaf67c08a8d7e8b0b5b463bb9b79393ec7c..8df00ccaf37478a2a85b6fd39a36475e155d83d4 100644 (file)
@@ -122,7 +122,6 @@ static int Demux( demux_t *p_demux )
 
         p_input = input_item_NewExt( p_demux, "dvb://", psz_name,
                                      i_options, (const char**)ppsz_options, VLC_INPUT_OPTION_TRUSTED, -1 );
-        input_item_AddSubItem( p_current_input, p_input );
         input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
 
index f1836a6fbd2c03faed5d6655ac8644108d5be63d..316dbde079ddbe23c523644011b56a56a342f4a9 100644 (file)
@@ -210,7 +210,6 @@ static int Demux( demux_t *p_demux )
         SADD_INFO( "gvp_version", psz_version );
         SADD_INFO( "docid", psz_docid );
         SADD_INFO( "description", psz_description );
-        input_item_AddSubItem( p_current_input, p_input );
         input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
     }
index b66a42e2dc168083cd9ad81c9a1b03e23d30aefa..14660f37e36fc05afbfa3a0d0e721c9c4d9ff838 100644 (file)
@@ -111,7 +111,6 @@ static int Demux( demux_t *p_demux )
     input_item_t *p_current_input = GetCurrentItem(p_demux);
     input_item_t *p_input = input_item_New( p_demux, psz_url, psz_url );
     input_item_AddSubItem( p_current_input, p_input );
-    input_item_AddSubItem2( p_current_input, p_input );
     vlc_gc_decref( p_input );
 
     vlc_gc_decref(p_current_input);
@@ -134,7 +133,6 @@ static int DemuxDVD_VR( demux_t *p_demux )
     input_item_t *p_current_input = GetCurrentItem(p_demux);
     input_item_t *p_input = input_item_New( p_demux, psz_url, psz_url );
     input_item_AddSubItem( p_current_input, p_input );
-    input_item_AddSubItem2( p_current_input, p_input );
 
     vlc_gc_decref( p_input );
 
index c6235a8651aee78d27699a624f05a72da41c6e17..ac4c6f053ced5c90bd50c9e4c3485edebeaac402 100644 (file)
@@ -382,7 +382,6 @@ static bool parse_track_dict( demux_t *p_demux, input_item_node_t *p_input_node,
         msg_Info( p_demux, "Adding '%s'", psz_uri );
 
         p_new_input = input_item_New( p_demux, psz_uri, NULL );
-        input_item_AddSubItem( p_input_node->p_item, p_new_input );
         input_item_node_AppendItem( p_input_node, p_new_input );
 
         /* add meta info */
index e405b14a6305ca263ae169115ce650d9713cf521..acafc3eeb8de107fd80548343b72b05f8078d8cb 100644 (file)
@@ -227,7 +227,6 @@ static int Demux( demux_t *p_demux )
                 input_item_SetArtist( p_input, psz_artist );
             if( psz_name ) input_item_SetTitle( p_input, psz_name );
 
-            input_item_AddSubItem( p_current_input, p_input );
             input_item_node_AppendItem( p_subitems, p_input );
             vlc_gc_decref( p_input );
         }
index 0c76cfa9a2724cb780e56a4ad1533730f87af13a..0089db3cda3f8abae51808096453305562c61d70 100644 (file)
@@ -163,7 +163,6 @@ static int Demux( demux_t *p_demux )
             {
                 p_input = input_item_New( p_demux, psz_mrl, psz_name );
                 input_item_CopyOptions( p_current_input, p_input );
-                input_item_AddSubItem( p_current_input, p_input );
                 input_item_node_AppendItem( p_subitems, p_input );
                 vlc_gc_decref( p_input );
             }
@@ -219,7 +218,6 @@ static int Demux( demux_t *p_demux )
     {
         p_input = input_item_New( p_demux, psz_mrl, psz_name );
         input_item_CopyOptions( p_current_input, p_input );
-        input_item_AddSubItem( p_current_input, p_input );
         input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
         free( psz_mrl_orig );
index 253eaba688c11cee3215a218f2259bd5d96d1401..6a2b256422f5ffa2813f7ed17b23ace32cb0af7c 100644 (file)
@@ -331,7 +331,6 @@ static int Demux( demux_t *p_demux )
                                                 "%s bytes",
                                                 psz_item_size );
                     }
-                    input_item_AddSubItem( p_current_input, p_input );
                     input_item_node_AppendItem( p_subitems, p_input );
                     vlc_gc_decref( p_input );
                     FREENULL( psz_item_name );
@@ -395,7 +394,6 @@ error:
         xml_Delete( p_xml );
     if( p_subitems )
     {
-        input_item_AddSubItemTree( p_subitems );
         input_item_node_Delete( p_subitems );
     }
 
index d93142ead9ccfb4fac3cf522f8ddf23e49de5781..145676a1085cbfaef8a89a2c1cf185cf8152bd8f 100644 (file)
@@ -310,13 +310,11 @@ static int Demux( demux_t *p_demux )
                     p_input, "QuickTime Media Link", type, "%s", field ) ; }
         SADD_INFO( "href", psz_href );
         SADD_INFO( _("Mime"), psz_mimetype );
-        input_item_AddSubItem( p_current_input, p_input );
         input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
         if( psz_qtnext )
         {
             p_input = input_item_New( p_demux, psz_qtnext, NULL );
-            input_item_AddSubItem( p_current_input, p_input );
             input_item_node_AppendItem( p_subitems, p_input );
             vlc_gc_decref( p_input );
         }
index ce7cc822be212a969ab6a07ca6d9635ea80c8044..0c6149f0e5b2d2426071cbfbd16878e03868b920 100644 (file)
@@ -327,7 +327,6 @@ static int Demux( demux_t *p_demux )
             if( !EMPTY_STR( psz_cdnum ) ) input_item_SetTrackNum( p_input, psz_cdnum );
             if( !EMPTY_STR( psz_comments ) ) input_item_SetDescription( p_input, psz_comments );
 
-            input_item_AddSubItem( p_current_input, p_input );
             input_item_node_AppendItem( p_subitems, p_input );
             vlc_gc_decref( p_input );
             free( psz_mrl );
index 9a4ddfd56b689d6246e45fed480fedb0d69435bf..effece1702e44cb85addc653476622819607474f 100644 (file)
@@ -169,7 +169,7 @@ int Import_SGIMB( vlc_object_t * p_this )
             p_demux->p_sys->i_sid = 0;
             p_demux->p_sys->b_rtsp_kasenna = false;
             p_demux->p_sys->b_concert = false;
+
             return VLC_SUCCESS;
         }
     }
@@ -379,7 +379,7 @@ static int Demux ( demux_t *p_demux )
     p_child = input_item_NewWithType( VLC_OBJECT(p_demux), p_sys->psz_uri,
                       p_sys->psz_name ? p_sys->psz_name : p_sys->psz_uri,
                       0, NULL, 0, p_sys->i_duration, ITEM_TYPE_NET );
+
     if( !p_child )
     {
         msg_Err( p_demux, "A valid playlistitem could not be created" );
@@ -403,7 +403,6 @@ static int Demux ( demux_t *p_demux )
         input_item_AddOption( p_child, "rtsp-kasenna", VLC_INPUT_OPTION_TRUSTED );
 
     input_item_AddSubItem( p_current_input, p_child );
-    input_item_AddSubItem2( p_current_input, p_child );
     vlc_gc_decref( p_child );
     vlc_gc_decref(p_current_input);
     return 0; /* Needed for correct operation of go back */
index c007e9d1d0a0527dc0e45302208bdeb1f2f5f381..a6086312065c449df9353c2edcf3d907530acb59 100644 (file)
@@ -226,7 +226,6 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
                         p_input = input_item_New( p_demux, psz_mrl, psz_name );
                         input_item_CopyOptions( p_input_node->p_item, p_input );
                         free( psz_mrl );
-                        input_item_AddSubItem( p_input_node->p_item, p_input );
                         input_item_node_AppendItem( p_input_node, p_input );
                         vlc_gc_decref( p_input );
                     }
@@ -418,7 +417,6 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t *p_xml_reader,
                         input_item_SetNowPlaying( p_input, psz_ct );
                     if( psz_rt )
                         input_item_SetRating( p_input, psz_rt );
-                    input_item_AddSubItem( p_input_node->p_item, p_input );
                     input_item_node_AppendItem( p_input_node, p_input );
                     vlc_gc_decref( p_input );
                     FREENULL( psz_base );
index 98e8ef3960f760ecdf62e3f094534f821bfee78d..71209cb15b309eab40ac66ca261a3c4c24bf59ad 100644 (file)
@@ -102,7 +102,6 @@ static int Demux( demux_t *p_demux )
                 psz_uri = ProcessMRL( psz_uri, p_demux->p_sys->psz_prefix );
                 p_input = input_item_NewExt( p_demux, psz_uri, psz_uri,
                                         0, NULL, 0, -1 );
-                input_item_AddSubItem( p_current_input, p_input );
                 input_item_node_AppendItem( p_subitems, p_input );
                 vlc_gc_decref( p_input );
             }
index 84df57d78f67af91a741b86b856132f174c4aa35..1933c117276a5b093d4f08b0e6591618fbf19c93 100644 (file)
@@ -129,7 +129,6 @@ int Demux( demux_t *p_demux )
         input_item_t *p_new_input = p_demux->p_sys->pp_tracklist[i];
         if( p_new_input )
         {
-            input_item_AddSubItem( p_current_input, p_new_input );
             input_item_node_AppendItem( p_subitems, p_new_input );
         }
     }
@@ -508,7 +507,6 @@ static bool parse_track_node COMPLEX_INTERFACE
 
                     if( p_sys->i_track_id < 0 )
                     {
-                        input_item_AddSubItem( p_input_item, p_new_input );
                         input_item_node_AppendNode( p_input_node, p_new_node );
                         vlc_gc_decref( p_new_input );
                         return true;
@@ -724,7 +722,6 @@ static bool parse_extension_node COMPLEX_INTERFACE
                           ITEM_TYPE_DIRECTORY );
         if( p_new_input )
         {
-            input_item_AddSubItem( p_input_item, p_new_input );
             p_input_node =
                 input_item_node_AppendItem( p_input_node, p_new_input );
             p_input_item = p_new_input;
@@ -917,7 +914,6 @@ static bool parse_extitem_node COMPLEX_INTERFACE
     p_new_input = p_demux->p_sys->pp_tracklist[ i_tid ];
     if( p_new_input )
     {
-        input_item_AddSubItem( p_input_node->p_item, p_new_input );
         input_item_node_AppendItem( p_input_node, p_new_input );
         vlc_gc_decref( p_new_input );
         p_demux->p_sys->pp_tracklist[i_tid] = NULL;
index 28a6c20edf44156a855f9e6fb82148ec7b3755d1..a0c38de0e8c08a522774387a5d62ca99f1da1e85 100644 (file)
@@ -475,7 +475,6 @@ int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                     if( p_parent ) /* Add to node */
                     {
                         input_item_AddSubItem( p_parent, p_input );
-                        input_item_AddSubItem2( p_parent, p_input );
                     }
                     else /* Play or Enqueue (preparse) */
                         /* FIXME: playlist_AddInput() can fail */
index b6fcaabee7397d5c79a0dbaaee4ccc933b0a772b..185ef74d385bac37983fa425526c7e2d4ed3e340 100644 (file)
@@ -790,8 +790,7 @@ void MediaServer::_buildPlaylist( Container* parent, input_item_node_t *p_input_
     {
         Container* container = parent->getContainer( i );
 
-        input_item_t* p_input_item = input_item_New( _p_sd, "vlc://nop", parent->getTitle() ); 
-        input_item_AddSubItem( parent->getInputItem(), p_input_item );
+        input_item_t* p_input_item = input_item_New( _p_sd, "vlc://nop", parent->getTitle() );
         input_item_node_t *p_new_node =
             input_item_node_AppendItem( p_input_node, p_input_item );
 
@@ -807,14 +806,12 @@ void MediaServer::_buildPlaylist( Container* parent, input_item_node_t *p_input_
                                                item->getResource(),
                                                item->getTitle() );
         assert( p_input_item );
-        input_item_AddSubItem( parent->getInputItem(), p_input_item );
         input_item_node_AppendItem( p_input_node, p_input_item );
         item->setInputItem( p_input_item );
     }
 
     if( send )
     {
-        input_item_AddSubItemTree( p_input_node );
         input_item_node_Delete( p_input_node );
     }
 }
index 454aba1d84015be01859a988ea802584a954eb9e..5fea1217d4d8338af2112f436593a6b29d628d53 100644 (file)
@@ -183,14 +183,14 @@ void input_item_SetArtNotFound( input_item_t *p_i, bool b_not_found )
         p_i->p_meta = vlc_meta_New();
 
     int status = vlc_meta_GetStatus(p_i->p_meta);
-    
+
     if( b_not_found )
         status |= ITEM_ART_NOTFOUND;
     else
         status &= ~ITEM_ART_NOTFOUND;
-    
+
     vlc_meta_SetStatus(p_i->p_meta, status);
-    
+
     vlc_mutex_unlock( &p_i->lock );
 }
 
@@ -202,7 +202,7 @@ void input_item_SetArtFetched( input_item_t *p_i, bool b_art_fetched )
         p_i->p_meta = vlc_meta_New();
 
     int status = vlc_meta_GetStatus(p_i->p_meta);
-    
+
     if( b_art_fetched )
         status |= ITEM_ART_FETCHED;
     else
@@ -229,7 +229,7 @@ void input_item_SetMeta( input_item_t *p_i, vlc_meta_type_t meta_type, const cha
     vlc_event_send( &p_i->event_manager, &event );
 }
 
-/* FIXME GRRRRRRRRRR args should be in the reverse order to be 
+/* FIXME GRRRRRRRRRR args should be in the reverse order to be
  * consistant with (nearly?) all or copy funcs */
 void input_item_CopyOptions( input_item_t *p_parent,
                              input_item_t *p_child )
@@ -249,6 +249,15 @@ void input_item_CopyOptions( input_item_t *p_parent,
     vlc_mutex_unlock( &p_parent->lock );
 }
 
+static void notify_subitem_added(input_item_t *p_parent, input_item_t *p_child)
+{
+    /* Notify interested third parties */
+    vlc_event_t event;
+    event.type = vlc_InputItemSubItemAdded;
+    event.u.input_item_subitem_added.p_new_child = p_child;
+    vlc_event_send( &p_parent->event_manager, &event );
+}
+
 /* This won't hold the item, but can tell to interested third parties
  * Like the playlist, that there is a new sub item. With this design
  * It is not the input item's responsability to keep all the ref of
@@ -256,17 +265,15 @@ void input_item_CopyOptions( input_item_t *p_parent,
 void input_item_AddSubItem( input_item_t *p_parent, input_item_t *p_child )
 {
     vlc_mutex_lock( &p_parent->lock );
-
     p_parent->i_type = ITEM_TYPE_PLAYLIST;
-
     vlc_mutex_unlock( &p_parent->lock );
 
-    /* Notify interested third parties */
-    vlc_event_t event;
+    notify_subitem_added(p_parent, p_child);
 
-    event.type = vlc_InputItemSubItemAdded;
-    event.u.input_item_subitem_added.p_new_child = p_child;
-    vlc_event_send( &p_parent->event_manager, &event );
+    input_item_node_t *p_node = input_item_node_Create( p_parent );
+    input_item_node_AppendItem( p_node, p_child );
+    input_item_AddSubItemTree( p_node );
+    input_item_node_Delete( p_node );
 }
 
 void input_item_AddSubItemTree ( input_item_node_t *p_root )
@@ -277,14 +284,6 @@ void input_item_AddSubItemTree ( input_item_node_t *p_root )
     vlc_event_send( &p_root->p_item->event_manager, &event );
 }
 
-void input_item_AddSubItem2 ( input_item_t *p_parent, input_item_t *p_child )
-{
-    input_item_node_t *p_node = input_item_node_Create( p_parent );
-    input_item_node_AppendItem( p_node, p_child );
-    input_item_AddSubItemTree( p_node );
-    input_item_node_Delete( p_node );
-}
-
 bool input_item_HasErrorWhenReading( input_item_t *p_item )
 {
     vlc_mutex_lock( &p_item->lock );
@@ -1035,6 +1034,8 @@ input_item_node_t *input_item_node_AppendItem( input_item_node_t *p_node, input_
 
 void input_item_node_AppendNode( input_item_node_t *p_parent, input_item_node_t *p_child )
 {
+    notify_subitem_added(p_parent->p_item, p_child->p_item);
+
     assert( p_parent && p_child && p_child->p_parent == NULL );
     INSERT_ELEM( p_parent->pp_children,
                  p_parent->i_children,
index 8bb2376f8b55260ebe297d98f5b5604cc1c25924..bb515ed60287694578612b1e2787ba8b985426d4 100644 (file)
@@ -189,7 +189,6 @@ input_GetItem
 input_item_AddInfo
 input_item_AddOption
 input_item_AddSubItem
-input_item_AddSubItem2
 input_item_AddSubItemTree
 input_item_CopyOptions
 input_item_DelInfo