summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2012-01-31 12:29:13 +0100
committerStefan Sauer <ensonic@users.sf.net>2012-01-31 12:29:13 +0100
commitcf0f205ccab9724904137a618305a52f9e283575 (patch)
treee63a64708d834bb2eac338e8b0a0ef1711a77b05 /tests
parent1dc8b0eab85b373342c85d24e93688f2ee3be4c7 (diff)
downloadgstreamer-plugins-bad-cf0f205ccab9724904137a618305a52f9e283575.tar.gz
controller: adapt to control-source type changes
Diffstat (limited to 'tests')
-rw-r--r--tests/icles/pitch-test.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/icles/pitch-test.c b/tests/icles/pitch-test.c
index b145baff6..dc793d8bb 100644
--- a/tests/icles/pitch-test.c
+++ b/tests/icles/pitch-test.c
@@ -37,8 +37,8 @@ main (int argc, char **argv)
GstElement *pitch;
GstElement *sink;
GstElement *pipeline;
- GstInterpolationControlSource *csource;
- GstTimedValueControlSource *cs;
+ GstControlSource *cs;
+ GstTimedValueControlSource *tvcs;
if (argc != 2) {
g_printerr ("Usage: %s <audiosink>\n", argv[0]);
@@ -68,19 +68,18 @@ main (int argc, char **argv)
sink, NULL);
/* set up a controller */
- csource = gst_interpolation_control_source_new ();
- g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
+ cs = gst_interpolation_control_source_new ();
+ g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
gst_object_add_control_binding (pitch,
- gst_direct_control_binding_new (pitch, "pitch",
- GST_CONTROL_SOURCE (csource)));
- cs = (GstTimedValueControlSource *) csource;
+ gst_direct_control_binding_new (pitch, "pitch", cs));
+ tvcs = (GstTimedValueControlSource *) cs;
for (i = 0; i < 100; ++i) {
if (i % 2)
- gst_timed_value_control_source_set (cs, i * GST_SECOND, 0.5);
+ gst_timed_value_control_source_set (tvcs, i * GST_SECOND, 0.5);
else
- gst_timed_value_control_source_set (cs, i * GST_SECOND, 1.5);
+ gst_timed_value_control_source_set (tvcs, i * GST_SECOND, 1.5);
}
gst_element_set_state (pipeline, GST_STATE_PLAYING);
@@ -88,7 +87,7 @@ main (int argc, char **argv)
g_main_loop_run (loop);
/* clean up nicely */
- gst_object_unref (csource);
+ gst_object_unref (cs);
g_print ("Returned, stopping playback\n");
gst_element_set_state (pipeline, GST_STATE_NULL);
g_print ("Deleting pipeline\n");