GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_NONE));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
fail_unless (gst_timed_value_control_source_get_count (
(GstTimedValueControlSource *) csource) == 0);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_LINEAR));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
/* set control values */
g_value_init (&val_ulong, G_TYPE_ULONG);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_CUBIC));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_CUBIC, NULL);
/* set control values */
g_value_init (&val_double, G_TYPE_DOUBLE);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_CUBIC));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_CUBIC, NULL);
/* set 2 control values */
g_value_init (&val_double, G_TYPE_DOUBLE);
GST_END_TEST;
-/* make sure we don't crash when someone sets an unsupported interpolation
- * mode */
-GST_START_TEST (controller_interpolate_unimplemented)
-{
- GstInterpolationControlSource *csource;
- GstElement *elem;
-
- elem = gst_element_factory_make ("testmonosource", "test_source");
-
- /* Get interpolation control source */
- csource = gst_interpolation_control_source_new ();
-
- fail_unless (csource != NULL);
- fail_unless (gst_object_set_control_source (GST_OBJECT (elem), "ulong",
- GST_CONTROL_SOURCE (csource)));
-
- /* set completely bogus interpolation mode */
- fail_if (gst_interpolation_control_source_set_interpolation_mode (csource,
- (GstInterpolateMode) 93871));
-
- g_object_unref (csource);
-
- gst_object_unref (elem);
-}
-
-GST_END_TEST;
-
/* test _unset() */
GST_START_TEST (controller_interpolation_unset)
{
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_NONE));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
/* set control values */
g_value_init (&val_ulong, G_TYPE_ULONG);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_NONE));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
/* set control values */
g_value_init (&val_ulong, G_TYPE_ULONG);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_LINEAR));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
/* set control values */
g_value_init (&val_ulong, G_TYPE_ULONG);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_LINEAR));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
/* set control values */
g_value_init (&val_float, G_TYPE_FLOAT);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_LINEAR));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
g_value_init (&val_ulong, G_TYPE_ULONG);
GST_CONTROL_SOURCE (csource2)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_LINEAR));
- fail_unless (gst_interpolation_control_source_set_interpolation_mode
- (csource2, GST_INTERPOLATE_LINEAR));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
+ g_object_set (csource2, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
/* set control values */
g_value_init (&val_ulong, G_TYPE_ULONG);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_LINEAR));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
/* set control value */
tval = g_new0 (GstTimedValue, 1);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_LINEAR));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
/* set control values */
g_value_init (&val_ulong, G_TYPE_ULONG);
GST_CONTROL_SOURCE (csource)));
/* set interpolation mode */
- fail_unless (gst_interpolation_control_source_set_interpolation_mode (csource,
- GST_INTERPOLATE_NONE));
+ g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
fail_unless (gst_timed_value_control_source_get_count (
(GstTimedValueControlSource *) csource) == 0);
tcase_add_test (tc, controller_interpolate_linear);
tcase_add_test (tc, controller_interpolate_cubic);
tcase_add_test (tc, controller_interpolate_cubic_too_few_cp);
- tcase_add_test (tc, controller_interpolate_unimplemented);
tcase_add_test (tc, controller_interpolation_unset);
tcase_add_test (tc, controller_interpolation_unset_all);
tcase_add_test (tc, controller_interpolation_linear_value_array);