mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +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>
|
||||
GstVaapiWindow
|
||||
GstVaapiWindowClass
|
||||
gst_vaapi_window_get_display
|
||||
gst_vaapi_window_show
|
||||
gst_vaapi_window_hide
|
||||
gst_vaapi_window_get_fullscreen
|
||||
gst_vaapi_window_set_fullscreen
|
||||
gst_vaapi_window_get_width
|
||||
gst_vaapi_window_get_height
|
||||
|
|
|
@ -49,7 +49,8 @@ enum {
|
|||
|
||||
PROP_DISPLAY,
|
||||
PROP_WIDTH,
|
||||
PROP_HEIGHT
|
||||
PROP_HEIGHT,
|
||||
PROP_FULLSCREEN
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -113,6 +114,9 @@ gst_vaapi_window_set_property(
|
|||
case PROP_HEIGHT:
|
||||
gst_vaapi_window_set_height(window, g_value_get_uint(value));
|
||||
break;
|
||||
case PROP_FULLSCREEN:
|
||||
gst_vaapi_window_set_fullscreen(window, g_value_get_boolean(value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -139,6 +143,9 @@ gst_vaapi_window_get_property(
|
|||
case PROP_HEIGHT:
|
||||
g_value_set_uint(value, gst_vaapi_window_get_height(window));
|
||||
break;
|
||||
case PROP_FULLSCREEN:
|
||||
g_value_set_boolean(value, window->priv->is_fullscreen);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -201,6 +208,15 @@ gst_vaapi_window_class_init(GstVaapiWindowClass *klass)
|
|||
"The window height",
|
||||
1, G_MAXUINT32, 1,
|
||||
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
|
||||
|
@ -264,6 +280,22 @@ gst_vaapi_window_hide(GstVaapiWindow *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:
|
||||
* @window: a #GstVaapiWindow
|
||||
|
|
|
@ -110,6 +110,9 @@ gst_vaapi_window_show(GstVaapiWindow *window);
|
|||
void
|
||||
gst_vaapi_window_hide(GstVaapiWindow *window);
|
||||
|
||||
gboolean
|
||||
gst_vaapi_window_get_fullscreen(GstVaapiWindow *window);
|
||||
|
||||
void
|
||||
gst_vaapi_window_set_fullscreen(GstVaapiWindow *window, gboolean fullscreen);
|
||||
|
||||
|
|
Loading…
Reference in a new issue