mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
tests: allow fullscreen mode.
Add new --fullscreen|-f option to create new windows in fullscreen mode.
This commit is contained in:
parent
319f87f142
commit
ea3905fa14
1 changed files with 16 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue