video-transition: When using non crossfade effect use 'over' operations

For smptealph element to work as expected the following compositing
element should mix with the default "over" operator, as described
in its documentation.
This commit is contained in:
Thibault Saunier 2019-05-17 19:54:51 -04:00 committed by Thibault Saunier
parent dac2d52670
commit 1729104c2c

View file

@ -364,9 +364,13 @@ ges_video_transition_create_element (GESTrackElement * object)
mixer, GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR, &priv->smpte, mixer, GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR, &priv->smpte,
priv, &priv->mixer_ghostb); priv, &priv->mixer_ghostb);
g_object_set (priv->mixer_sinka, "zorder", 0, NULL); g_object_set (priv->mixer_sinka, "zorder", 0, NULL);
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinka), "operator", "source");
g_object_set (priv->mixer_sinkb, "zorder", 1, NULL); g_object_set (priv->mixer_sinkb, "zorder", 1, NULL);
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinkb), "operator", "add"); gst_util_set_object_arg (G_OBJECT (priv->mixer_sinka), "operator",
priv->type ==
GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ? "source" : "over");
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinkb), "operator",
priv->type ==
GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ? "add" : "over");
fast_element_link (mixer, priv->positioner); fast_element_link (mixer, priv->positioner);
fast_element_link (priv->positioner, oconv); fast_element_link (priv->positioner, oconv);
@ -539,6 +543,13 @@ ges_video_transition_set_transition_type_internal (GESVideoTransition
g_object_set (priv->smpte, "type", (gint) type, NULL); g_object_set (priv->smpte, "type", (gint) type, NULL);
} }
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinka), "operator",
priv->type ==
GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ? "source" : "over");
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinkb), "operator",
priv->type ==
GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ? "add" : "over");
return TRUE; return TRUE;
} }