mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
controller: port the test to new api as well
This commit is contained in:
parent
eb1259b983
commit
c379842aec
1 changed files with 7 additions and 12 deletions
|
@ -914,12 +914,11 @@ GST_END_TEST;
|
||||||
/* test retrieval of an array of values with get_value_array() */
|
/* test retrieval of an array of values with get_value_array() */
|
||||||
GST_START_TEST (controller_interpolation_linear_value_array)
|
GST_START_TEST (controller_interpolation_linear_value_array)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
GstInterpolationControlSource *csource;
|
GstInterpolationControlSource *csource;
|
||||||
GstElement *elem;
|
GstElement *elem;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GValue val_ulong = { 0, };
|
GValue val_ulong = { 0, };
|
||||||
GstValueArray values = { NULL, };
|
gulong *values;
|
||||||
|
|
||||||
elem = gst_element_factory_make ("testmonosource", "test_source");
|
elem = gst_element_factory_make ("testmonosource", "test_source");
|
||||||
|
|
||||||
|
@ -948,22 +947,18 @@ GST_START_TEST (controller_interpolation_linear_value_array)
|
||||||
fail_unless (res, NULL);
|
fail_unless (res, NULL);
|
||||||
|
|
||||||
/* now pull in values for some timestamps */
|
/* now pull in values for some timestamps */
|
||||||
values.property_name = (char *) "ulong";
|
values = g_new (gulong, 3);
|
||||||
values.nbsamples = 3;
|
|
||||||
values.sample_interval = GST_SECOND;
|
|
||||||
values.values = (gpointer) g_new (gulong, 3);
|
|
||||||
|
|
||||||
fail_unless (gst_control_source_get_value_array (GST_CONTROL_SOURCE (csource),
|
fail_unless (gst_control_source_get_value_array (GST_CONTROL_SOURCE (csource),
|
||||||
0, &values));
|
0, GST_SECOND, 3, (gpointer) values));
|
||||||
fail_unless_equals_int (((gulong *) values.values)[0], 0);
|
fail_unless_equals_int ((values)[0], 0);
|
||||||
fail_unless_equals_int (((gulong *) values.values)[1], 50);
|
fail_unless_equals_int ((values)[1], 50);
|
||||||
fail_unless_equals_int (((gulong *) values.values)[2], 100);
|
fail_unless_equals_int ((values)[2], 100);
|
||||||
|
|
||||||
g_object_unref (csource);
|
g_object_unref (csource);
|
||||||
|
|
||||||
g_free (values.values);
|
g_free (values);
|
||||||
gst_object_unref (elem);
|
gst_object_unref (elem);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
Loading…
Reference in a new issue