Commit b070df41 authored by Gildas Bazin's avatar Gildas Bazin

* src/video_output/vout_intf.c: added a video-snapshot object variable.

* modules/gui/wxwindows/menus.cpp: added video-snapshot to the menus.
parent 65d40ed4
......@@ -208,6 +208,8 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "directx-wallpaper";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "video-snapshot";
pi_objects[i++] = p_object->i_object_id;
p_dec_obj = (vlc_object_t *)vlc_object_find( p_object,
VLC_OBJECT_DECODER,
......@@ -396,6 +398,8 @@ wxMenu *VideoMenu( intf_thread_t *_p_intf, wxWindow *p_parent, wxMenu *p_menu )
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "directx-wallpaper";
pi_objects[i++] = p_object->i_object_id;
ppsz_varnames[i] = "video-snapshot";
pi_objects[i++] = p_object->i_object_id;
p_dec_obj = (vlc_object_t *)vlc_object_find( p_object,
VLC_OBJECT_DECODER,
......
......@@ -45,6 +45,8 @@ static int OnTopCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int FullscreenCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int SnapshotCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
/*****************************************************************************
* vout_RequestWindow: Create/Get a video window if possible.
......@@ -229,6 +231,12 @@ void vout_IntfInit( vout_thread_t *p_vout )
}
var_AddCallback( p_vout, "fullscreen", FullscreenCallback, NULL );
/* Add a snapshot variable */
var_Create( p_vout, "video-snapshot", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
text.psz_string = _("Snapshot");
var_Change( p_vout, "video-snapshot", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "video-snapshot", SnapshotCallback, NULL );
/* Mouse coordinates */
var_Create( p_vout, "mouse-x", VLC_VAR_INTEGER );
var_Create( p_vout, "mouse-y", VLC_VAR_INTEGER );
......@@ -419,3 +427,11 @@ static int FullscreenCallback( vlc_object_t *p_this, char const *psz_cmd,
var_Set( p_vout, "intf-change", val );
return VLC_SUCCESS;
}
static int SnapshotCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
vout_Control( p_vout, VOUT_SNAPSHOT );
return VLC_SUCCESS;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment