From 1e1012602e1524d9f5b0c17f96174a97a93a86a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 10 Feb 2012 19:01:03 +0000 Subject: [PATCH] track-{audio,video}-transition: update for controller API changes --- ges/ges-track-audio-transition.c | 18 +++++++++++------- ges/ges-track-video-transition.c | 11 +++++++---- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ges/ges-track-audio-transition.c b/ges/ges-track-audio-transition.c index c3116ee9ef..7f03cadd1d 100644 --- a/ges/ges-track-audio-transition.c +++ b/ges/ges-track-audio-transition.c @@ -27,6 +27,8 @@ #include "ges-track-object.h" #include "ges-track-audio-transition.h" +#include + G_DEFINE_TYPE (GESTrackAudioTransition, ges_track_audio_transition, GES_TYPE_TRACK_TRANSITION); @@ -34,9 +36,9 @@ struct _GESTrackAudioTransitionPrivate { /* these enable volume interpolation. Unlike video, both inputs are adjusted * 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"; GstElement *mixer = NULL; 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); @@ -210,13 +212,15 @@ ges_track_audio_transition_create_element (GESTrackObject * object) gst_object_unref (src_target); acontrol_source = gst_interpolation_control_source_new (); - gst_object_set_control_source (GST_OBJECT (atarget), propname, - GST_CONTROL_SOURCE (acontrol_source)); + gst_object_add_control_binding (GST_OBJECT (atarget), + gst_direct_control_binding_new (GST_OBJECT (atarget), propname, + acontrol_source)); g_object_set (acontrol_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL); bcontrol_source = gst_interpolation_control_source_new (); - gst_object_set_control_source (GST_OBJECT (btarget), propname, - GST_CONTROL_SOURCE (bcontrol_source)); + gst_object_add_control_binding (GST_OBJECT (btarget), + gst_direct_control_binding_new (GST_OBJECT (btarget), propname, + bcontrol_source)); g_object_set (acontrol_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL); self->priv->a_control_source = acontrol_source; diff --git a/ges/ges-track-video-transition.c b/ges/ges-track-video-transition.c index 023cbd01d6..3adac680d9 100644 --- a/ges/ges-track-video-transition.c +++ b/ges/ges-track-video-transition.c @@ -26,6 +26,8 @@ #include #include "ges-internal.h" +#include + G_DEFINE_TYPE (GESTrackVideoTransition, ges_track_video_transition, GES_TYPE_TRACK_TRANSITION); @@ -34,7 +36,7 @@ struct _GESTrackVideoTransitionPrivate GESVideoStandardTransitionType type; /* these enable video interpolation */ - GstInterpolationControlSource *control_source; + GstControlSource *control_source; /* so we can support changing between wipes */ GstElement *smpte; @@ -210,9 +212,9 @@ ges_track_video_transition_create_element (GESTrackObject * object) GstElement *mixer = NULL; GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src, *srca_pad; - GstInterpolationControlSource *control_source; GESTrackVideoTransition *self; GESTrackVideoTransitionPrivate *priv; + GstControlSource *control_source; self = GES_TRACK_VIDEO_TRANSITION (object); priv = self->priv; @@ -295,8 +297,9 @@ ges_track_video_transition_create_element (GESTrackObject * object) g_object_set (target, propname, (gfloat) 0.0, NULL); control_source = gst_interpolation_control_source_new (); - gst_object_set_control_source (GST_OBJECT (target), propname, - GST_CONTROL_SOURCE (control_source)); + gst_object_add_control_binding (GST_OBJECT (target), + gst_direct_control_binding_new (GST_OBJECT (target), propname, + control_source)); g_object_set (control_source, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL); priv->control_source = control_source;