* because the property can change from 1.0 to something
* else in the middle of a buffer.
*/
- passthrough &= gst_object_has_active_automation (GST_OBJECT (self));
+ passthrough &=
+ !gst_object_has_active_controlled_properties (GST_OBJECT (self));
GST_DEBUG_OBJECT (self, "set passthrough %d", passthrough);
* GST_DEBUG_NO_COLOR=1 GST_DEBUG="*:2,default:3,*sink*:4,*ring*:4,*pulse*:5" ./audio-trickplay -a -f 2>log-af.txt
*/
+#include <string.h>
#include <gst/gst.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
gint res = 1;
GstElement *src, *mix = NULL, *sink;
GstElement *bin;
- GstController *ctrl;
GstInterpolationControlSource *csource1, *csource2;
GstClock *clock;
GstClockID clock_id;
gst_object_unref (src_pad);
/* add a controller to the source */
- if (!(ctrl = gst_controller_new (GST_OBJECT (src), "freq", "volume", NULL))) {
+ if (!gst_object_control_properties (GST_OBJECT (src), "freq", "volume", NULL)) {
GST_WARNING ("can't control source element");
goto Error;
}
csource1 = gst_interpolation_control_source_new ();
csource2 = gst_interpolation_control_source_new ();
- gst_controller_set_control_source (ctrl, "volume",
+ gst_object_set_control_source (GST_OBJECT (src), "volume",
GST_CONTROL_SOURCE (csource1));
- gst_controller_set_control_source (ctrl, "freq",
+ gst_object_set_control_source (GST_OBJECT (src), "freq",
GST_CONTROL_SOURCE (csource2));
/* Set interpolation mode */
/* cleanup */
gst_query_unref (pos);
- g_object_unref (G_OBJECT (ctrl));
gst_object_unref (G_OBJECT (clock));
gst_object_unref (G_OBJECT (bin));
res = 0;