mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
d3d11compositor: Add "ignore-inactive-pads" property
Same as compositor element Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4438>
This commit is contained in:
parent
7eefdd1b95
commit
3d6a609590
1 changed files with 29 additions and 0 deletions
|
@ -965,6 +965,7 @@ enum
|
|||
PROP_0,
|
||||
PROP_ADAPTER,
|
||||
PROP_BACKGROUND,
|
||||
PROP_IGNORE_INACTIVE_PADS,
|
||||
};
|
||||
|
||||
#define DEFAULT_ADAPTER -1
|
||||
|
@ -1039,6 +1040,26 @@ gst_d3d11_compositor_class_init (GstD3D11CompositorClass * klass)
|
|||
DEFAULT_BACKGROUND,
|
||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||
|
||||
/**
|
||||
* GstD3D11Compositor:ignore-inactive-pads:
|
||||
*
|
||||
* Don't wait for inactive pads when live. An inactive pad
|
||||
* is a pad that hasn't yet received a buffer, but that has
|
||||
* been waited on at least once.
|
||||
*
|
||||
* The purpose of this property is to avoid aggregating on
|
||||
* timeout when new pads are requested in advance of receiving
|
||||
* data flow, for example the user may decide to connect it later,
|
||||
* but wants to configure it already.
|
||||
*
|
||||
* Since: 1.24
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_IGNORE_INACTIVE_PADS, g_param_spec_boolean ("ignore-inactive-pads",
|
||||
"Ignore inactive pads",
|
||||
"Avoid timing out waiting for inactive pads", FALSE,
|
||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||
|
||||
element_class->request_new_pad =
|
||||
GST_DEBUG_FUNCPTR (gst_d3d11_compositor_request_new_pad);
|
||||
element_class->release_pad =
|
||||
|
@ -1122,6 +1143,10 @@ gst_d3d11_compositor_set_property (GObject * object,
|
|||
self->background =
|
||||
(GstD3D11CompositorBackground) g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_IGNORE_INACTIVE_PADS:
|
||||
gst_aggregator_set_ignore_inactive_pads (GST_AGGREGATOR (object),
|
||||
g_value_get_boolean (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -1141,6 +1166,10 @@ gst_d3d11_compositor_get_property (GObject * object,
|
|||
case PROP_BACKGROUND:
|
||||
g_value_set_enum (value, self->background);
|
||||
break;
|
||||
case PROP_IGNORE_INACTIVE_PADS:
|
||||
g_value_set_boolean (value,
|
||||
gst_aggregator_get_ignore_inactive_pads (GST_AGGREGATOR (object)));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue