[vlc-devel] commit: playlist: b_doing_ml doing ml is private. (Pierre d'Herbemont )

git version control git at videolan.org
Sun Sep 28 17:14:50 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Sep 28 16:39:25 2008 +0200| [11c77e08233859756d2ae41cb2a9e72e856a1f3d] | committer: Pierre d'Herbemont 

playlist: b_doing_ml doing ml is private.

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

 include/vlc_playlist.h           |    2 --
 src/playlist/engine.c            |    2 +-
 src/playlist/item.c              |    4 ++--
 src/playlist/loadsave.c          |    4 ++--
 src/playlist/playlist_internal.h |    4 ++--
 5 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index e83f4c3..65c7b20 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -177,8 +177,6 @@ struct playlist_t
     playlist_item_t *     p_local_onelevel; /** < "Playlist" in ONELEVEL view */
     playlist_item_t *     p_ml_onelevel; /** < "Library" in ONELEVEL view */
 
-    bool            b_doing_ml; /**< Doing media library stuff,
-                                       * get quicker */
     bool            b_auto_preparse;
 
     /* Runtime */
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 0dcbd93..ee7e2ee 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -96,7 +96,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
 
     pl_priv(p_playlist)->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
 
-    p_playlist->b_doing_ml = false;
+    pl_priv(p_playlist)->b_doing_ml = false;
 
     p_playlist->b_auto_preparse =
                         var_CreateGetBool( p_playlist, "auto-preparse" ) ;
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 0e92216..6c276bd 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -415,7 +415,7 @@ int playlist_AddInput( playlist_t* p_playlist, input_item_t *p_input,
 {
     playlist_item_t *p_item_cat, *p_item_one;
     if( p_playlist->b_die ) return VLC_EGENERIC;
-    if( !p_playlist->b_doing_ml )
+    if( !pl_priv(p_playlist)->b_doing_ml )
         PL_DEBUG( "adding item `%s' ( %s )", p_input->psz_name,
                                              p_input->psz_uri );
 
@@ -889,7 +889,7 @@ static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
     else
         playlist_NodeInsert( p_playlist, p_item, p_node, i_pos );
 
-    if( !p_playlist->b_doing_ml )
+    if( !pl_priv(p_playlist)->b_doing_ml )
         playlist_SendAddNotify( p_playlist, p_item->i_id, p_node->i_id,
                                  !( i_mode & PLAYLIST_NO_REBUILD ) );
 }
diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index e542b87..69aac33 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -160,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 );
@@ -168,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,
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 69ad4ce..d0af7a7 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -101,8 +101,8 @@ typedef struct playlist_private_t
         vlc_mutex_t         lock;     /**< Lock to protect request */
     } request;
 
-    bool                  b_tree; /**< Display as a tree */
-
+    bool     b_tree; /**< Display as a tree */
+    bool     b_doing_ml; /**< Doing media library stuff  get quicker */
 } playlist_private_t;
 
 #define pl_priv( pl ) ((playlist_private_t *)(pl))




More information about the vlc-devel mailing list