]> git.sesse.net Git - vlc/commitdiff
Removed meta-preparsed variable.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 14 Oct 2007 12:17:37 +0000 (12:17 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 14 Oct 2007 12:17:37 +0000 (12:17 +0000)
Audioscrobbler is not fixed but I let a comment explaining how to do it.

modules/misc/audioscrobbler.c
src/input/input.c
src/input/var.c

index 09266e4e9f62825b9215692ecf9c4b8076af0554..466d4751d10b58f70ef52ec6fd6e73976355b11f 100644 (file)
@@ -571,9 +571,13 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     }
     else
     {
+#if 0
+        /* XXX this won't work. One way would be to monitor p_input "state",
+         * once it is no more INIT_S, meta should be parsed */
         /* We'll read the meta data when it will be preparsed */
         var_AddCallback( p_input, "meta-preparsed", MetaPreparsed, p_intf );
         p_sys->b_preparsed_cb = VLC_TRUE;
+#endif
         vlc_object_release( p_input );
         return VLC_SUCCESS;
     }
index 139f82734f49dc18995d87e1f8c8351d94093437..9742b719e4f5d5343571b3a5263e23ab035d6868 100644 (file)
@@ -199,12 +199,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
     /* Create Object Variables for private use only */
     input_ConfigVarInit( p_input );
 
-    vlc_mutex_lock( &p_item->lock );
-    if( p_item->p_meta && (p_item->p_meta->i_status & ITEM_PREPARSED ) )
-        var_SetBool( p_input, "meta-preparsed", VLC_TRUE );
-    vlc_mutex_unlock( &p_item->lock );
-
-
     /* Create Objects variables for public Get and Set */
     input_ControlVarInit( p_input );
 
@@ -2650,6 +2644,19 @@ static void DemuxMeta( input_thread_t *p_input, vlc_meta_t *p_meta, demux_t *p_d
     vlc_bool_t b_bool;
     module_t *p_id3;
 
+
+#if 0
+    /* XXX I am not sure it is a great idea, besides, there is more than that
+     * if we want to do it right */
+    vlc_mutex_lock( &p_item->lock );
+    if( p_item->p_meta && (p_item->p_meta->i_status & ITEM_PREPARSED ) )
+    {
+        vlc_mutex_unlock( &p_item->lock );
+        return;
+    }
+    vlc_mutex_unlock( &p_item->lock );
+#endif
+
     demux2_Control( p_demux, DEMUX_GET_META, p_meta );
     if( demux2_Control( p_demux, DEMUX_HAS_UNSUPPORTED_META, &b_bool ) )
         return;
index f2b4829d7bad10e047e017a07241ea80533a5818..fa8e04c46ad49661910fa514b2fc484e5ef72fd0 100644 (file)
@@ -463,9 +463,6 @@ void input_ConfigVarInit ( input_thread_t *p_input )
     var_Create( p_input, "meta-description", VLC_VAR_STRING|VLC_VAR_DOINHERIT);
     var_Create( p_input, "meta-date", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
     var_Create( p_input, "meta-url", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
-
-    var_Create( p_input, "meta-preparsed", VLC_VAR_BOOL );
-    var_SetBool( p_input, "meta-preparsed", VLC_FALSE );
 }
 
 /*****************************************************************************