Commit 5539b7b7 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: b_cant_sleep is private.

parent 09995291
......@@ -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 */
......
......@@ -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 -
......
......@@ -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))
......
......@@ -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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment