summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-15 17:47:13 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2013-01-17 19:03:21 +0100
commitea3905fa148b6be76450ab45734687e8ff84a450 (patch)
tree96dc02848548a2e0c22e75a90a1e17dc98498cd1
parent319f87f142ec49677b4e22aeec07468a2ab4eeae (diff)
downloadgst-vaapi-ea3905fa148b6be76450ab45734687e8ff84a450.tar.gz
tests: allow fullscreen mode.
Add new --fullscreen|-f option to create new windows in fullscreen mode.
-rw-r--r--tests/output.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/output.c b/tests/output.c
index 438c04c0..a1b427f4 100644
--- a/tests/output.c
+++ b/tests/output.c
@@ -72,6 +72,7 @@ static const VideoOutputInfo g_video_outputs[] = {
static gchar *g_output_name;
static gboolean g_list_outputs = FALSE;
+static gboolean g_fullscreen = FALSE;
static GOptionEntry g_options[] = {
{ "list-outputs", 0,
@@ -82,6 +83,10 @@ static GOptionEntry g_options[] = {
0,
G_OPTION_ARG_STRING, &g_output_name,
"video output name", NULL },
+ { "fullscreen", 'f',
+ 0,
+ G_OPTION_ARG_NONE, &g_fullscreen,
+ "fullscreen mode", NULL },
{ NULL, }
};
@@ -181,7 +186,17 @@ video_output_create_display(const gchar *display_name)
GstVaapiWindow *
video_output_create_window(GstVaapiDisplay *display, guint width, guint height)
{
+ GstVaapiWindow *window;
+
if (!g_video_output)
return NULL;
- return g_video_output->create_window(display, width, height);
+
+ window = g_video_output->create_window(display, width, height);
+ if (!window)
+ return NULL;
+
+ /* Force fullscreen mode, should this be requested by the user */
+ if (g_fullscreen)
+ gst_vaapi_window_set_fullscreen(window, TRUE);
+ return window;
}