mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
controller: port to new controller api
This commit is contained in:
parent
6241ff63f8
commit
1e14fb131e
2 changed files with 17 additions and 9 deletions
|
@ -1726,18 +1726,21 @@ GST_START_TEST (test_controller_usability)
|
|||
gst_interpolation_control_source_set_interpolation_mode (csource,
|
||||
GST_INTERPOLATE_CUBIC);
|
||||
gst_controller_set_control_source (c, "volume", GST_CONTROL_SOURCE (csource));
|
||||
g_object_unref (csource);
|
||||
|
||||
g_value_init (&value, G_TYPE_DOUBLE);
|
||||
g_value_set_double (&value, 0.0);
|
||||
gst_interpolation_control_source_set (csource, 0 * GST_SECOND, &value);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource,
|
||||
0 * GST_SECOND, &value);
|
||||
g_value_set_double (&value, 1.0);
|
||||
gst_interpolation_control_source_set (csource, 5 * GST_SECOND, &value);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource,
|
||||
5 * GST_SECOND, &value);
|
||||
g_value_set_double (&value, 0.0);
|
||||
gst_interpolation_control_source_set (csource, 10 * GST_SECOND, &value);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource,
|
||||
10 * GST_SECOND, &value);
|
||||
g_value_unset (&value);
|
||||
|
||||
g_object_unref (c);
|
||||
g_object_unref (csource);
|
||||
|
||||
cleanup_volume (volume);
|
||||
}
|
||||
|
|
|
@ -142,18 +142,23 @@ main (gint argc, gchar ** argv)
|
|||
/* set control values */
|
||||
g_value_init (&vol, G_TYPE_DOUBLE);
|
||||
g_value_set_double (&vol, 0.0);
|
||||
gst_interpolation_control_source_set (csource1, 0 * GST_SECOND, &vol);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource1,
|
||||
0 * GST_SECOND, &vol);
|
||||
g_value_set_double (&vol, 1.0);
|
||||
gst_interpolation_control_source_set (csource1, 5 * GST_SECOND, &vol);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource1,
|
||||
5 * GST_SECOND, &vol);
|
||||
|
||||
g_object_unref (csource1);
|
||||
|
||||
g_value_set_double (&vol, 220.0);
|
||||
gst_interpolation_control_source_set (csource2, 0 * GST_SECOND, &vol);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource2,
|
||||
0 * GST_SECOND, &vol);
|
||||
g_value_set_double (&vol, 3520.0);
|
||||
gst_interpolation_control_source_set (csource2, 2 * GST_SECOND, &vol);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource2,
|
||||
2 * GST_SECOND, &vol);
|
||||
g_value_set_double (&vol, 440.0);
|
||||
gst_interpolation_control_source_set (csource2, 6 * GST_SECOND, &vol);
|
||||
gst_timed_value_control_source_set ((GstTimedValueControlSource *) csource2,
|
||||
6 * GST_SECOND, &vol);
|
||||
|
||||
g_object_unref (csource2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue