[vlc-devel] commit: playlist: b_reset_currently_playing 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 17:00:30 2008 +0200| [76c03d8c60bdce1def93685cc3d3a187c802dfb6] | committer: Pierre d'Herbemont
playlist: b_reset_currently_playing is private.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=76c03d8c60bdce1def93685cc3d3a187c802dfb6
---
include/vlc_playlist.h | 2 --
src/playlist/control.c | 10 +++++-----
src/playlist/engine.c | 6 +++---
src/playlist/item.c | 8 ++++----
src/playlist/playlist_internal.h | 1 +
src/playlist/search.c | 2 +-
6 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 2a85c39..93d9b75 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -163,8 +163,6 @@ struct playlist_t
playlist_item_array_t current; /**< Items currently being played */
int i_current_index; /**< Index in current array */
- /** Reset current item array */
- bool b_reset_currently_playing;
int i_last_playlist_id; /**< Last id to an item */
diff --git a/src/playlist/control.c b/src/playlist/control.c
index 7a70513..88985c0 100644
--- a/src/playlist/control.c
+++ b/src/playlist/control.c
@@ -118,7 +118,7 @@ static int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args
pl_priv(p_playlist)->request.p_node = p_node;
pl_priv(p_playlist)->request.p_item = p_item;
if( p_item && var_GetBool( p_playlist, "random" ) )
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
break;
case PLAYLIST_PLAY:
@@ -325,7 +325,7 @@ void ResetCurrentlyPlaying( playlist_t *p_playlist, bool b_random,
ARRAY_VAL(p_playlist->current,j) = p_tmp;
}
}
- p_playlist->b_reset_currently_playing = false;
+ pl_priv(p_playlist)->b_reset_currently_playing = false;
stats_TimerStop( p_playlist, STATS_TIMER_PLAYLIST_BUILD );
}
@@ -397,7 +397,7 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
set_current_status_node( p_playlist, pl_priv(p_playlist)->request.p_node );
pl_priv(p_playlist)->request.p_node = NULL;
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
}
/* If we are asked for a node, go to it's first child */
@@ -418,7 +418,7 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
}
}
- if( p_playlist->b_reset_currently_playing )
+ if( pl_priv(p_playlist)->b_reset_currently_playing )
/* A bit too bad to reset twice ... */
ResetCurrentlyPlaying( p_playlist, b_random, p_new );
else if( p_new )
@@ -469,7 +469,7 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
get_current_status_item( p_playlist )->i_flags & PLAYLIST_SKIP_FLAG )
return NULL;
- if( p_playlist->b_reset_currently_playing )
+ if( pl_priv(p_playlist)->b_reset_currently_playing )
ResetCurrentlyPlaying( p_playlist, b_random,
get_current_status_item( p_playlist ) );
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 2d80666..675f8dd 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -45,7 +45,7 @@ static int RandomCallback( vlc_object_t *p_this, char const *psz_cmd,
{
(void)psz_cmd; (void)oldval; (void)newval; (void)a;
- ((playlist_t*)p_this)->b_reset_currently_playing = true;
+ pl_priv((playlist_t*)p_this)->b_reset_currently_playing = true;
playlist_Signal( ((playlist_t*)p_this) );
return VLC_SUCCESS;
}
@@ -91,7 +91,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
ARRAY_INIT( p_playlist->current );
p_playlist->i_current_index = 0;
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
pl_priv(p_playlist)->last_rebuild_date = 0;
pl_priv(p_playlist)->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
@@ -362,7 +362,7 @@ void playlist_MainLoop( playlist_t *p_playlist )
PL_ASSERT_LOCKED;
- if( p_playlist->b_reset_currently_playing &&
+ if( pl_priv(p_playlist)->b_reset_currently_playing &&
mdate() - pl_priv(p_playlist)->last_rebuild_date > 30000 ) // 30 ms
{
ResetCurrentlyPlaying( p_playlist, var_GetBool( p_playlist, "random" ),
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 492ec3a..950d82c 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -632,7 +632,7 @@ playlist_item_t *playlist_ItemToNode( playlist_t *p_playlist,
DeleteFromInput( p_playlist, p_item_in_one->p_input->i_id,
p_playlist->p_root_onelevel, false );
}
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
vlc_object_signal_unlocked( p_playlist );
var_SetInteger( p_playlist, "item-change", p_item_in_category->
p_input->i_id );
@@ -769,7 +769,7 @@ int playlist_TreeMove( playlist_t * p_playlist, playlist_item_t *p_item,
}
else
i_ret = TreeMove( p_playlist, p_item, p_node, i_newpos );
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
vlc_object_signal_unlocked( p_playlist );
return i_ret;
}
@@ -796,7 +796,7 @@ void playlist_SendAddNotify( playlist_t *p_playlist, int i_item_id,
p_add->i_item = i_item_id;
p_add->i_node = i_node_id;
val.p_address = p_add;
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
if( b_signal )
vlc_object_signal_unlocked( p_playlist );
@@ -919,7 +919,7 @@ static int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
{
return playlist_NodeDelete( p_playlist, p_item, true, false );
}
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
var_SetInteger( p_playlist, "item-deleted", i_id );
/* Remove the item from the bank */
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index bc8469a..51c2e75 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -107,6 +107,7 @@ typedef struct playlist_private_t
bool b_cant_sleep;
mtime_t gc_date;
mtime_t last_rebuild_date;
+ bool b_reset_currently_playing; /** Reset current item array */
} playlist_private_t;
diff --git a/src/playlist/search.c b/src/playlist/search.c
index 6f81a3d..7c731fc 100644
--- a/src/playlist/search.c
+++ b/src/playlist/search.c
@@ -170,7 +170,7 @@ int playlist_LiveSearchUpdate( playlist_t *p_playlist, playlist_item_t *p_root,
const char *psz_string )
{
PL_ASSERT_LOCKED;
- p_playlist->b_reset_currently_playing = true;
+ pl_priv(p_playlist)->b_reset_currently_playing = true;
playlist_LiveSearchUpdateInternal( p_playlist, p_root, psz_string );
vlc_object_signal_unlocked( p_playlist );
return VLC_SUCCESS;
More information about the vlc-devel
mailing list