[vlc-devel] commit: playlist: last_rebuild_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:50:42 2008 +0200| [75f1d9dbef9df71e9e166743e9e28f86c71f65f5] | committer: Pierre d'Herbemont 

playlist: last_rebuild_date is private.

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

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

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index cbb6c15..2a85c39 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -165,7 +165,6 @@ struct playlist_t
     int                   i_current_index; /**< Index in current array */
     /** Reset current item array */
     bool            b_reset_currently_playing;
-    mtime_t               last_rebuild_date;
 
     int                   i_last_playlist_id; /**< Last id to an item */
 
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 9205ded..2d80666 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -92,7 +92,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
 
     p_playlist->i_current_index = 0;
     p_playlist->b_reset_currently_playing = true;
-    p_playlist->last_rebuild_date = 0;
+    pl_priv(p_playlist)->last_rebuild_date = 0;
 
     pl_priv(p_playlist)->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
 
@@ -363,11 +363,11 @@ void playlist_MainLoop( playlist_t *p_playlist )
     PL_ASSERT_LOCKED;
 
     if( p_playlist->b_reset_currently_playing &&
-        mdate() - p_playlist->last_rebuild_date > 30000 ) // 30 ms
+        mdate() - pl_priv(p_playlist)->last_rebuild_date > 30000 ) // 30 ms
     {
         ResetCurrentlyPlaying( p_playlist, var_GetBool( p_playlist, "random" ),
                                get_current_status_item( p_playlist ) );
-        p_playlist->last_rebuild_date = mdate();
+        pl_priv(p_playlist)->last_rebuild_date = mdate();
     }
 
 check_input:
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index e9601a1..bc8469a 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -106,6 +106,8 @@ typedef struct playlist_private_t
     bool     b_auto_preparse;
     bool     b_cant_sleep;
     mtime_t  gc_date;
+    mtime_t  last_rebuild_date;
+
 } playlist_private_t;
 
 #define pl_priv( pl ) ((playlist_private_t *)(pl))




More information about the vlc-devel mailing list