* @GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V: Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top,
* @GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H: Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left,
* @GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE: Crossfade
+ * @GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN: Similar to crossfade, but fade in the front video without fading out the background one (Since: 1.22)
*
*/
GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U = 262,
GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V = 263,
GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H = 264,
- GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE = 512
+ GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE = 512,
+ /**
+ * GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN:
+ *
+ * Similar to crossfade, but fade in the front video without fading out
+ * the background one
+ *
+ * Since: 1.22
+ */
+ GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN = 513
} GESVideoStandardTransitionType;
#define GES_VIDEO_STANDARD_TRANSITION_TYPE_TYPE \
GESVideoTransition *self;
GESVideoTransitionPrivate *priv;
const gchar *smpte_properties[] = { "invert", "border", NULL };
+ gboolean is_fade;
self = GES_VIDEO_TRANSITION (object);
priv = self->priv;
+ is_fade = (priv->type == GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ||
+ priv->type == GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN);
+
GST_LOG ("creating a video bin");
topbin = gst_bin_new ("transition-bin");
g_object_set (priv->mixer_sinka, "zorder", 0, NULL);
g_object_set (priv->mixer_sinkb, "zorder", 1, NULL);
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinka), "operator",
- priv->type ==
- GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ? "source" : "over");
+ is_fade ? "source" : "over");
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinkb), "operator",
- priv->type ==
- GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ? "add" : "over");
+ is_fade ? "add" : "over");
fast_element_link (mixer, priv->positioner);
(priv->fade_out_control_source, duration, 1.0, 0.0);
ges_video_transition_update_control_source (priv->smpte_control_source,
duration, 0.0, 0.0);
+ } else if (type == GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN) {
+ ges_video_transition_update_control_source
+ (priv->fade_in_control_source, duration, 0.0, 1.0);
+ ges_video_transition_update_control_source
+ (priv->fade_out_control_source, duration, 1.0, 1.0);
+ ges_video_transition_update_control_source (priv->smpte_control_source,
+ duration, 0.0, 0.0);
} else {
ges_video_transition_update_control_source
(priv->fade_in_control_source, duration, 1.0, 1.0);
* self, GESVideoStandardTransitionType type)
{
GESVideoTransitionPrivate *priv = self->priv;
+ gboolean is_fade;
GST_DEBUG ("%p %d => %d", self, priv->type, type);
ges_video_transition_update_control_sources (self, type);
priv->type = type;
+ is_fade = (type == GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ||
+ type == GES_VIDEO_STANDARD_TRANSITION_TYPE_FADE_IN);
- if (type != GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE) {
+ if (!is_fade) {
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");
+ is_fade ? "source" : "over");
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinkb), "operator",
- priv->type ==
- GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE ? "add" : "over");
+ is_fade ? "add" : "over");
return TRUE;
}