]> git.sesse.net Git - vlc/blobdiff - include/vlc_input.h
Use the same comments covention
[vlc] / include / vlc_input.h
index 1873deaf3f23dbc4bf9d09a0b5272dc2dd2fd7b1..441f263b28cd8d5bff161d427258c02f527fa313 100644 (file)
@@ -106,6 +106,11 @@ static inline void input_ItemCopyOptions( input_item_t *p_parent,
     for( i = 0 ; i< p_parent->i_options; i++ )
     {
         char *psz_option= strdup( p_parent->ppsz_options[i] );
+        if( !strcmp( psz_option, "meta-file" ) )
+        {
+            free( psz_option );
+            continue;
+        }
         p_child->i_options++;
         p_child->ppsz_options = (char **)realloc( p_child->ppsz_options,
                                                   p_child->i_options *
@@ -137,8 +142,16 @@ static inline void input_ItemAddSubItem( input_item_t *p_parent,
     vlc_event_send( &p_parent->event_manager, &event );
 }
 
-VLC_EXPORT( void, input_ItemAddOption,( input_item_t *, const char * ) );
-VLC_EXPORT( void, input_ItemAddOptionNoDup,( input_item_t *, const char * ) );
+#define VLC_INPUT_OPTION_UNIQUE  0x1
+#define VLC_INPUT_OPTION_TRUSTED 0x2
+
+VLC_EXPORT( void, input_ItemAddOpt, ( input_item_t *, const char *str, unsigned flags ) );
+
+static inline
+void input_ItemAddOption (input_item_t *item, const char *str)
+{
+    input_ItemAddOpt (item, str, VLC_INPUT_OPTION_TRUSTED);
+}
 
 static inline void input_ItemClean( input_item_t *p_i )
 {
@@ -196,21 +209,7 @@ static inline void input_ItemClean( input_item_t *p_i )
     vlc_mutex_destroy( &p_i->lock );
 }
 
-static inline void input_item_SetMeta( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz_val )
-{
-    vlc_event_t event;
-
-    vlc_mutex_lock( &p_i->lock );
-    if( !p_i->p_meta )
-        p_i->p_meta = vlc_meta_New();
-    vlc_meta_Set( p_i->p_meta, meta_type, psz_val );
-    vlc_mutex_unlock( &p_i->lock );
-
-    /* Notify interested third parties */
-    event.type = vlc_InputItemMetaChanged;
-    event.u.input_item_meta_changed.meta_type = meta_type;
-    vlc_event_send( &p_i->event_manager, &event );
-}
+VLC_EXPORT( void, input_item_SetMeta, ( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz_val ));
 
 static inline vlc_bool_t input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz )
 {