mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
track-{audio,video}-transition: update for controller API changes
This commit is contained in:
parent
1b2bb14aab
commit
1e1012602e
2 changed files with 18 additions and 11 deletions
|
@ -27,6 +27,8 @@
|
||||||
#include "ges-track-object.h"
|
#include "ges-track-object.h"
|
||||||
#include "ges-track-audio-transition.h"
|
#include "ges-track-audio-transition.h"
|
||||||
|
|
||||||
|
#include <gst/controller/gstdirectcontrolbinding.h>
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTrackAudioTransition, ges_track_audio_transition,
|
G_DEFINE_TYPE (GESTrackAudioTransition, ges_track_audio_transition,
|
||||||
GES_TYPE_TRACK_TRANSITION);
|
GES_TYPE_TRACK_TRANSITION);
|
||||||
|
|
||||||
|
@ -34,9 +36,9 @@ struct _GESTrackAudioTransitionPrivate
|
||||||
{
|
{
|
||||||
/* these enable volume interpolation. Unlike video, both inputs are adjusted
|
/* these enable volume interpolation. Unlike video, both inputs are adjusted
|
||||||
* simultaneously */
|
* simultaneously */
|
||||||
GstInterpolationControlSource *a_control_source;
|
GstControlSource *a_control_source;
|
||||||
|
|
||||||
GstInterpolationControlSource *b_control_source;
|
GstControlSource *b_control_source;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -167,7 +169,7 @@ ges_track_audio_transition_create_element (GESTrackObject * object)
|
||||||
const gchar *propname = "volume";
|
const gchar *propname = "volume";
|
||||||
GstElement *mixer = NULL;
|
GstElement *mixer = NULL;
|
||||||
GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src;
|
GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src;
|
||||||
GstInterpolationControlSource *acontrol_source, *bcontrol_source;
|
GstControlSource *acontrol_source, *bcontrol_source;
|
||||||
|
|
||||||
self = GES_TRACK_AUDIO_TRANSITION (object);
|
self = GES_TRACK_AUDIO_TRANSITION (object);
|
||||||
|
|
||||||
|
@ -210,13 +212,15 @@ ges_track_audio_transition_create_element (GESTrackObject * object)
|
||||||
gst_object_unref (src_target);
|
gst_object_unref (src_target);
|
||||||
|
|
||||||
acontrol_source = gst_interpolation_control_source_new ();
|
acontrol_source = gst_interpolation_control_source_new ();
|
||||||
gst_object_set_control_source (GST_OBJECT (atarget), propname,
|
gst_object_add_control_binding (GST_OBJECT (atarget),
|
||||||
GST_CONTROL_SOURCE (acontrol_source));
|
gst_direct_control_binding_new (GST_OBJECT (atarget), propname,
|
||||||
|
acontrol_source));
|
||||||
g_object_set (acontrol_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
g_object_set (acontrol_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
||||||
|
|
||||||
bcontrol_source = gst_interpolation_control_source_new ();
|
bcontrol_source = gst_interpolation_control_source_new ();
|
||||||
gst_object_set_control_source (GST_OBJECT (btarget), propname,
|
gst_object_add_control_binding (GST_OBJECT (btarget),
|
||||||
GST_CONTROL_SOURCE (bcontrol_source));
|
gst_direct_control_binding_new (GST_OBJECT (btarget), propname,
|
||||||
|
bcontrol_source));
|
||||||
g_object_set (acontrol_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
g_object_set (acontrol_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
||||||
|
|
||||||
self->priv->a_control_source = acontrol_source;
|
self->priv->a_control_source = acontrol_source;
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
|
|
||||||
|
#include <gst/controller/gstdirectcontrolbinding.h>
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTrackVideoTransition, ges_track_video_transition,
|
G_DEFINE_TYPE (GESTrackVideoTransition, ges_track_video_transition,
|
||||||
GES_TYPE_TRACK_TRANSITION);
|
GES_TYPE_TRACK_TRANSITION);
|
||||||
|
|
||||||
|
@ -34,7 +36,7 @@ struct _GESTrackVideoTransitionPrivate
|
||||||
GESVideoStandardTransitionType type;
|
GESVideoStandardTransitionType type;
|
||||||
|
|
||||||
/* these enable video interpolation */
|
/* these enable video interpolation */
|
||||||
GstInterpolationControlSource *control_source;
|
GstControlSource *control_source;
|
||||||
|
|
||||||
/* so we can support changing between wipes */
|
/* so we can support changing between wipes */
|
||||||
GstElement *smpte;
|
GstElement *smpte;
|
||||||
|
@ -210,9 +212,9 @@ ges_track_video_transition_create_element (GESTrackObject * object)
|
||||||
GstElement *mixer = NULL;
|
GstElement *mixer = NULL;
|
||||||
GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src,
|
GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src,
|
||||||
*srca_pad;
|
*srca_pad;
|
||||||
GstInterpolationControlSource *control_source;
|
|
||||||
GESTrackVideoTransition *self;
|
GESTrackVideoTransition *self;
|
||||||
GESTrackVideoTransitionPrivate *priv;
|
GESTrackVideoTransitionPrivate *priv;
|
||||||
|
GstControlSource *control_source;
|
||||||
|
|
||||||
self = GES_TRACK_VIDEO_TRANSITION (object);
|
self = GES_TRACK_VIDEO_TRANSITION (object);
|
||||||
priv = self->priv;
|
priv = self->priv;
|
||||||
|
@ -295,8 +297,9 @@ ges_track_video_transition_create_element (GESTrackObject * object)
|
||||||
g_object_set (target, propname, (gfloat) 0.0, NULL);
|
g_object_set (target, propname, (gfloat) 0.0, NULL);
|
||||||
|
|
||||||
control_source = gst_interpolation_control_source_new ();
|
control_source = gst_interpolation_control_source_new ();
|
||||||
gst_object_set_control_source (GST_OBJECT (target), propname,
|
gst_object_add_control_binding (GST_OBJECT (target),
|
||||||
GST_CONTROL_SOURCE (control_source));
|
gst_direct_control_binding_new (GST_OBJECT (target), propname,
|
||||||
|
control_source));
|
||||||
g_object_set (control_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
g_object_set (control_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
||||||
|
|
||||||
priv->control_source = control_source;
|
priv->control_source = control_source;
|
||||||
|
|
Loading…
Reference in a new issue