Commit 8fed9f21 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

playlist: remove request.i_status

parent 52260420
...@@ -60,9 +60,9 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg ...@@ -60,9 +60,9 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
switch( i_query ) switch( i_query )
{ {
case PLAYLIST_STOP: case PLAYLIST_STOP:
pl_priv(p_playlist)->request.i_status = PLAYLIST_STOPPED;
pl_priv(p_playlist)->request.b_request = true; pl_priv(p_playlist)->request.b_request = true;
pl_priv(p_playlist)->request.p_item = NULL; pl_priv(p_playlist)->request.p_item = NULL;
pl_priv(p_playlist)->request.p_node = NULL;
break; break;
// Node can be null, it will keep the same. Use with care ... // Node can be null, it will keep the same. Use with care ...
...@@ -77,7 +77,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg ...@@ -77,7 +77,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
p_node = get_current_status_node( p_playlist ); p_node = get_current_status_node( p_playlist );
assert( p_node ); assert( p_node );
} }
pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;
pl_priv(p_playlist)->request.i_skip = 0; pl_priv(p_playlist)->request.i_skip = 0;
pl_priv(p_playlist)->request.b_request = true; pl_priv(p_playlist)->request.b_request = true;
pl_priv(p_playlist)->request.p_node = p_node; pl_priv(p_playlist)->request.p_node = p_node;
...@@ -96,7 +95,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg ...@@ -96,7 +95,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
} }
else else
{ {
pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;
pl_priv(p_playlist)->request.b_request = true; pl_priv(p_playlist)->request.b_request = true;
pl_priv(p_playlist)->request.p_node = get_current_status_node( p_playlist ); pl_priv(p_playlist)->request.p_node = get_current_status_node( p_playlist );
pl_priv(p_playlist)->request.p_item = get_current_status_item( p_playlist ); pl_priv(p_playlist)->request.p_item = get_current_status_item( p_playlist );
...@@ -128,9 +126,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg ...@@ -128,9 +126,6 @@ static void playlist_vaControl( playlist_t *p_playlist, int i_query, va_list arg
pl_priv(p_playlist)->request.p_node = get_current_status_node( p_playlist ); pl_priv(p_playlist)->request.p_node = get_current_status_node( p_playlist );
pl_priv(p_playlist)->request.p_item = get_current_status_item( p_playlist ); pl_priv(p_playlist)->request.p_item = get_current_status_item( p_playlist );
pl_priv(p_playlist)->request.i_skip = (int) va_arg( args, int ); pl_priv(p_playlist)->request.i_skip = (int) va_arg( args, int );
/* if already running, keep running */
if( pl_priv(p_playlist)->status.i_status != PLAYLIST_STOPPED )
pl_priv(p_playlist)->request.i_status = pl_priv(p_playlist)->status.i_status;
pl_priv(p_playlist)->request.b_request = true; pl_priv(p_playlist)->request.b_request = true;
break; break;
} }
......
...@@ -756,7 +756,6 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode, ...@@ -756,7 +756,6 @@ static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
sys->request.p_item = p_item; sys->request.p_item = p_item;
if( sys->p_input != NULL ) if( sys->p_input != NULL )
input_Stop( sys->p_input, true ); input_Stop( sys->p_input, true );
sys->request.i_status = PLAYLIST_RUNNING;
vlc_cond_signal( &sys->signal ); vlc_cond_signal( &sys->signal );
} }
/* Preparse if no artist/album info, and hasn't been preparsed allready /* Preparse if no artist/album info, and hasn't been preparsed allready
......
...@@ -68,7 +68,6 @@ typedef struct playlist_private_t ...@@ -68,7 +68,6 @@ typedef struct playlist_private_t
struct { struct {
/* Request. Use this to give orders to the playlist main loop */ /* Request. Use this to give orders to the playlist main loop */
playlist_status_t i_status; /**< requested playlist status */
playlist_item_t * p_node; /**< requested node to play from */ playlist_item_t * p_node; /**< requested node to play from */
playlist_item_t * p_item; /**< requested item to play in the node */ playlist_item_t * p_item; /**< requested item to play in the node */
......
...@@ -523,8 +523,10 @@ static void *Thread ( void *data ) ...@@ -523,8 +523,10 @@ static void *Thread ( void *data )
if( p_sys->killed ) if( p_sys->killed )
break; /* THE END */ break; /* THE END */
const int status = p_sys->request.b_request ? int status = p_sys->status.i_status;
p_sys->request.i_status : p_sys->status.i_status; if( p_sys->request.b_request )
status = (p_sys->request.p_item || p_sys->request.p_node)
? PLAYLIST_RUNNING : PLAYLIST_STOPPED;
/* Destroy any video display if the playlist is supposed to stop */ /* Destroy any video display if the playlist is supposed to stop */
if( status == PLAYLIST_STOPPED if( status == PLAYLIST_STOPPED
......
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