mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
xvimagesink: Add read-only properties window-width and window-height
This commit is contained in:
parent
2ad9966163
commit
72d6f7f4d6
1 changed files with 25 additions and 1 deletions
|
@ -186,7 +186,9 @@ enum
|
|||
ARG_DOUBLE_BUFFER,
|
||||
ARG_AUTOPAINT_COLORKEY,
|
||||
ARG_COLORKEY,
|
||||
ARG_DRAW_BORDERS
|
||||
ARG_DRAW_BORDERS,
|
||||
ARG_WINDOW_WIDTH,
|
||||
ARG_WINDOW_HEIGHT
|
||||
};
|
||||
|
||||
static GstVideoSinkClass *parent_class = NULL;
|
||||
|
@ -3362,6 +3364,18 @@ gst_xvimagesink_get_property (GObject * object, guint prop_id,
|
|||
case ARG_DRAW_BORDERS:
|
||||
g_value_set_boolean (value, xvimagesink->draw_borders);
|
||||
break;
|
||||
case ARG_WINDOW_WIDTH:
|
||||
if (xvimagesink->xwindow)
|
||||
g_value_set_uint64 (value, xvimagesink->xwindow->width);
|
||||
else
|
||||
g_value_set_uint64 (value, 0);
|
||||
break;
|
||||
case ARG_WINDOW_HEIGHT:
|
||||
if (xvimagesink->xwindow)
|
||||
g_value_set_uint64 (value, xvimagesink->xwindow->height);
|
||||
else
|
||||
g_value_set_uint64 (value, 0);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -3581,6 +3595,16 @@ gst_xvimagesink_class_init (GstXvImageSinkClass * klass)
|
|||
"When enabled, "
|
||||
"the current frame will always be drawn in response to X Expose "
|
||||
"events", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property (gobject_class, ARG_WINDOW_WIDTH,
|
||||
g_param_spec_uint64 ("window-width", "window-width",
|
||||
"Width of the screen", 0, G_MAXUINT64, 0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (gobject_class, ARG_WINDOW_HEIGHT,
|
||||
g_param_spec_uint64 ("window-height", "window-height",
|
||||
"Height of the screen", 0, G_MAXUINT64, 0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* GstXvImageSink:double-buffer
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue