2010-06-18 09:24:07 +00:00
|
|
|
/* GStreamer Editing Services
|
|
|
|
* Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
|
|
|
|
* 2010 Nokia Corporation
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-04 00:25:20 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2010-06-18 09:24:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2014-04-07 19:02:48 +00:00
|
|
|
* SECTION:gesvideotransition
|
2017-03-08 21:13:48 +00:00
|
|
|
* @title: GESVideoTransition
|
2010-07-01 14:48:45 +00:00
|
|
|
* @short_description: implements video crossfade transition
|
2010-06-18 09:24:07 +00:00
|
|
|
*/
|
2018-09-24 14:41:24 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2010-06-18 09:24:07 +00:00
|
|
|
|
2010-12-09 16:09:11 +00:00
|
|
|
#include <ges/ges.h>
|
2010-06-18 09:24:07 +00:00
|
|
|
#include "ges-internal.h"
|
2015-06-16 15:07:40 +00:00
|
|
|
#include "ges-smart-video-mixer.h"
|
2010-06-18 09:24:07 +00:00
|
|
|
|
2012-02-10 19:01:03 +00:00
|
|
|
#include <gst/controller/gstdirectcontrolbinding.h>
|
|
|
|
|
2015-09-23 19:12:33 +00:00
|
|
|
#define parent_class ges_video_transition_parent_class
|
2010-06-18 09:24:07 +00:00
|
|
|
|
2012-05-03 03:44:31 +00:00
|
|
|
static inline void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_border_internal (GESVideoTransition * self,
|
2012-05-03 03:44:31 +00:00
|
|
|
guint border);
|
|
|
|
static inline void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_inverted_internal (GESVideoTransition *
|
2012-05-03 03:44:31 +00:00
|
|
|
self, gboolean inverted);
|
2012-05-03 03:43:50 +00:00
|
|
|
static inline gboolean
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_transition_type_internal (GESVideoTransition
|
2012-05-03 03:43:50 +00:00
|
|
|
* self, GESVideoStandardTransitionType type);
|
2013-01-27 15:41:51 +00:00
|
|
|
struct _GESVideoTransitionPrivate
|
2010-12-04 18:54:13 +00:00
|
|
|
{
|
2011-01-06 09:55:37 +00:00
|
|
|
GESVideoStandardTransitionType type;
|
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
/* prevents cases where the transitions have not been created yet */
|
2012-05-01 23:08:08 +00:00
|
|
|
GESVideoStandardTransitionType pending_type;
|
|
|
|
|
2011-01-06 09:55:37 +00:00
|
|
|
/* these enable video interpolation */
|
2018-10-28 15:33:31 +00:00
|
|
|
GstTimedValueControlSource *fade_in_control_source;
|
|
|
|
GstTimedValueControlSource *fade_out_control_source;
|
2013-08-29 21:45:56 +00:00
|
|
|
GstTimedValueControlSource *smpte_control_source;
|
2011-01-06 09:55:37 +00:00
|
|
|
|
|
|
|
/* so we can support changing between wipes */
|
|
|
|
GstElement *smpte;
|
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
GstPad *mixer_sink;
|
|
|
|
|
|
|
|
GstElement *mixer;
|
|
|
|
GstPad *mixer_sinka;
|
|
|
|
GstPad *mixer_sinkb;
|
2012-05-01 23:08:08 +00:00
|
|
|
|
2016-12-22 12:48:58 +00:00
|
|
|
GstPad *mixer_ghosta;
|
|
|
|
GstPad *mixer_ghostb;
|
|
|
|
|
2012-05-01 23:09:07 +00:00
|
|
|
/* This is in case the smpte doesn't exist yet */
|
|
|
|
gint pending_border_value;
|
2012-05-03 00:28:41 +00:00
|
|
|
gboolean pending_inverted;
|
2015-09-23 19:12:33 +00:00
|
|
|
|
2016-04-13 09:31:05 +00:00
|
|
|
GstElement *positioner;
|
2010-12-04 18:54:13 +00:00
|
|
|
};
|
|
|
|
|
2010-06-18 09:24:07 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
2012-05-03 01:35:16 +00:00
|
|
|
PROP_BORDER,
|
2012-05-03 03:43:50 +00:00
|
|
|
PROP_TRANSITION_TYPE,
|
2012-05-03 01:35:16 +00:00
|
|
|
PROP_INVERT,
|
|
|
|
PROP_LAST
|
2010-06-18 09:24:07 +00:00
|
|
|
};
|
|
|
|
|
2012-05-03 01:35:16 +00:00
|
|
|
static GParamSpec *properties[PROP_LAST];
|
|
|
|
|
2018-09-06 01:55:02 +00:00
|
|
|
G_DEFINE_TYPE_WITH_PRIVATE (GESVideoTransition, ges_video_transition,
|
|
|
|
GES_TYPE_TRANSITION);
|
|
|
|
|
2010-07-14 11:29:23 +00:00
|
|
|
#define fast_element_link(a,b) gst_element_link_pads_full((a),"src",(b),"sink",GST_PAD_LINK_CHECK_NOTHING)
|
|
|
|
|
2010-06-18 13:54:37 +00:00
|
|
|
static GObject *link_element_to_mixer_with_smpte (GstBin * bin,
|
|
|
|
GstElement * element, GstElement * mixer, gint type,
|
2016-12-22 12:48:58 +00:00
|
|
|
GstElement ** smpteref, GESVideoTransitionPrivate * priv, GstPad ** ghost);
|
2010-06-18 13:54:37 +00:00
|
|
|
|
|
|
|
static void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_duration_changed (GESTrackElement * self,
|
2010-07-08 11:20:56 +00:00
|
|
|
guint64 duration);
|
2010-06-18 13:54:37 +00:00
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
static GstElement *ges_video_transition_create_element (GESTrackElement * self);
|
2010-06-18 13:54:37 +00:00
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
static void ges_video_transition_dispose (GObject * object);
|
2010-06-18 09:24:07 +00:00
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
static void ges_video_transition_finalize (GObject * object);
|
2010-06-18 09:24:07 +00:00
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
static void ges_video_transition_get_property (GObject * object, guint
|
2010-06-18 09:24:07 +00:00
|
|
|
property_id, GValue * value, GParamSpec * pspec);
|
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
static void ges_video_transition_set_property (GObject * object, guint
|
2010-06-18 09:24:07 +00:00
|
|
|
property_id, const GValue * value, GParamSpec * pspec);
|
|
|
|
|
2013-07-01 21:33:01 +00:00
|
|
|
static void
|
|
|
|
duration_changed_cb (GESTrackElement * self, GParamSpec * arg G_GNUC_UNUSED)
|
|
|
|
{
|
|
|
|
ges_video_transition_duration_changed (self,
|
|
|
|
ges_timeline_element_get_duration (GES_TIMELINE_ELEMENT (self)));
|
|
|
|
}
|
|
|
|
|
2015-09-23 19:12:33 +00:00
|
|
|
static gboolean
|
|
|
|
_set_priority (GESTimelineElement * element, guint32 priority)
|
|
|
|
{
|
|
|
|
gboolean res;
|
|
|
|
GESVideoTransition *self = GES_VIDEO_TRANSITION (element);
|
|
|
|
|
|
|
|
res = GES_TIMELINE_ELEMENT_CLASS (parent_class)->set_priority (element,
|
|
|
|
priority);
|
|
|
|
|
2016-04-13 09:31:05 +00:00
|
|
|
if (res && self->priv->positioner)
|
|
|
|
g_object_set (self->priv->positioner, "zorder", G_MAXUINT - priority, NULL);
|
2015-09-23 19:12:33 +00:00
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2010-06-18 09:24:07 +00:00
|
|
|
static void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_class_init (GESVideoTransitionClass * klass)
|
2010-06-18 09:24:07 +00:00
|
|
|
{
|
|
|
|
GObjectClass *object_class;
|
2013-01-26 15:31:33 +00:00
|
|
|
GESTrackElementClass *toclass;
|
2015-09-23 19:12:33 +00:00
|
|
|
GESTimelineElementClass *element_class = GES_TIMELINE_ELEMENT_CLASS (klass);
|
2010-06-18 09:24:07 +00:00
|
|
|
|
|
|
|
object_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
object_class->get_property = ges_video_transition_get_property;
|
|
|
|
object_class->set_property = ges_video_transition_set_property;
|
|
|
|
object_class->dispose = ges_video_transition_dispose;
|
|
|
|
object_class->finalize = ges_video_transition_finalize;
|
2010-06-18 09:24:07 +00:00
|
|
|
|
2012-05-03 01:35:16 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* GESVideoTransition:border:
|
2012-05-03 01:35:16 +00:00
|
|
|
*
|
|
|
|
* This value represents the border width of the transition.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
properties[PROP_BORDER] =
|
|
|
|
g_param_spec_uint ("border", "Border", "The border width", 0,
|
|
|
|
G_MAXUINT, 0, G_PARAM_READWRITE);
|
|
|
|
g_object_class_install_property (object_class, PROP_BORDER,
|
|
|
|
properties[PROP_BORDER]);
|
|
|
|
|
2012-05-03 03:43:50 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* GESVideoTransition:type:
|
2012-05-03 03:43:50 +00:00
|
|
|
*
|
|
|
|
* The #GESVideoStandardTransitionType currently applied on the object
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
properties[PROP_TRANSITION_TYPE] =
|
|
|
|
g_param_spec_enum ("transition-type", "Transition type",
|
|
|
|
"The type of the transition", GES_VIDEO_STANDARD_TRANSITION_TYPE_TYPE,
|
2013-08-29 21:45:56 +00:00
|
|
|
GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE, G_PARAM_READWRITE);
|
2012-05-03 03:43:50 +00:00
|
|
|
g_object_class_install_property (object_class, PROP_TRANSITION_TYPE,
|
|
|
|
properties[PROP_TRANSITION_TYPE]);
|
|
|
|
|
2012-05-03 01:35:16 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* GESVideoTransition:invert:
|
2012-05-03 01:35:16 +00:00
|
|
|
*
|
|
|
|
* This value represents the direction of the transition.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
properties[PROP_INVERT] =
|
|
|
|
g_param_spec_boolean ("invert", "Invert",
|
|
|
|
"Whether the transition is inverted", FALSE, G_PARAM_READWRITE);
|
|
|
|
g_object_class_install_property (object_class, PROP_INVERT,
|
|
|
|
properties[PROP_INVERT]);
|
|
|
|
|
2013-01-26 15:31:33 +00:00
|
|
|
toclass = GES_TRACK_ELEMENT_CLASS (klass);
|
2013-01-27 15:41:51 +00:00
|
|
|
toclass->create_element = ges_video_transition_create_element;
|
2015-09-23 19:12:33 +00:00
|
|
|
|
|
|
|
element_class->set_priority = _set_priority;
|
2010-06-18 09:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_init (GESVideoTransition * self)
|
2010-06-18 09:24:07 +00:00
|
|
|
{
|
2018-09-06 01:55:02 +00:00
|
|
|
self->priv = ges_video_transition_get_instance_private (self);
|
2010-12-04 18:54:13 +00:00
|
|
|
|
2018-10-28 15:33:31 +00:00
|
|
|
self->priv->fade_in_control_source = NULL;
|
|
|
|
self->priv->fade_out_control_source = NULL;
|
2013-08-29 21:45:56 +00:00
|
|
|
self->priv->smpte_control_source = NULL;
|
2011-01-06 09:55:37 +00:00
|
|
|
self->priv->smpte = NULL;
|
2013-08-29 21:45:56 +00:00
|
|
|
self->priv->mixer_sink = NULL;
|
2011-01-06 09:55:37 +00:00
|
|
|
self->priv->mixer = NULL;
|
2013-08-29 21:45:56 +00:00
|
|
|
self->priv->mixer_sinka = NULL;
|
|
|
|
self->priv->mixer_sinkb = NULL;
|
2012-05-01 23:08:08 +00:00
|
|
|
self->priv->pending_type = GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE;
|
2013-08-29 21:45:56 +00:00
|
|
|
self->priv->pending_border_value = 0;
|
|
|
|
self->priv->pending_inverted = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2019-01-25 09:21:43 +00:00
|
|
|
ges_video_transition_release_mixer (GESVideoTransition * self)
|
2013-08-29 21:45:56 +00:00
|
|
|
{
|
2019-01-25 09:21:43 +00:00
|
|
|
GESVideoTransitionPrivate *priv = self->priv;
|
2013-08-29 21:45:56 +00:00
|
|
|
|
2019-01-25 09:21:43 +00:00
|
|
|
if (priv->mixer_ghosta && priv->mixer_ghostb) {
|
|
|
|
gst_element_release_request_pad (priv->mixer, priv->mixer_ghosta);
|
|
|
|
gst_element_release_request_pad (priv->mixer, priv->mixer_ghostb);
|
|
|
|
gst_clear_object (&priv->mixer_ghosta);
|
|
|
|
gst_clear_object (&priv->mixer_ghostb);
|
2013-08-29 21:45:56 +00:00
|
|
|
}
|
2019-01-25 09:21:43 +00:00
|
|
|
|
|
|
|
gst_clear_object (&priv->mixer_sinka);
|
|
|
|
gst_clear_object (&priv->mixer_sinkb);
|
|
|
|
gst_clear_object (&priv->mixer);
|
2010-06-18 09:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_dispose (GObject * object)
|
2010-06-18 09:24:07 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransition *self = GES_VIDEO_TRANSITION (object);
|
|
|
|
GESVideoTransitionPrivate *priv = self->priv;
|
2010-06-18 14:22:21 +00:00
|
|
|
|
|
|
|
GST_DEBUG ("disposing");
|
2011-01-06 09:55:37 +00:00
|
|
|
|
2018-10-28 15:33:31 +00:00
|
|
|
if (priv->fade_in_control_source) {
|
|
|
|
gst_object_unref (priv->fade_in_control_source);
|
|
|
|
priv->fade_in_control_source = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (priv->fade_out_control_source) {
|
|
|
|
gst_object_unref (priv->fade_out_control_source);
|
|
|
|
priv->fade_out_control_source = NULL;
|
2010-06-18 14:22:21 +00:00
|
|
|
}
|
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
if (priv->smpte_control_source) {
|
|
|
|
gst_object_unref (priv->smpte_control_source);
|
|
|
|
priv->smpte_control_source = NULL;
|
2010-06-18 14:22:21 +00:00
|
|
|
}
|
|
|
|
|
2019-01-25 09:21:43 +00:00
|
|
|
ges_video_transition_release_mixer (self);
|
2010-06-28 16:20:15 +00:00
|
|
|
|
2013-07-01 21:33:01 +00:00
|
|
|
g_signal_handlers_disconnect_by_func (GES_TRACK_ELEMENT (self),
|
|
|
|
duration_changed_cb, NULL);
|
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
G_OBJECT_CLASS (ges_video_transition_parent_class)->dispose (object);
|
2010-06-18 09:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_finalize (GObject * object)
|
2010-06-18 09:24:07 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
G_OBJECT_CLASS (ges_video_transition_parent_class)->finalize (object);
|
2010-06-18 09:24:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_get_property (GObject * object,
|
2010-06-18 09:24:07 +00:00
|
|
|
guint property_id, GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransition *tr = GES_VIDEO_TRANSITION (object);
|
2012-05-03 01:35:16 +00:00
|
|
|
|
2010-06-18 09:24:07 +00:00
|
|
|
switch (property_id) {
|
2012-05-03 01:35:16 +00:00
|
|
|
case PROP_BORDER:
|
2013-01-27 15:41:51 +00:00
|
|
|
g_value_set_uint (value, ges_video_transition_get_border (tr));
|
2012-05-03 01:35:16 +00:00
|
|
|
break;
|
2012-05-03 03:43:50 +00:00
|
|
|
case PROP_TRANSITION_TYPE:
|
2013-01-27 15:41:51 +00:00
|
|
|
g_value_set_enum (value, ges_video_transition_get_transition_type (tr));
|
2012-05-03 03:43:50 +00:00
|
|
|
break;
|
2012-05-03 01:35:16 +00:00
|
|
|
case PROP_INVERT:
|
2013-01-27 15:41:51 +00:00
|
|
|
g_value_set_boolean (value, ges_video_transition_is_inverted (tr));
|
2012-05-03 01:35:16 +00:00
|
|
|
break;
|
2010-06-18 09:24:07 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_property (GObject * object,
|
2010-06-18 09:24:07 +00:00
|
|
|
guint property_id, const GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransition *tr = GES_VIDEO_TRANSITION (object);
|
2012-05-03 01:35:16 +00:00
|
|
|
|
2010-06-18 09:24:07 +00:00
|
|
|
switch (property_id) {
|
2012-05-03 01:35:16 +00:00
|
|
|
case PROP_BORDER:
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_border_internal (tr, g_value_get_uint (value));
|
2012-05-03 01:35:16 +00:00
|
|
|
break;
|
2012-05-03 03:43:50 +00:00
|
|
|
case PROP_TRANSITION_TYPE:
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_transition_type_internal (tr,
|
2012-05-03 03:43:50 +00:00
|
|
|
g_value_get_enum (value));
|
|
|
|
break;
|
2012-05-03 01:35:16 +00:00
|
|
|
case PROP_INVERT:
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_inverted_internal (tr,
|
2012-05-03 03:44:31 +00:00
|
|
|
g_value_get_boolean (value));
|
2012-05-03 01:35:16 +00:00
|
|
|
break;
|
2010-06-18 09:24:07 +00:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
static GstTimedValueControlSource *
|
2013-01-27 15:41:51 +00:00
|
|
|
set_interpolation (GstObject * element, GESVideoTransitionPrivate * priv,
|
2018-10-28 15:33:31 +00:00
|
|
|
const gchar * propname)
|
2012-05-02 22:38:42 +00:00
|
|
|
{
|
2013-08-29 21:45:56 +00:00
|
|
|
GstControlSource *control_source;
|
2012-05-02 22:38:42 +00:00
|
|
|
|
2012-05-03 02:03:51 +00:00
|
|
|
g_object_set (element, propname, (gfloat) 0.0, NULL);
|
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
control_source = gst_interpolation_control_source_new ();
|
2012-05-03 02:03:51 +00:00
|
|
|
gst_object_add_control_binding (GST_OBJECT (element),
|
|
|
|
gst_direct_control_binding_new (GST_OBJECT (element), propname,
|
2013-08-29 21:45:56 +00:00
|
|
|
control_source));
|
|
|
|
g_object_set (control_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
2012-05-03 02:03:51 +00:00
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
return GST_TIMED_VALUE_CONTROL_SOURCE (control_source);
|
2012-05-02 22:38:42 +00:00
|
|
|
}
|
|
|
|
|
2010-06-18 13:54:37 +00:00
|
|
|
static GstElement *
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_create_element (GESTrackElement * object)
|
2010-06-18 13:54:37 +00:00
|
|
|
{
|
2013-08-15 18:12:30 +00:00
|
|
|
GstElement *topbin, *iconva, *iconvb, *oconv;
|
2010-06-18 13:54:37 +00:00
|
|
|
GstElement *mixer = NULL;
|
2013-08-15 18:12:30 +00:00
|
|
|
GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src;
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransition *self;
|
|
|
|
GESVideoTransitionPrivate *priv;
|
2010-06-18 14:22:21 +00:00
|
|
|
|
2013-01-27 15:41:51 +00:00
|
|
|
self = GES_VIDEO_TRANSITION (object);
|
2011-01-06 09:55:37 +00:00
|
|
|
priv = self->priv;
|
2010-06-18 13:54:37 +00:00
|
|
|
|
|
|
|
GST_LOG ("creating a video bin");
|
|
|
|
|
|
|
|
topbin = gst_bin_new ("transition-bin");
|
2013-08-29 21:45:56 +00:00
|
|
|
|
2018-10-28 15:33:31 +00:00
|
|
|
iconva = gst_element_factory_make ("videoconvert", "tr-csp-a");
|
|
|
|
iconvb = gst_element_factory_make ("videoconvert", "tr-csp-b");
|
2016-04-13 09:31:05 +00:00
|
|
|
priv->positioner =
|
|
|
|
gst_element_factory_make ("framepositioner", "frame_tagger");
|
|
|
|
g_object_set (priv->positioner, "zorder",
|
2015-09-23 19:12:33 +00:00
|
|
|
G_MAXUINT - GES_TIMELINE_ELEMENT_PRIORITY (self), NULL);
|
2011-10-11 07:51:43 +00:00
|
|
|
oconv = gst_element_factory_make ("videoconvert", "tr-csp-output");
|
2010-06-18 13:54:37 +00:00
|
|
|
|
2016-04-13 09:31:05 +00:00
|
|
|
gst_bin_add_many (GST_BIN (topbin), iconva, iconvb, priv->positioner,
|
2015-09-23 19:12:33 +00:00
|
|
|
oconv, NULL);
|
2011-08-14 18:27:08 +00:00
|
|
|
|
2018-10-28 15:33:31 +00:00
|
|
|
mixer = ges_smart_mixer_new (NULL);
|
2015-09-02 15:58:33 +00:00
|
|
|
GES_SMART_MIXER (mixer)->disable_zorder_alpha = TRUE;
|
2018-10-28 15:55:23 +00:00
|
|
|
g_object_set (GES_SMART_MIXER (mixer)->mixer, "background", 3, NULL); /* transparent */
|
2010-06-18 13:54:37 +00:00
|
|
|
gst_bin_add (GST_BIN (topbin), mixer);
|
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
priv->mixer_sinka =
|
2013-08-15 18:12:30 +00:00
|
|
|
(GstPad *) link_element_to_mixer_with_smpte (GST_BIN (topbin), iconva,
|
2016-12-22 12:48:58 +00:00
|
|
|
mixer, GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR, NULL, priv,
|
|
|
|
&priv->mixer_ghosta);
|
2013-08-29 21:45:56 +00:00
|
|
|
priv->mixer_sinkb =
|
2013-08-15 18:12:30 +00:00
|
|
|
(GstPad *) link_element_to_mixer_with_smpte (GST_BIN (topbin), iconvb,
|
2013-08-29 21:45:56 +00:00
|
|
|
mixer, GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR, &priv->smpte,
|
2016-12-22 12:48:58 +00:00
|
|
|
priv, &priv->mixer_ghostb);
|
2015-09-02 21:27:16 +00:00
|
|
|
g_object_set (priv->mixer_sinka, "zorder", 0, NULL);
|
2018-10-28 15:55:23 +00:00
|
|
|
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinka), "operator", "source");
|
2015-09-02 21:27:16 +00:00
|
|
|
g_object_set (priv->mixer_sinkb, "zorder", 1, NULL);
|
2018-10-28 15:55:23 +00:00
|
|
|
gst_util_set_object_arg (G_OBJECT (priv->mixer_sinkb), "operator", "add");
|
2010-06-28 16:23:37 +00:00
|
|
|
|
2016-04-13 09:31:05 +00:00
|
|
|
fast_element_link (mixer, priv->positioner);
|
|
|
|
fast_element_link (priv->positioner, oconv);
|
2010-06-18 13:54:37 +00:00
|
|
|
|
|
|
|
sinka_target = gst_element_get_static_pad (iconva, "sink");
|
|
|
|
sinkb_target = gst_element_get_static_pad (iconvb, "sink");
|
|
|
|
src_target = gst_element_get_static_pad (oconv, "src");
|
|
|
|
|
|
|
|
sinka = gst_ghost_pad_new ("sinka", sinka_target);
|
|
|
|
sinkb = gst_ghost_pad_new ("sinkb", sinkb_target);
|
|
|
|
src = gst_ghost_pad_new ("src", src_target);
|
|
|
|
|
|
|
|
gst_element_add_pad (topbin, src);
|
|
|
|
gst_element_add_pad (topbin, sinka);
|
|
|
|
gst_element_add_pad (topbin, sinkb);
|
|
|
|
|
|
|
|
gst_object_unref (sinka_target);
|
|
|
|
gst_object_unref (sinkb_target);
|
|
|
|
gst_object_unref (src_target);
|
|
|
|
|
|
|
|
/* set up interpolation */
|
|
|
|
|
2018-10-28 15:33:31 +00:00
|
|
|
priv->fade_out_control_source =
|
2018-10-28 15:55:23 +00:00
|
|
|
set_interpolation (GST_OBJECT (priv->mixer_ghosta), priv, "alpha");
|
2018-10-28 15:33:31 +00:00
|
|
|
priv->fade_in_control_source =
|
2018-10-28 15:55:23 +00:00
|
|
|
set_interpolation (GST_OBJECT (priv->mixer_ghostb), priv, "alpha");
|
2013-08-29 21:45:56 +00:00
|
|
|
priv->smpte_control_source =
|
2018-10-28 15:33:31 +00:00
|
|
|
set_interpolation (GST_OBJECT (priv->smpte), priv, "position");
|
2013-08-29 21:45:56 +00:00
|
|
|
priv->mixer = gst_object_ref (mixer);
|
|
|
|
|
|
|
|
if (priv->pending_type)
|
|
|
|
ges_video_transition_set_transition_type_internal (self,
|
|
|
|
priv->pending_type);
|
|
|
|
else
|
|
|
|
ges_video_transition_set_transition_type_internal (self, priv->type);
|
|
|
|
|
2013-04-24 01:50:40 +00:00
|
|
|
ges_video_transition_duration_changed (object,
|
|
|
|
ges_timeline_element_get_duration (GES_TIMELINE_ELEMENT (object)));
|
2010-06-18 13:54:37 +00:00
|
|
|
|
2013-07-01 21:33:01 +00:00
|
|
|
g_signal_connect (object, "notify::duration",
|
|
|
|
G_CALLBACK (duration_changed_cb), NULL);
|
|
|
|
|
2012-05-01 23:08:08 +00:00
|
|
|
priv->pending_type = GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE;
|
2012-05-03 02:03:51 +00:00
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
return topbin;
|
2010-06-18 13:54:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GObject *
|
|
|
|
link_element_to_mixer_with_smpte (GstBin * bin, GstElement * element,
|
2013-08-29 21:45:56 +00:00
|
|
|
GstElement * mixer, gint type, GstElement ** smpteref,
|
2016-12-22 12:48:58 +00:00
|
|
|
GESVideoTransitionPrivate * priv, GstPad ** ghost)
|
2010-06-18 13:54:37 +00:00
|
|
|
{
|
2016-12-22 12:48:58 +00:00
|
|
|
GstPad *srcpad, *mixerpad;
|
2010-06-18 13:54:37 +00:00
|
|
|
GstElement *smptealpha = gst_element_factory_make ("smptealpha", NULL);
|
2010-06-28 16:23:37 +00:00
|
|
|
|
2010-06-18 13:54:37 +00:00
|
|
|
g_object_set (G_OBJECT (smptealpha),
|
2013-08-29 21:45:56 +00:00
|
|
|
"type", (gint) type, "invert", (gboolean) priv->pending_inverted,
|
|
|
|
"border", priv->pending_border_value, NULL);
|
2010-06-18 13:54:37 +00:00
|
|
|
gst_bin_add (bin, smptealpha);
|
|
|
|
|
2010-07-14 11:29:23 +00:00
|
|
|
fast_element_link (element, smptealpha);
|
2010-06-18 13:54:37 +00:00
|
|
|
|
|
|
|
/* crack */
|
|
|
|
if (smpteref) {
|
|
|
|
*smpteref = smptealpha;
|
|
|
|
}
|
|
|
|
|
2010-06-28 16:23:37 +00:00
|
|
|
srcpad = gst_element_get_static_pad (smptealpha, "src");
|
2016-12-22 12:48:58 +00:00
|
|
|
*ghost = ges_smart_mixer_get_mixer_pad (GES_SMART_MIXER (mixer), &mixerpad);
|
|
|
|
gst_pad_link_full (srcpad, *ghost, GST_PAD_LINK_CHECK_NOTHING);
|
2010-06-28 16:23:37 +00:00
|
|
|
gst_object_unref (srcpad);
|
|
|
|
|
2015-06-16 15:07:40 +00:00
|
|
|
return G_OBJECT (mixerpad);
|
2010-06-18 13:54:37 +00:00
|
|
|
}
|
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
static void
|
|
|
|
ges_video_transition_update_control_source (GstTimedValueControlSource * ts,
|
|
|
|
guint64 duration, gdouble start_value, gdouble end_value)
|
|
|
|
{
|
|
|
|
gst_timed_value_control_source_unset_all (ts);
|
|
|
|
gst_timed_value_control_source_set (ts, 0, start_value);
|
|
|
|
gst_timed_value_control_source_set (ts, duration, end_value);
|
|
|
|
}
|
|
|
|
|
2010-06-18 13:54:37 +00:00
|
|
|
static void
|
2016-08-11 13:53:58 +00:00
|
|
|
ges_video_transition_update_control_sources (GESVideoTransition * self,
|
2016-12-22 12:48:58 +00:00
|
|
|
GESVideoStandardTransitionType type)
|
2010-06-18 13:54:37 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransitionPrivate *priv = self->priv;
|
2016-08-11 13:53:58 +00:00
|
|
|
guint64 duration =
|
|
|
|
ges_timeline_element_get_duration (GES_TIMELINE_ELEMENT (self));
|
2010-06-18 13:54:37 +00:00
|
|
|
|
|
|
|
GST_LOG ("updating controller");
|
2016-08-11 13:53:58 +00:00
|
|
|
if (type == GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE) {
|
|
|
|
ges_video_transition_update_control_source
|
2018-10-28 15:33:31 +00:00
|
|
|
(priv->fade_in_control_source, duration, 0.0, 1.0);
|
|
|
|
ges_video_transition_update_control_source
|
|
|
|
(priv->fade_out_control_source, duration, 1.0, 0.0);
|
2013-08-29 21:45:56 +00:00
|
|
|
ges_video_transition_update_control_source (priv->smpte_control_source,
|
|
|
|
duration, 0.0, 0.0);
|
|
|
|
} else {
|
2016-08-11 13:53:58 +00:00
|
|
|
ges_video_transition_update_control_source
|
2018-10-28 15:33:31 +00:00
|
|
|
(priv->fade_in_control_source, duration, 1.0, 1.0);
|
|
|
|
ges_video_transition_update_control_source
|
|
|
|
(priv->fade_out_control_source, duration, 1.0, 1.0);
|
2013-08-29 21:45:56 +00:00
|
|
|
ges_video_transition_update_control_source (priv->smpte_control_source,
|
|
|
|
duration, 1.0, 0.0);
|
|
|
|
}
|
2010-06-18 13:54:37 +00:00
|
|
|
GST_LOG ("done updating controller");
|
|
|
|
}
|
|
|
|
|
2016-08-11 13:53:58 +00:00
|
|
|
static void
|
|
|
|
ges_video_transition_duration_changed (GESTrackElement * object,
|
|
|
|
guint64 duration)
|
|
|
|
{
|
|
|
|
GESVideoTransition *self = GES_VIDEO_TRANSITION (object);
|
|
|
|
|
|
|
|
ges_video_transition_update_control_sources (self, self->priv->type);
|
|
|
|
}
|
|
|
|
|
2012-05-03 03:44:31 +00:00
|
|
|
static inline void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_border_internal (GESVideoTransition * self,
|
2012-05-02 22:04:54 +00:00
|
|
|
guint value)
|
2012-05-01 23:09:07 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransitionPrivate *priv = self->priv;
|
2012-05-01 23:09:07 +00:00
|
|
|
|
|
|
|
if (!priv->smpte) {
|
|
|
|
priv->pending_border_value = value;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
g_object_set (priv->smpte, "border", value, NULL);
|
|
|
|
}
|
|
|
|
|
2012-05-03 03:44:31 +00:00
|
|
|
static inline void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_inverted_internal (GESVideoTransition *
|
2012-05-03 03:44:31 +00:00
|
|
|
self, gboolean inverted)
|
2012-05-02 22:04:54 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransitionPrivate *priv = self->priv;
|
2012-05-02 22:04:54 +00:00
|
|
|
|
2012-05-03 03:44:31 +00:00
|
|
|
if (!priv->smpte) {
|
2012-05-06 16:52:25 +00:00
|
|
|
priv->pending_inverted = !inverted;
|
2012-05-03 03:44:31 +00:00
|
|
|
return;
|
2012-05-02 22:04:54 +00:00
|
|
|
}
|
2012-05-06 16:52:25 +00:00
|
|
|
g_object_set (priv->smpte, "invert", !inverted, NULL);
|
2012-05-02 22:04:54 +00:00
|
|
|
}
|
|
|
|
|
2012-05-03 03:43:50 +00:00
|
|
|
static inline gboolean
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_transition_type_internal (GESVideoTransition
|
2012-05-03 03:43:50 +00:00
|
|
|
* self, GESVideoStandardTransitionType type)
|
2010-06-18 14:22:21 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransitionPrivate *priv = self->priv;
|
2011-01-06 09:55:37 +00:00
|
|
|
|
|
|
|
GST_DEBUG ("%p %d => %d", self, priv->type, type);
|
2010-07-06 16:54:33 +00:00
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
if (!priv->mixer) {
|
|
|
|
priv->pending_type = type;
|
2012-05-01 23:08:08 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
2012-05-03 02:03:51 +00:00
|
|
|
|
2013-08-29 21:45:56 +00:00
|
|
|
if (type == priv->type) {
|
2016-04-09 21:13:33 +00:00
|
|
|
GST_DEBUG ("%d type is already set on this transition\n", type);
|
2012-05-01 23:08:08 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
2012-05-03 02:03:51 +00:00
|
|
|
|
2016-08-11 13:53:58 +00:00
|
|
|
ges_video_transition_update_control_sources (self, type);
|
2013-08-29 21:45:56 +00:00
|
|
|
|
|
|
|
priv->type = type;
|
|
|
|
|
|
|
|
if (type != GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE) {
|
2011-01-06 09:55:37 +00:00
|
|
|
g_object_set (priv->smpte, "type", (gint) type, NULL);
|
2012-05-01 23:08:08 +00:00
|
|
|
}
|
2013-08-29 21:45:56 +00:00
|
|
|
|
2010-07-08 11:20:56 +00:00
|
|
|
return TRUE;
|
2010-06-18 14:22:21 +00:00
|
|
|
}
|
|
|
|
|
2012-05-02 22:04:54 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* ges_video_transition_set_border:
|
|
|
|
* @self: The #GESVideoTransition to set the border to
|
2012-05-03 00:28:41 +00:00
|
|
|
* @value: The value of the border to set on @object
|
2012-05-02 22:04:54 +00:00
|
|
|
*
|
|
|
|
* Set the border property of @self, this value represents
|
|
|
|
* the border width of the transition. In case this value does
|
|
|
|
* not make sense for the current transition type, it is cached
|
|
|
|
* for later use.
|
|
|
|
*/
|
2012-05-01 23:09:07 +00:00
|
|
|
void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_border (GESVideoTransition * self, guint value)
|
2012-05-01 23:09:07 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_border_internal (self, value);
|
2012-05-01 23:09:07 +00:00
|
|
|
|
2012-05-03 03:44:31 +00:00
|
|
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BORDER]);
|
2012-05-01 23:09:07 +00:00
|
|
|
}
|
|
|
|
|
2012-05-02 22:04:54 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* ges_video_transition_get_border:
|
|
|
|
* @self: The #GESVideoTransition to get the border from
|
2012-05-02 22:04:54 +00:00
|
|
|
*
|
|
|
|
* Get the border property of @self, this value represents
|
|
|
|
* the border width of the transition.
|
|
|
|
*
|
2012-05-03 00:28:41 +00:00
|
|
|
* Returns: The border values of @self or -1 if not meaningful
|
2012-05-02 22:04:54 +00:00
|
|
|
* (this will happen when not using a smpte transition).
|
|
|
|
*/
|
|
|
|
gint
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_get_border (GESVideoTransition * self)
|
2012-05-02 22:04:54 +00:00
|
|
|
{
|
|
|
|
gint value;
|
|
|
|
|
|
|
|
if (!self->priv->smpte) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_object_get (self->priv->smpte, "border", &value, NULL);
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2012-05-03 00:28:41 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* ges_video_transition_set_inverted:
|
|
|
|
* @self: The #GESVideoTransition to set invert on
|
2012-08-10 16:39:10 +00:00
|
|
|
* @inverted: %TRUE if the transition should be inverted %FALSE otherwise
|
2012-05-03 00:28:41 +00:00
|
|
|
*
|
|
|
|
* Set the invert property of @self, this value represents
|
|
|
|
* the direction of the transition. In case this value does
|
|
|
|
* not make sense for the current transition type, it is cached
|
|
|
|
* for later use.
|
|
|
|
*/
|
|
|
|
void
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_inverted (GESVideoTransition * self, gboolean inverted)
|
2012-05-03 00:28:41 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_inverted_internal (self, inverted);
|
2012-05-03 00:28:41 +00:00
|
|
|
|
2012-05-03 03:44:31 +00:00
|
|
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INVERT]);
|
2012-05-03 00:28:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* ges_video_transition_is_inverted:
|
|
|
|
* @self: The #GESVideoTransition to get the inversion from
|
2012-05-03 00:28:41 +00:00
|
|
|
*
|
|
|
|
* Get the invert property of @self, this value represents
|
|
|
|
* the direction of the transition.
|
|
|
|
*
|
|
|
|
* Returns: The invert value of @self
|
|
|
|
*/
|
|
|
|
gboolean
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_is_inverted (GESVideoTransition * self)
|
2012-05-03 00:28:41 +00:00
|
|
|
{
|
|
|
|
gboolean inverted;
|
|
|
|
|
|
|
|
if (!self->priv->smpte) {
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_object_get (self->priv->smpte, "invert", &inverted, NULL);
|
|
|
|
|
2012-05-06 16:52:25 +00:00
|
|
|
return !inverted;
|
2012-05-03 00:28:41 +00:00
|
|
|
}
|
|
|
|
|
2011-01-06 09:55:37 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* ges_video_transition_set_transition_type:
|
|
|
|
* @self: a #GESVideoTransition
|
2011-01-06 09:55:37 +00:00
|
|
|
* @type: a #GESVideoStandardTransitionType
|
|
|
|
*
|
|
|
|
* Sets the transition being used to @type.
|
|
|
|
*
|
|
|
|
* Returns: %TRUE if the transition type was properly changed, else %FALSE.
|
|
|
|
*/
|
2010-07-08 11:20:56 +00:00
|
|
|
gboolean
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_set_transition_type (GESVideoTransition * self,
|
2010-12-09 16:09:11 +00:00
|
|
|
GESVideoStandardTransitionType type)
|
2010-06-18 14:22:21 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
gboolean ret = ges_video_transition_set_transition_type_internal (self, type);
|
2011-01-06 09:55:37 +00:00
|
|
|
|
2012-05-03 03:43:50 +00:00
|
|
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_TRANSITION_TYPE]);
|
2010-07-06 16:54:33 +00:00
|
|
|
|
2012-05-03 03:43:50 +00:00
|
|
|
return ret;
|
2010-06-18 14:22:21 +00:00
|
|
|
}
|
|
|
|
|
2011-01-06 09:55:37 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* ges_video_transition_get_transition_type:
|
|
|
|
* @trans: a #GESVideoTransition
|
2011-01-06 09:55:37 +00:00
|
|
|
*
|
2011-01-10 13:28:35 +00:00
|
|
|
* Get the transition type used by @trans.
|
|
|
|
*
|
2011-01-06 09:55:37 +00:00
|
|
|
* Returns: The transition type used by @trans.
|
|
|
|
*/
|
|
|
|
GESVideoStandardTransitionType
|
2013-01-27 15:41:51 +00:00
|
|
|
ges_video_transition_get_transition_type (GESVideoTransition * trans)
|
2011-01-06 09:55:37 +00:00
|
|
|
{
|
2012-05-01 21:42:47 +00:00
|
|
|
if (trans->priv->pending_type)
|
|
|
|
return trans->priv->pending_type;
|
2011-01-06 09:55:37 +00:00
|
|
|
return trans->priv->type;
|
|
|
|
}
|
|
|
|
|
2011-01-10 13:28:35 +00:00
|
|
|
/**
|
2013-01-27 15:41:51 +00:00
|
|
|
* ges_video_transition_new:
|
2011-01-10 13:28:35 +00:00
|
|
|
*
|
2013-01-27 15:41:51 +00:00
|
|
|
* Creates a new #GESVideoTransition.
|
2011-01-10 13:28:35 +00:00
|
|
|
*
|
2016-05-14 23:04:17 +00:00
|
|
|
* Returns: (transfer floating) (nullable): The newly created
|
|
|
|
* #GESVideoTransition, or %NULL if there was an error.
|
2011-01-10 13:28:35 +00:00
|
|
|
*/
|
2013-01-27 15:41:51 +00:00
|
|
|
GESVideoTransition *
|
|
|
|
ges_video_transition_new (void)
|
2010-06-18 09:24:07 +00:00
|
|
|
{
|
2013-01-27 15:41:51 +00:00
|
|
|
return g_object_new (GES_TYPE_VIDEO_TRANSITION, "track-type",
|
2012-12-20 23:23:54 +00:00
|
|
|
GES_TRACK_TYPE_VIDEO, NULL);
|
2010-06-18 09:24:07 +00:00
|
|
|
}
|