mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Add gst_vaapi_window_get_fullscreen() helper and "fullscreen" property.
This commit is contained in:
parent
cc10345448
commit
8e773e6d10
3 changed files with 38 additions and 1 deletions
|
@ -166,8 +166,10 @@ GstVaapiRectangle
|
||||||
<TITLE>GstVaapiWindow</TITLE>
|
<TITLE>GstVaapiWindow</TITLE>
|
||||||
GstVaapiWindow
|
GstVaapiWindow
|
||||||
GstVaapiWindowClass
|
GstVaapiWindowClass
|
||||||
|
gst_vaapi_window_get_display
|
||||||
gst_vaapi_window_show
|
gst_vaapi_window_show
|
||||||
gst_vaapi_window_hide
|
gst_vaapi_window_hide
|
||||||
|
gst_vaapi_window_get_fullscreen
|
||||||
gst_vaapi_window_set_fullscreen
|
gst_vaapi_window_set_fullscreen
|
||||||
gst_vaapi_window_get_width
|
gst_vaapi_window_get_width
|
||||||
gst_vaapi_window_get_height
|
gst_vaapi_window_get_height
|
||||||
|
|
|
@ -49,7 +49,8 @@ enum {
|
||||||
|
|
||||||
PROP_DISPLAY,
|
PROP_DISPLAY,
|
||||||
PROP_WIDTH,
|
PROP_WIDTH,
|
||||||
PROP_HEIGHT
|
PROP_HEIGHT,
|
||||||
|
PROP_FULLSCREEN
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -113,6 +114,9 @@ gst_vaapi_window_set_property(
|
||||||
case PROP_HEIGHT:
|
case PROP_HEIGHT:
|
||||||
gst_vaapi_window_set_height(window, g_value_get_uint(value));
|
gst_vaapi_window_set_height(window, g_value_get_uint(value));
|
||||||
break;
|
break;
|
||||||
|
case PROP_FULLSCREEN:
|
||||||
|
gst_vaapi_window_set_fullscreen(window, g_value_get_boolean(value));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -139,6 +143,9 @@ gst_vaapi_window_get_property(
|
||||||
case PROP_HEIGHT:
|
case PROP_HEIGHT:
|
||||||
g_value_set_uint(value, gst_vaapi_window_get_height(window));
|
g_value_set_uint(value, gst_vaapi_window_get_height(window));
|
||||||
break;
|
break;
|
||||||
|
case PROP_FULLSCREEN:
|
||||||
|
g_value_set_boolean(value, window->priv->is_fullscreen);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -201,6 +208,15 @@ gst_vaapi_window_class_init(GstVaapiWindowClass *klass)
|
||||||
"The window height",
|
"The window height",
|
||||||
1, G_MAXUINT32, 1,
|
1, G_MAXUINT32, 1,
|
||||||
G_PARAM_READWRITE));
|
G_PARAM_READWRITE));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(object_class,
|
||||||
|
PROP_FULLSCREEN,
|
||||||
|
g_param_spec_boolean("fullscreen",
|
||||||
|
"Fullscreen",
|
||||||
|
"The fullscreen state of the window",
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READWRITE));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -264,6 +280,22 @@ gst_vaapi_window_hide(GstVaapiWindow *window)
|
||||||
GST_VAAPI_WINDOW_GET_CLASS(window)->hide(window);
|
GST_VAAPI_WINDOW_GET_CLASS(window)->hide(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_vaapi_window_get_fullscreen:
|
||||||
|
* @window: a #GstVaapiWindow
|
||||||
|
*
|
||||||
|
* Retrieves whether the @window is fullscreen or not
|
||||||
|
*
|
||||||
|
* Return value: %TRUE if the window is fullscreen
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gst_vaapi_window_get_fullscreen(GstVaapiWindow *window)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail(GST_VAAPI_IS_WINDOW(window), FALSE);
|
||||||
|
|
||||||
|
return window->priv->is_fullscreen;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_vaapi_window_set_fullscreen:
|
* gst_vaapi_window_set_fullscreen:
|
||||||
* @window: a #GstVaapiWindow
|
* @window: a #GstVaapiWindow
|
||||||
|
|
|
@ -110,6 +110,9 @@ gst_vaapi_window_show(GstVaapiWindow *window);
|
||||||
void
|
void
|
||||||
gst_vaapi_window_hide(GstVaapiWindow *window);
|
gst_vaapi_window_hide(GstVaapiWindow *window);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_vaapi_window_get_fullscreen(GstVaapiWindow *window);
|
||||||
|
|
||||||
void
|
void
|
||||||
gst_vaapi_window_set_fullscreen(GstVaapiWindow *window, gboolean fullscreen);
|
gst_vaapi_window_set_fullscreen(GstVaapiWindow *window, gboolean fullscreen);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue