[vlc-devel] commit: playlist: gc_date 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:45:51 2008 +0200| [2f4258d6fc05ba948b1f6f60a786b306db32d1c0] | committer: Pierre d'Herbemont 

playlist: gc_date is private.

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

 include/vlc_playlist.h           |    1 -
 src/playlist/engine.c            |   10 +++++-----
 src/playlist/playlist_internal.h |    1 +
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index fed8239..12f32ef 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -180,7 +180,6 @@ struct playlist_t
     /* Runtime */
     int                   i_sort; /**< Last sorting applied to the playlist */
     int                   i_order; /**< Last ordering applied to the playlist */
-    mtime_t               gc_date;
 };
 
 /** Helper to add an item */
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 046521d..2129229 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -82,7 +82,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
     p_playlist->i_last_playlist_id = 0;
     pl_priv(p_playlist)->p_input = NULL;
 
-    p_playlist->gc_date = 0;
+    pl_priv(p_playlist)->gc_date = 0;
     pl_priv(p_playlist)->b_cant_sleep = false;
 
     ARRAY_INIT( p_playlist->items );
@@ -215,12 +215,12 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force )
 {
     if( !b_force )
     {
-        if( mdate() - p_playlist->gc_date < 1000000 )
+        if( mdate() - pl_priv(p_playlist)->gc_date < 1000000 )
         {
            pl_priv(p_playlist)->b_cant_sleep = true;
             return;
         }
-        else if( p_playlist->gc_date == 0 )
+        else if( pl_priv(p_playlist)->gc_date == 0 )
             return;
     }
 
@@ -241,7 +241,7 @@ static void input_selected_stream_changed( const vlc_event_t * event, void * dat
     (void)event;
     playlist_t * p_playlist = data;
     PL_LOCK;
-    p_playlist->gc_date = mdate();
+    pl_priv(p_playlist)->gc_date = mdate();
     vlc_object_signal_unlocked( p_playlist );
     PL_UNLOCK;
 }
@@ -402,7 +402,7 @@ check_input:
             /* Destroy input */
             playlist_release_current_input( p_playlist );
 
-            p_playlist->gc_date = mdate();
+            pl_priv(p_playlist)->gc_date = mdate();
             pl_priv(p_playlist)->b_cant_sleep = true;
 
             i_activity= var_GetInteger( p_playlist, "activity" );
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 3ea010f..e9601a1 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -105,6 +105,7 @@ typedef struct playlist_private_t
     bool     b_doing_ml; /**< Doing media library stuff  get quicker */
     bool     b_auto_preparse;
     bool     b_cant_sleep;
+    mtime_t  gc_date;
 } playlist_private_t;
 
 #define pl_priv( pl ) ((playlist_private_t *)(pl))




More information about the vlc-devel mailing list