# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_interface.h>
#include <vlc_vout.h>
#define BUTTON_LONGTEXT N_( \
"Trigger button for mouse gestures." )
-static const char *button_list[] = { "left", "middle", "right" };
-static const char *button_list_text[] =
+static const char *const button_list[] = { "left", "middle", "right" };
+static const char *const button_list_text[] =
{ N_("Left"), N_("Middle"), N_("Right") };
vlc_module_begin();
case GESTURE(RIGHT,LEFT,NONE,NONE):
{
input_thread_t * p_input;
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
-
- if( !p_playlist )
- break;
+ p_playlist = pl_Yield( p_intf );
p_input = input_from_playlist( p_playlist );
vlc_object_release( p_playlist );
}
break;
case GESTURE(LEFT,DOWN,NONE,NONE):
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist == NULL )
- {
- break;
- }
+ p_playlist = pl_Yield( p_intf );
playlist_Prev( p_playlist );
vlc_object_release( p_playlist );
break;
case GESTURE(RIGHT,DOWN,NONE,NONE):
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist == NULL )
- {
- break;
- }
+ p_playlist = pl_Yield( p_intf );
playlist_Next( p_playlist );
vlc_object_release( p_playlist );
vlc_value_t val, list, list2;
int i_count, i;
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
-
- if( !p_playlist )
- break;
+ p_playlist = pl_Yield( p_intf );
p_input = input_from_playlist( p_playlist );
vlc_value_t val, list, list2;
int i_count, i;
- p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
-
- if( !p_playlist )
- break;
+ p_playlist = pl_Yield( p_intf );
p_input = input_from_playlist( p_playlist );
vlc_object_release( p_playlist );
/*
* video output
*/
- if( p_intf->p_sys->p_vout && p_intf->p_sys->p_vout->b_die )
+ if( p_intf->p_sys->p_vout && !vlc_object_alive (p_intf->p_sys->p_vout) )
{
var_DelCallback( p_intf->p_sys->p_vout, "mouse-moved",
MouseEvent, p_intf );