PLAYLIST_PLAY, /**< No arg. res=can fail*/
PLAYLIST_VIEWPLAY, /**< arg1= playlist_item_t*,*/
/** arg2 = playlist_item_t* , res=can fail */
- PLAYLIST_PAUSE, /**< No arg res=can fail*/
+ PLAYLIST_TOGGLE_PAUSE, /**< No arg res=can fail */
PLAYLIST_STOP, /**< No arg res=can fail*/
PLAYLIST_SKIP, /**< arg1=int, res=can fail*/
};
#define playlist_Play(p) playlist_Control(p,PLAYLIST_PLAY, pl_Unlocked )
-#define playlist_Pause(p) playlist_Control(p,PLAYLIST_PAUSE, pl_Unlocked )
+#define playlist_TogglePause(p) \
+ playlist_Control(p, PLAYLIST_TOGGLE_PAUSE, pl_Unlocked)
#define playlist_Stop(p) playlist_Control(p,PLAYLIST_STOP, pl_Unlocked )
#define playlist_Next(p) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, 1)
#define playlist_Prev(p) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, -1)
input_thread_t *p_input = pl_CurrentInput( p_this );
if( p_input && var_GetInteger(p_input, "state") == PLAYING_S )
- playlist_Pause( PL );
+ playlist_TogglePause( PL );
if( p_input )
vlc_object_release( p_input );
input_thread_t *p_input = pl_CurrentInput( p_this );
if( p_input && var_GetInteger(p_input, "state") == PLAYING_S )
- playlist_Pause( PL );
+ playlist_TogglePause( PL );
else
playlist_Play( PL );
int state = var_GetInteger( p_input, "state" );
DisplayIcon( p_vout, state != PAUSE_S ? OSD_PAUSE_ICON : OSD_PLAY_ICON );
- playlist_Pause( p_playlist );
+ playlist_TogglePause( p_playlist );
}
else
playlist_Play( p_playlist );
/* Parse commands that only require an input */
if( !strcmp( psz_cmd, "pause" ) )
{
- playlist_Pause( p_intf->p_sys->p_playlist );
+ playlist_TogglePause( p_intf->p_sys->p_playlist );
i_error = VLC_SUCCESS;
}
else if( !strcmp( psz_cmd, "seek" ) )
playlist_t * p_playlist = pl_Get(VLCIntf);
if (p_input) {
- playlist_Pause(p_playlist);
+ playlist_TogglePause(p_playlist);
vlc_object_release(p_input);
} else {
bool empty;
PL_UNLOCK;
if (b_playlist_playing)
- playlist_Pause(p_playlist);
+ playlist_TogglePause(p_playlist);
}
- (void)stop
if( !p_input )
playlist_Play( THEPL );
else
- playlist_Pause( THEPL );
+ playlist_TogglePause( THEPL );
}
void MainInputManager::play()
{
if( PLAYING_S != var_GetInteger( p_input, "state" ) )
{
- playlist_Pause( THEPL );
+ playlist_TogglePause( THEPL );
}
}
}
{
if(p_input && PLAYING_S == var_GetInteger( p_input, "state" ) )
{
- playlist_Pause( THEPL );
+ playlist_TogglePause( THEPL );
}
}
{
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist != NULL )
- playlist_Pause( pPlaylist );
+ playlist_TogglePause( pPlaylist );
}
static int vlclua_playlist_pause( lua_State * L )
{
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
- playlist_Pause( p_playlist );
+ playlist_TogglePause( p_playlist );
return 0;
}
}
break;
- case PLAYLIST_PAUSE:
+ case PLAYLIST_TOGGLE_PAUSE:
if( !pl_priv(p_playlist)->p_input )
{ /* FIXME: is this really useful without input? */
pl_priv(p_playlist)->status.i_status = PLAYLIST_PAUSED;
if( var_InheritBool( obj, "playlist-cork" ) )
{
msg_Dbg( obj, "corked" );
- playlist_Pause( pl );
+ playlist_TogglePause( pl );
}
else
msg_Dbg( obj, "not corked" );