mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 13:53:19 +00:00
ges: Fix issues avoiding to use operator
when unavailable on mixer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3738>
This commit is contained in:
parent
086c8da446
commit
3065608730
5 changed files with 20 additions and 7 deletions
|
@ -500,7 +500,7 @@ G_GNUC_INTERNAL GstElement * ges_track_get_composition (GESTrack *track);
|
|||
|
||||
|
||||
/*********************************************
|
||||
* GESTrackElement subclasses contructores *
|
||||
* GESTrackElement subclasses constructors *
|
||||
********************************************/
|
||||
G_GNUC_INTERNAL GESAudioTestSource * ges_audio_test_source_new (void);
|
||||
G_GNUC_INTERNAL GESAudioUriSource * ges_audio_uri_source_new (gchar *uri);
|
||||
|
|
|
@ -240,8 +240,10 @@ set_pad_properties_from_positioner_meta (GstPad * mixer_pad, GstSample * sample,
|
|||
}
|
||||
|
||||
g_object_set (mixer_pad, "xpos", meta->posx, "ypos",
|
||||
meta->posy, "width", meta->width, "height", meta->height,
|
||||
"operator", meta->operator, NULL);
|
||||
meta->posy, "width", meta->width, "height", meta->height, NULL);
|
||||
|
||||
if (self->ABI.abi.has_operator)
|
||||
g_object_set (mixer_pad, "operator", meta->operator, NULL);
|
||||
}
|
||||
|
||||
/****************************************************
|
||||
|
@ -426,6 +428,8 @@ ges_smart_mixer_constructed (GObject * obj)
|
|||
|
||||
self->mixer =
|
||||
gst_element_factory_create (ges_get_compositor_factory (), cname);
|
||||
self->ABI.abi.has_operator =
|
||||
gst_compositor_operator_get_type_and_default_value (NULL) != G_TYPE_NONE;
|
||||
g_free (cname);
|
||||
|
||||
if (GST_IS_BIN (self->mixer)) {
|
||||
|
|
|
@ -56,7 +56,14 @@ struct _GESSmartMixer
|
|||
GstCaps *caps;
|
||||
gboolean is_transition;
|
||||
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
union {
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
|
||||
struct {
|
||||
gboolean has_operator;
|
||||
} abi;
|
||||
|
||||
} ABI;
|
||||
};
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
|
|
|
@ -81,7 +81,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
G_DEFINE_TYPE (GstFramePositioner, gst_frame_positioner,
|
||||
GST_TYPE_BASE_TRANSFORM);
|
||||
|
||||
static GType
|
||||
GType
|
||||
gst_compositor_operator_get_type_and_default_value (int *default_operator_value)
|
||||
{
|
||||
static gsize _init = 0;
|
||||
|
@ -112,7 +112,8 @@ gst_compositor_operator_get_type_and_default_value (int *default_operator_value)
|
|||
g_once_init_leave (&_init, 1);
|
||||
}
|
||||
|
||||
*default_operator_value = operator_value;
|
||||
if (default_operator_value)
|
||||
*default_operator_value = operator_value;
|
||||
|
||||
return operator_gtype;
|
||||
}
|
||||
|
@ -549,7 +550,7 @@ gst_frame_positioner_class_init (GstFramePositionerClass * klass)
|
|||
*
|
||||
* The blending operator for the source.
|
||||
*/
|
||||
if (operator_gtype) {
|
||||
if (operator_gtype != G_TYPE_NONE) {
|
||||
properties[PROP_OPERATOR] =
|
||||
g_param_spec_enum ("operator", "Operator",
|
||||
"Blending operator to use for blending this pad over the previous ones",
|
||||
|
|
|
@ -85,6 +85,7 @@ struct _GstFramePositionerMeta {
|
|||
gint operator;
|
||||
};
|
||||
|
||||
G_GNUC_INTERNAL GType gst_compositor_operator_get_type_and_default_value (int *default_operator_value);
|
||||
G_GNUC_INTERNAL void ges_frame_positioner_set_source_and_filter (GstFramePositioner *pos,
|
||||
GESTrackElement *trksrc,
|
||||
GstElement *capsfilter);
|
||||
|
|
Loading…
Reference in a new issue