#define __STDC_CONSTANT_MACROS 1
#include <inttypes.h>
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_aout.h>
#include <vlc_vout.h>
#include <vlc_interface.h>
+#include <vlc_input.h>
+#include <vlc_playlist.h>
#include "wince.h"
+#define INT64_C(val) val##LL
#include <windowsx.h>
#include <commctrl.h>
{
string about = (string)"VLC media player " PACKAGE_VERSION +
_("\n(WinCE interface)\n\n") +
- _("(c) 1996-2006 - the VideoLAN Team\n\n") +
+ _("(c) 1996-2008 - the VideoLAN Team\n\n") +
_("Compiled by ") + VLC_CompileBy() + "@" +
VLC_CompileHost() + "." + VLC_CompileDomain() + ".\n" +
_("Compiler: ") + VLC_Compiler() + ".\n" +
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 )
+ if( !playlist_IsEmpty(p_playlist) )
{
vlc_value_t state;
/* No stream was playing, start one */
playlist_Play( p_playlist );
TogglePlayButton( PLAYING_S );
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
return;
}
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 )
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 )