]> git.sesse.net Git - vlc/commitdiff
playlist: b_cant_sleep is private.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 28 Sep 2008 14:44:17 +0000 (16:44 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 28 Sep 2008 15:10:00 +0000 (17:10 +0200)
include/vlc_playlist.h
src/playlist/engine.c
src/playlist/playlist_internal.h
src/playlist/thread.c

index 29b79c18f8c16fd8a131871a687d7d184f5ef0d4..fed823983946812bf26bd2647d6086a62c902e0e 100644 (file)
@@ -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 */
index ed041c7cb28010f86ad047047874db2cfc4bc170..046521daf1e83a7cda1ba534f0520bd0a4fde641 100644 (file)
@@ -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 -
index 8a17401f19ee880ec06e14feac197bd5e21a88dd..3ea010f2f2258e038d043c4884f1beb09bfba6d4 100644 (file)
@@ -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))
index d030a1d9f19921e31850ca4bf3e1899eaf6ef15c..5ac497f5085503f9add7d70914b301bfe2f66f56 100644 (file)
@@ -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 );