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

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


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Sep 28 16:44:17 2008 +0200| [5539b7b79ca8022a027af0f7b7753ccf33f49177] | committer: Pierre d'Herbemont 

playlist: b_cant_sleep is private.

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

 include/vlc_playlist.h           |    2 --
 src/playlist/engine.c            |    8 ++++----
 src/playlist/playlist_internal.h |    1 +
 src/playlist/thread.c            |    2 +-
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 29b79c1..fed8239 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -181,8 +181,6 @@ struct playlist_t
     int                   i_sort; /**< Last sorting applied to the playlist */
     int                   i_order; /**< Last ordering applied to the playlist */
     mtime_t               gc_date;
-    bool            b_cant_sleep;
-
 };
 
 /** Helper to add an item */
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index ed041c7..046521d 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -83,7 +83,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
     pl_priv(p_playlist)->p_input = NULL;
 
     p_playlist->gc_date = 0;
-    p_playlist->b_cant_sleep = false;
+    pl_priv(p_playlist)->b_cant_sleep = false;
 
     ARRAY_INIT( p_playlist->items );
     ARRAY_INIT( p_playlist->all_items );
@@ -217,14 +217,14 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force )
     {
         if( mdate() - p_playlist->gc_date < 1000000 )
         {
-            p_playlist->b_cant_sleep = true;
+           pl_priv(p_playlist)->b_cant_sleep = true;
             return;
         }
         else if( p_playlist->gc_date == 0 )
             return;
     }
 
-    p_playlist->b_cant_sleep = false;
+    pl_priv(p_playlist)->b_cant_sleep = false;
 }
 
 /* Input Callback */
@@ -403,7 +403,7 @@ check_input:
             playlist_release_current_input( p_playlist );
 
             p_playlist->gc_date = mdate();
-            p_playlist->b_cant_sleep = true;
+            pl_priv(p_playlist)->b_cant_sleep = true;
 
             i_activity= var_GetInteger( p_playlist, "activity" );
             var_SetInteger( p_playlist, "activity", i_activity -
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 8a17401..3ea010f 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -104,6 +104,7 @@ typedef struct playlist_private_t
     bool     b_tree; /**< Display as a tree */
     bool     b_doing_ml; /**< Doing media library stuff  get quicker */
     bool     b_auto_preparse;
+    bool     b_cant_sleep;
 } playlist_private_t;
 
 #define pl_priv( pl ) ((playlist_private_t *)(pl))
diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index d030a1d..5ac497f 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -120,7 +120,7 @@ static void* RunControlThread ( vlc_object_t *p_this )
         if( !vlc_object_alive( p_playlist ) )
             break;
 
-        if( p_playlist->b_cant_sleep )
+        if( pl_priv(p_playlist)->b_cant_sleep )
         {
             /* 100 ms is an acceptable delay for playlist operations */
             vlc_object_unlock( p_playlist );




More information about the vlc-devel mailing list