X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fwince%2Finterface.cpp;h=d9c1463f221aa79b387df38c7a50875cbe6fe6e3;hb=415ada5a217873f17211bb7b3d96ce45d6d67263;hp=13e8aad20e112111e01094ab948af24fe7a7e3b2;hpb=d1d3dc1d109110bf68cb048c429f6f05a3839200;p=vlc diff --git a/modules/gui/wince/interface.cpp b/modules/gui/wince/interface.cpp index 13e8aad20e..d9c1463f22 100644 --- a/modules/gui/wince/interface.cpp +++ b/modules/gui/wince/interface.cpp @@ -33,7 +33,7 @@ #define __STDC_CONSTANT_MACROS 1 #include -#include +#include #include #include #include @@ -637,8 +637,7 @@ void Interface::OnShowDialog( int i_dialog_event ) void Interface::OnPlayStream( void ) { - 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( p_playlist->i_size ) @@ -653,7 +652,7 @@ void Interface::OnPlayStream( void ) /* No stream was playing, start one */ playlist_Play( p_playlist ); TogglePlayButton( PLAYING_S ); - vlc_object_release( p_playlist ); + pl_Release( p_intf ); return; } @@ -673,14 +672,13 @@ void Interface::OnPlayStream( void ) TogglePlayButton( state.i_int ); vlc_object_release( p_input ); - vlc_object_release( p_playlist ); } else { /* If the playlist is empty, open a file requester instead */ - vlc_object_release( p_playlist ); OnShowDialog( ID_FILE_QUICKOPEN ); } + pl_Release( p_intf ); } void Interface::TogglePlayButton( int i_playing_status ) @@ -812,33 +810,30 @@ void Interface::VolumeUpdate() void Interface::OnStopStream( void ) { - 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 ); TogglePlayButton( PAUSE_S ); - vlc_object_release( p_playlist ); + pl_Release( p_intf ); } void Interface::OnPrevStream( void ) { - 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_intf ); } void Interface::OnNextStream( void ) { - 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_intf ); } void Interface::OnSlowStream( void )