]> git.sesse.net Git - vlc/blobdiff - src/playlist/loadsave.c
playlist: b_doing_ml doing ml is private.
[vlc] / src / playlist / loadsave.c
index 85eda590f0b8d5be34e50131e1f77db60e8bb3f7..69aac3393f876984bef89abb6d7a8b82073b30d7 100644 (file)
@@ -44,16 +44,13 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
 
     if( p_export_root == NULL ) return VLC_EGENERIC;
 
-    msg_Info( p_playlist, "saving %s to file %s",
+    msg_Dbg( p_playlist, "saving %s to file %s",
                     p_export_root->p_input->psz_name, psz_filename );
 
     /* Prepare the playlist_export_t structure */
     p_export = (playlist_export_t *)malloc( sizeof(playlist_export_t) );
     if( !p_export)
-    {
-        msg_Err( p_playlist, "out of memory" );
         return VLC_ENOMEM;
-    }
     p_export->psz_filename = NULL;
     if ( psz_filename )
         p_export->psz_filename = strdup( psz_filename );
@@ -72,14 +69,14 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
     p_playlist->p_private = (void *)p_export;
 
     /* And call the module ! All work is done now */
-    p_module = module_Need( p_playlist, "playlist export", psz_type, true);
+    p_module = module_need( p_playlist, "playlist export", psz_type, true);
     if( !p_module )
     {
         msg_Warn( p_playlist, "exporting playlist failed" );
         vlc_object_unlock( p_playlist );
         return VLC_ENOOBJ;
     }
-    module_Unneed( p_playlist , p_module );
+    module_unneed( p_playlist , p_module );
 
     /* Clean up */
     fclose( p_export->p_file );
@@ -103,7 +100,7 @@ static void input_item_subitem_added( const vlc_event_t * p_event,
     /* playlist_AddInput() can fail, but we have no way to report that ..
      * Any way when it has failed, either the playlist is dying, either OOM */
     playlist_AddInput( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END,
-            false, false );
+            false, pl_Unlocked );
 }
 
 int playlist_MLLoad( playlist_t *p_playlist )
@@ -143,7 +140,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     const char *const psz_option = "meta-file";
     /* that option has to be cleaned in input_item_subitem_added() */
     /* vlc_gc_decref() in the same function */
-    p_input = input_ItemNewExt( p_playlist, psz_uri,
+    p_input = input_item_NewExt( p_playlist, psz_uri,
                                 _("Media Library"), 1, &psz_option, -1 );
     if( p_input == NULL )
         goto error;
@@ -163,7 +160,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                         input_item_subitem_added, p_playlist );
 
-    p_playlist->b_doing_ml = true;
+    pl_priv(p_playlist)->b_doing_ml = true;
     PL_UNLOCK;
 
     stats_TimerStart( p_playlist, "ML Load", STATS_TIMER_ML_LOAD );
@@ -171,7 +168,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     stats_TimerStop( p_playlist,STATS_TIMER_ML_LOAD );
 
     PL_LOCK;
-    p_playlist->b_doing_ml = false;
+    pl_priv(p_playlist)->b_doing_ml = false;
     PL_UNLOCK;
 
     vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,