void Interface::PlayStream()
{
wxCommandEvent dummy;
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
- if( !playlist_IsEmpty(p_playlist) && p_playlist->i_enabled )
+ if( !playlist_IsEmpty(p_playlist) )
{
vlc_value_t state;
{
/* No stream was playing, start one */
playlist_Play( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
input_manager->Update();
return;
}
var_Set( p_input, "state", state );
vlc_object_release( p_input );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
input_manager->Update();
}
else
{
/* If the playlist is empty, open a file requester instead */
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
OnShowDialog( dummy );
GetToolBar()->ToggleTool( PlayStream_Event, false );
}
}
void Interface::StopStream()
{
- playlist_t * p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL )
{
return;
}
playlist_Stop( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
input_manager->Update();
}
void Interface::PrevStream()
{
- playlist_t * p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL )
{
return;
}
playlist_Prev( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
void Interface::NextStream()
{
- playlist_t * p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t * p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL )
{
return;
}
playlist_Next( p_playlist );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
}
void Interface::OnSlowStream( wxCommandEvent& WXUNUSED(event) )
const wxArrayString& filenames )
{
/* Add dropped files to the playlist */
-
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL )
{
return FALSE;
{
vlc_object_release( p_input );
wxDnDLocaleFree( psz_utf8 );
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
return TRUE;
}
vlc_object_release( p_input );
wxDnDLocaleFree( psz_utf8 );
}
-
- vlc_object_release( p_playlist );
+ pl_Release( p_playlist );
return TRUE;
}