[vlc-commits] input: remove the vlc_InputItemSubItemAdded event

Rémi Denis-Courmont git at videolan.org
Thu May 18 17:39:22 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 17 22:34:41 2017 +0300| [2c6f604e3d2fbb3151a5ee7057d5f0d265b6434e] | committer: Rémi Denis-Courmont

input: remove the vlc_InputItemSubItemAdded event

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c6f604e3d2fbb3151a5ee7057d5f0d265b6434e
---

 include/vlc_events.h     |  1 -
 include/vlc_input_item.h |  4 +---
 src/input/item.c         | 15 ---------------
 3 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/include/vlc_events.h b/include/vlc_events.h
index 667d32bf9c..229f4f6770 100644
--- a/include/vlc_events.h
+++ b/include/vlc_events.h
@@ -98,7 +98,6 @@
 typedef enum vlc_event_type_t {
     /* Input item events */
     vlc_InputItemMetaChanged,
-    vlc_InputItemSubItemAdded,
     vlc_InputItemSubItemTreeAdded,
     vlc_InputItemDurationChanged,
     vlc_InputItemPreparsedChanged,
diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index 461bab9b1d..c593d65e20 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -182,7 +182,7 @@ VLC_API void input_item_SetName( input_item_t *p_item, const char *psz_name );
  * It is not the input item's responsibility to keep all the ref of
  * the input item children.
  *
- * Sends a vlc_InputItemSubItemTreeAdded and a vlc_InputItemSubItemAdded event
+ * Sends a vlc_InputItemSubItemTreeAdded event
  */
 VLC_API void input_item_PostSubItem( input_item_t *p_parent, input_item_t *p_child );
 
@@ -215,8 +215,6 @@ VLC_API void input_item_node_Delete( input_item_node_t *p_node );
  * by the given root node has created new subitems that are pointed to by all the
  * children of the node.
  *
- * Also sends vlc_InputItemSubItemAdded event for every child under the given root node;
- *
  * In the end deletes the node and all its children nodes.
  */
 VLC_API void input_item_node_PostAndDelete( input_item_node_t *p_node );
diff --git a/src/input/item.c b/src/input/item.c
index 7981059612..83e0ae4f7d 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -226,19 +226,6 @@ void input_item_CopyOptions( input_item_t *p_child,
     free( optv );
 }
 
-static void post_subitems( input_item_node_t *p_node )
-{
-    for( int i = 0; i < p_node->i_children; i++ )
-    {
-        vlc_event_send( &p_node->p_item->event_manager, &(vlc_event_t) {
-            .type = vlc_InputItemSubItemAdded,
-            .u.input_item_subitem_added.p_new_child =
-                p_node->pp_children[i]->p_item } );
-
-        post_subitems( p_node->pp_children[i] );
-    }
-}
-
 /* 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 responsibility to keep all the ref of
@@ -1316,8 +1303,6 @@ void input_item_node_AppendNode( input_item_node_t *p_parent, input_item_node_t
 
 void input_item_node_PostAndDelete( input_item_node_t *p_root )
 {
-    post_subitems( p_root );
-
     vlc_event_send( &p_root->p_item->event_manager, &(vlc_event_t) {
         .type = vlc_InputItemSubItemTreeAdded,
         .u.input_item_subitem_tree_added.p_root = p_root } );



More information about the vlc-commits mailing list