GST_END_TEST;
+/* test live value handling */
+GST_START_TEST (controller_live)
+{
+ GstController *ctrl;
+ GstElement *elem;
+ gboolean res;
+ GValue val_ulong = { 0, };
+
+ elem = gst_element_factory_make ("testmonosource", "test_source");
+
+ /* that property should exist and should be controllable */
+ ctrl = gst_controller_new (G_OBJECT (elem), "ulong", NULL);
+ fail_unless (ctrl != NULL, NULL);
+
+ /* set interpolation mode */
+ gst_controller_set_interpolation_mode (ctrl, "ulong", GST_INTERPOLATE_LINEAR);
+
+ /* set control values */
+ g_value_init (&val_ulong, G_TYPE_ULONG);
+ g_value_set_ulong (&val_ulong, 0);
+ res = gst_controller_set (ctrl, "ulong", 0 * GST_SECOND, &val_ulong);
+ fail_unless (res, NULL);
+ g_value_set_ulong (&val_ulong, 100);
+ res = gst_controller_set (ctrl, "ulong", 4 * GST_SECOND, &val_ulong);
+ fail_unless (res, NULL);
+ g_value_set_ulong (&val_ulong, 200);
+ res = gst_controller_set (ctrl, "ulong", 8 * GST_SECOND, &val_ulong);
+ fail_unless (res, NULL);
+
+ /* verify value */
+ gst_controller_sync_values (ctrl, 2 * GST_SECOND);
+ fail_unless (GST_TEST_MONO_SOURCE (elem)->val_ulong == 50, NULL);
+
+ /* set live value */
+ g_object_set (elem, "ulong", 500, NULL);
+
+ /* we should still get the live value */
+ gst_controller_sync_values (ctrl, 3 * GST_SECOND);
+ fail_unless (GST_TEST_MONO_SOURCE (elem)->val_ulong == 500, NULL);
+
+ /* we should not get the live value anymore */
+ gst_controller_sync_values (ctrl, 4 * GST_SECOND);
+ fail_unless (GST_TEST_MONO_SOURCE (elem)->val_ulong == 100, NULL);
+ gst_controller_sync_values (ctrl, 6 * GST_SECOND);
+ fail_unless (GST_TEST_MONO_SOURCE (elem)->val_ulong == 150, NULL);
+
+ GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
+ g_object_unref (ctrl);
+ gst_object_unref (elem);
+}
+
+GST_END_TEST;
+
/* tests if we can run helper methods against any GObject */
GST_START_TEST (controller_helper_any_gobject)
{
tcase_add_test (tc, controller_interpolate_linear);
tcase_add_test (tc, controller_unset);
tcase_add_test (tc, controller_unset_all);
+ tcase_add_test (tc, controller_live);
tcase_add_test (tc, controller_helper_any_gobject);
return s;