[vlc-devel] commit: input: Remove input_ItemClean and input_ItemInit from public land. (Pierre d'Herbemont )

git version control git at videolan.org
Mon Mar 31 00:44:54 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Mon Mar 31 00:44:47 2008 +0200| [2684aa49bfb80227c6f0402bbb95d03865ed9ad8]

input: Remove input_ItemClean and input_ItemInit from public land.

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

 include/vlc_input.h        |   51 ---------------------------
 src/input/input_internal.h |   27 --------------
 src/input/item.c           |   82 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 82 insertions(+), 78 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index e3f3dd4..5e03e91 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -162,57 +162,6 @@ int input_ItemAddOption (input_item_t *item, const char *str)
     return input_ItemAddOpt (item, str, VLC_INPUT_OPTION_TRUSTED);
 }
 
-static inline void input_ItemClean( input_item_t *p_i )
-{
-    int i;
-
-    vlc_event_manager_fini( &p_i->event_manager );
-
-    free( p_i->psz_name );
-    free( p_i->psz_uri );
-    if( p_i->p_stats )
-    {
-        vlc_mutex_destroy( &p_i->p_stats->lock );
-        free( p_i->p_stats );
-    }
-
-    if( p_i->p_meta )
-        vlc_meta_Delete( p_i->p_meta );
-
-    for( i = 0; i < p_i->i_options; i++ )
-        free( p_i->ppsz_options[i] );
-    TAB_CLEAN( p_i->i_options, p_i->ppsz_options );
-    free( p_i->optflagv);
-
-    for( i = 0; i < p_i->i_es; i++ )
-    {
-        es_format_Clean( p_i->es[i] );
-        free( p_i->es[i] );
-    }
-    TAB_CLEAN( p_i->i_es, p_i->es );
-
-    for( i = 0; i < p_i->i_categories; i++ )
-    {
-        info_category_t *p_category = p_i->pp_categories[i];
-        int j;
-
-        for( j = 0; j < p_category->i_infos; j++ )
-        {
-            struct info_t *p_info = p_category->pp_infos[j];
-
-            free( p_info->psz_name);
-            free( p_info->psz_value );
-            free( p_info );
-        }
-        TAB_CLEAN( p_category->i_infos, p_category->pp_infos );
-
-        free( p_category->psz_name );
-        free( p_category );
-    }
-    TAB_CLEAN( p_i->i_categories, p_i->pp_categories );
-
-    vlc_mutex_destroy( &p_i->lock );
-}
 
 VLC_EXPORT( void, input_item_SetMeta, ( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz_val ));
 
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 71cac39..f60a314 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -220,33 +220,6 @@ static inline void input_ControlPush( input_thread_t *p_input,
 
 /** Stuff moved out of vlc_input.h -- FIXME: should probably not be inline
  * anyway. */
-static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
-{
-    memset( p_i, 0, sizeof(input_item_t) );
-    p_i->psz_name = NULL;
-    p_i->psz_uri = NULL;
-    TAB_INIT( p_i->i_es, p_i->es );
-    TAB_INIT( p_i->i_options, p_i->ppsz_options );
-    p_i->optflagv = NULL, p_i->optflagc = 0;
-    TAB_INIT( p_i->i_categories, p_i->pp_categories );
-
-    p_i->i_type = ITEM_TYPE_UNKNOWN;
-    p_i->b_fixed_name = VLC_TRUE;
-
-    p_i->p_stats = NULL;
-    p_i->p_meta = NULL;
-
-    vlc_mutex_init( p_o, &p_i->lock );
-    vlc_event_manager_init( &p_i->event_manager, p_i, p_o );
-    vlc_event_manager_register_event_type( &p_i->event_manager,
-        vlc_InputItemMetaChanged );
-    vlc_event_manager_register_event_type( &p_i->event_manager,
-        vlc_InputItemSubItemAdded );
-    vlc_event_manager_register_event_type( &p_i->event_manager,
-        vlc_InputItemDurationChanged );
-    vlc_event_manager_register_event_type( &p_i->event_manager,
-        vlc_InputItemPreparsedChanged );
-}
 
 static inline void input_item_SetPreparsed( input_item_t *p_i, vlc_bool_t preparsed )
 {
diff --git a/src/input/item.c b/src/input/item.c
index 77ee6e7..d8b0e7e 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -34,6 +34,88 @@
 
 static void GuessType( input_item_t *p_item );
 
+/** Stuff moved out of vlc_input.h -- FIXME: should probably not be inline
+ * anyway. */
+static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
+{
+    memset( p_i, 0, sizeof(input_item_t) );
+    p_i->psz_name = NULL;
+    p_i->psz_uri = NULL;
+    TAB_INIT( p_i->i_es, p_i->es );
+    TAB_INIT( p_i->i_options, p_i->ppsz_options );
+    p_i->optflagv = NULL, p_i->optflagc = 0;
+    TAB_INIT( p_i->i_categories, p_i->pp_categories );
+
+    p_i->i_type = ITEM_TYPE_UNKNOWN;
+    p_i->b_fixed_name = VLC_TRUE;
+
+    p_i->p_stats = NULL;
+    p_i->p_meta = NULL;
+
+    vlc_mutex_init( p_o, &p_i->lock );
+    vlc_event_manager_init( &p_i->event_manager, p_i, p_o );
+    vlc_event_manager_register_event_type( &p_i->event_manager,
+        vlc_InputItemMetaChanged );
+    vlc_event_manager_register_event_type( &p_i->event_manager,
+        vlc_InputItemSubItemAdded );
+    vlc_event_manager_register_event_type( &p_i->event_manager,
+        vlc_InputItemDurationChanged );
+    vlc_event_manager_register_event_type( &p_i->event_manager,
+        vlc_InputItemPreparsedChanged );
+}
+
+static inline void input_ItemClean( input_item_t *p_i )
+{
+    int i;
+
+    vlc_event_manager_fini( &p_i->event_manager );
+
+    free( p_i->psz_name );
+    free( p_i->psz_uri );
+    if( p_i->p_stats )
+    {
+        vlc_mutex_destroy( &p_i->p_stats->lock );
+        free( p_i->p_stats );
+    }
+
+    if( p_i->p_meta )
+        vlc_meta_Delete( p_i->p_meta );
+
+    for( i = 0; i < p_i->i_options; i++ )
+        free( p_i->ppsz_options[i] );
+    TAB_CLEAN( p_i->i_options, p_i->ppsz_options );
+    free( p_i->optflagv);
+
+    for( i = 0; i < p_i->i_es; i++ )
+    {
+        es_format_Clean( p_i->es[i] );
+        free( p_i->es[i] );
+    }
+    TAB_CLEAN( p_i->i_es, p_i->es );
+
+    for( i = 0; i < p_i->i_categories; i++ )
+    {
+        info_category_t *p_category = p_i->pp_categories[i];
+        int j;
+
+        for( j = 0; j < p_category->i_infos; j++ )
+        {
+            struct info_t *p_info = p_category->pp_infos[j];
+
+            free( p_info->psz_name);
+            free( p_info->psz_value );
+            free( p_info );
+        }
+        TAB_CLEAN( p_category->i_infos, p_category->pp_infos );
+
+        free( p_category->psz_name );
+        free( p_category );
+    }
+    TAB_CLEAN( p_i->i_categories, p_i->pp_categories );
+
+    vlc_mutex_destroy( &p_i->lock );
+}
+
 void input_item_SetMeta( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz_val )
 {
     vlc_event_t event;




More information about the vlc-devel mailing list