2005-08-03 15:59:11 +00:00
|
|
|
/* GStreamer
|
|
|
|
*
|
|
|
|
* unit test for the controller library
|
|
|
|
*
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
* Copyright (C) <2005> Stefan Kost <ensonic at users dot sf dot net>
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
* Copyright (C) <2006-2007> Sebastian Dröge <slomo@circular-chaos.org>
|
2005-08-03 15:59:11 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2005-09-20 09:23:39 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2005-08-03 15:59:11 +00:00
|
|
|
#include "config.h"
|
2005-09-20 09:23:39 +00:00
|
|
|
#endif
|
|
|
|
#include <gst/gst.h>
|
2005-08-20 12:14:28 +00:00
|
|
|
#include <gst/check/gstcheck.h>
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
#include <gst/controller/gstinterpolationcontrolsource.h>
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
#include <gst/controller/gstlfocontrolsource.h>
|
2011-12-19 10:13:45 +00:00
|
|
|
#include <gst/controller/gsttriggercontrolsource.h>
|
2012-01-30 18:17:00 +00:00
|
|
|
#include <gst/controller/gstdirectcontrolbinding.h>
|
2005-08-03 15:59:11 +00:00
|
|
|
|
2012-01-01 19:55:20 +00:00
|
|
|
/* enum for text element */
|
|
|
|
|
|
|
|
#define GST_TYPE_TEST_ENUM (gst_test_enum_get_type ())
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ENUM_V0 = 0,
|
|
|
|
ENUM_V10 = 10,
|
|
|
|
ENUM_V11,
|
|
|
|
ENUM_V12,
|
|
|
|
ENUM_V255 = 255
|
|
|
|
} GstTestEnum;
|
|
|
|
|
|
|
|
static GType
|
|
|
|
gst_test_enum_get_type (void)
|
|
|
|
{
|
|
|
|
static gsize gtype = 0;
|
|
|
|
static const GEnumValue values[] = {
|
|
|
|
{ENUM_V0, "ENUM_V0", "0"},
|
|
|
|
{ENUM_V10, "ENUM_V10", "10"},
|
|
|
|
{ENUM_V11, "ENUM_V11", "11"},
|
|
|
|
{ENUM_V12, "ENUM_V12", "12"},
|
|
|
|
{ENUM_V255, "ENUM_V255", "255"},
|
|
|
|
{0, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (g_once_init_enter (>ype)) {
|
|
|
|
GType tmp = g_enum_register_static ("GstTestEnum", values);
|
|
|
|
g_once_init_leave (>ype, tmp);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (GType) gtype;
|
|
|
|
}
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* local test element */
|
2005-08-03 15:59:11 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2011-12-22 22:48:30 +00:00
|
|
|
PROP_INT = 1,
|
|
|
|
PROP_FLOAT,
|
|
|
|
PROP_DOUBLE,
|
|
|
|
PROP_BOOLEAN,
|
2012-01-01 19:55:20 +00:00
|
|
|
PROP_ENUM,
|
2011-12-22 22:48:30 +00:00
|
|
|
PROP_READONLY,
|
|
|
|
PROP_STATIC,
|
|
|
|
PROP_CONSTRUCTONLY,
|
|
|
|
PROP_COUNT
|
2005-08-03 15:59:11 +00:00
|
|
|
};
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
#define GST_TYPE_TEST_OBJ (gst_test_obj_get_type ())
|
|
|
|
#define GST_TEST_OBJ(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TEST_OBJ, GstTestObj))
|
|
|
|
#define GST_TEST_OBJ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TEST_OBJ, GstTestObjClass))
|
|
|
|
#define GST_IS_TEST_OBJ(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TEST_OBJ))
|
|
|
|
#define GST_IS_TEST_OBJ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TEST_OBJ))
|
|
|
|
#define GST_TEST_OBJ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_TEST_OBJ, GstTestObjClass))
|
2005-08-03 15:59:11 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
typedef struct _GstTestObj GstTestObj;
|
|
|
|
typedef struct _GstTestObjClass GstTestObjClass;
|
2005-08-03 15:59:11 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
struct _GstTestObj
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
|
|
|
GstElement parent;
|
2011-12-22 22:48:30 +00:00
|
|
|
gint val_int;
|
2006-06-14 08:26:53 +00:00
|
|
|
gfloat val_float;
|
2005-08-05 10:02:44 +00:00
|
|
|
gdouble val_double;
|
2005-08-31 10:00:08 +00:00
|
|
|
gboolean val_boolean;
|
2012-01-01 19:55:20 +00:00
|
|
|
GstTestEnum val_enum;
|
2005-08-03 15:59:11 +00:00
|
|
|
};
|
2011-12-25 17:49:01 +00:00
|
|
|
struct _GstTestObjClass
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
|
|
|
GstElementClass parent_class;
|
|
|
|
};
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
static GType gst_test_obj_get_type (void);
|
2005-08-03 15:59:11 +00:00
|
|
|
|
|
|
|
static void
|
2011-12-25 17:49:01 +00:00
|
|
|
gst_test_obj_get_property (GObject * object,
|
2005-08-03 15:59:11 +00:00
|
|
|
guint property_id, GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
2011-12-25 17:49:01 +00:00
|
|
|
GstTestObj *self = GST_TEST_OBJ (object);
|
2005-08-03 15:59:11 +00:00
|
|
|
|
|
|
|
switch (property_id) {
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_INT:
|
|
|
|
g_value_set_int (value, self->val_int);
|
2005-08-03 15:59:11 +00:00
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_FLOAT:
|
2006-06-14 08:26:53 +00:00
|
|
|
g_value_set_float (value, self->val_float);
|
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_DOUBLE:
|
2005-08-05 10:02:44 +00:00
|
|
|
g_value_set_double (value, self->val_double);
|
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_BOOLEAN:
|
2005-08-31 10:00:08 +00:00
|
|
|
g_value_set_boolean (value, self->val_boolean);
|
|
|
|
break;
|
2012-01-01 19:55:20 +00:00
|
|
|
case PROP_ENUM:
|
|
|
|
g_value_set_enum (value, self->val_enum);
|
|
|
|
break;
|
2005-08-05 10:02:44 +00:00
|
|
|
default:
|
2005-08-03 15:59:11 +00:00
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-12-25 17:49:01 +00:00
|
|
|
gst_test_obj_set_property (GObject * object,
|
2005-08-03 15:59:11 +00:00
|
|
|
guint property_id, const GValue * value, GParamSpec * pspec)
|
|
|
|
{
|
2011-12-25 17:49:01 +00:00
|
|
|
GstTestObj *self = GST_TEST_OBJ (object);
|
2005-08-03 15:59:11 +00:00
|
|
|
|
|
|
|
switch (property_id) {
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_INT:
|
|
|
|
self->val_int = g_value_get_int (value);
|
|
|
|
GST_DEBUG ("test value int=%d", self->val_int);
|
2005-08-05 10:02:44 +00:00
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_FLOAT:
|
2006-06-14 08:26:53 +00:00
|
|
|
self->val_float = g_value_get_float (value);
|
2008-06-20 08:17:08 +00:00
|
|
|
GST_DEBUG ("test value float=%f", self->val_float);
|
2006-06-14 08:26:53 +00:00
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_DOUBLE:
|
2005-08-05 10:02:44 +00:00
|
|
|
self->val_double = g_value_get_double (value);
|
2011-12-22 22:48:30 +00:00
|
|
|
GST_DEBUG ("test value double=%lf", self->val_double);
|
2005-08-03 15:59:11 +00:00
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_BOOLEAN:
|
2005-08-31 10:00:08 +00:00
|
|
|
self->val_boolean = g_value_get_boolean (value);
|
2008-06-20 08:17:08 +00:00
|
|
|
GST_DEBUG ("test value boolean=%d", self->val_boolean);
|
2005-08-31 10:00:08 +00:00
|
|
|
break;
|
2012-01-01 19:55:20 +00:00
|
|
|
case PROP_ENUM:
|
|
|
|
self->val_enum = g_value_get_enum (value);
|
|
|
|
GST_DEBUG ("test value enum=%d", self->val_enum);
|
|
|
|
break;
|
2011-12-22 22:48:30 +00:00
|
|
|
case PROP_CONSTRUCTONLY:
|
2005-08-31 10:00:08 +00:00
|
|
|
break;
|
2005-08-05 10:02:44 +00:00
|
|
|
default:
|
2005-08-03 15:59:11 +00:00
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-12-25 17:49:01 +00:00
|
|
|
gst_test_obj_class_init (GstTestObjClass * klass)
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
|
|
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
gobject_class->set_property = gst_test_obj_set_property;
|
|
|
|
gobject_class->get_property = gst_test_obj_get_property;
|
2005-08-03 15:59:11 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_INT,
|
|
|
|
g_param_spec_int ("int",
|
|
|
|
"int prop",
|
2012-01-01 19:43:51 +00:00
|
|
|
"int number parameter",
|
2011-12-22 22:48:30 +00:00
|
|
|
0, 100, 0, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
2005-08-05 10:02:44 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_FLOAT,
|
2006-06-14 08:26:53 +00:00
|
|
|
g_param_spec_float ("float",
|
|
|
|
"float prop",
|
2012-01-01 19:43:51 +00:00
|
|
|
"float number parameter",
|
2006-06-14 08:26:53 +00:00
|
|
|
0.0, 100.0, 0.0, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_DOUBLE,
|
2005-08-05 10:02:44 +00:00
|
|
|
g_param_spec_double ("double",
|
|
|
|
"double prop",
|
2012-01-01 19:43:51 +00:00
|
|
|
"double number parameter",
|
2005-08-05 10:02:44 +00:00
|
|
|
0.0, 100.0, 0.0, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
2005-08-31 10:00:08 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_BOOLEAN,
|
2005-08-31 10:00:08 +00:00
|
|
|
g_param_spec_boolean ("boolean",
|
|
|
|
"boolean prop",
|
2012-01-01 19:43:51 +00:00
|
|
|
"boolean parameter",
|
2005-08-31 10:00:08 +00:00
|
|
|
FALSE, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
|
|
|
|
2012-01-01 19:55:20 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_ENUM,
|
|
|
|
g_param_spec_enum ("enum",
|
|
|
|
"enum prop",
|
|
|
|
"enum parameter",
|
|
|
|
GST_TYPE_TEST_ENUM, ENUM_V0,
|
|
|
|
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_READONLY,
|
|
|
|
g_param_spec_int ("readonly",
|
2005-08-31 10:00:08 +00:00
|
|
|
"readonly prop",
|
2012-01-01 19:43:51 +00:00
|
|
|
"readonly parameter",
|
2011-12-22 22:48:30 +00:00
|
|
|
0, G_MAXINT, 0, G_PARAM_READABLE | GST_PARAM_CONTROLLABLE));
|
2005-08-31 10:00:08 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_STATIC,
|
|
|
|
g_param_spec_int ("static",
|
2005-08-31 10:00:08 +00:00
|
|
|
"static prop",
|
2012-01-01 19:43:51 +00:00
|
|
|
"static parameter", 0, G_MAXINT, 0, G_PARAM_READWRITE));
|
2005-08-31 10:00:08 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
g_object_class_install_property (gobject_class, PROP_CONSTRUCTONLY,
|
|
|
|
g_param_spec_int ("construct-only",
|
2005-08-31 10:00:08 +00:00
|
|
|
"construct-only prop",
|
2012-01-01 19:43:51 +00:00
|
|
|
"construct-only parameter",
|
2011-12-22 22:48:30 +00:00
|
|
|
0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
2005-08-03 15:59:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2011-12-25 17:49:01 +00:00
|
|
|
gst_test_obj_base_init (GstTestObjClass * klass)
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
|
|
|
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
|
|
|
|
2010-03-03 10:45:38 +00:00
|
|
|
gst_element_class_set_details_simple (element_class,
|
2011-12-25 17:49:01 +00:00
|
|
|
"test object for unit tests",
|
|
|
|
"Test", "Use in unit tests", "Stefan Sauer <ensonic@users.sf.net>");
|
2005-08-03 15:59:11 +00:00
|
|
|
}
|
|
|
|
|
2007-12-21 21:17:32 +00:00
|
|
|
static GType
|
2011-12-25 17:49:01 +00:00
|
|
|
gst_test_obj_get_type (void)
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
2011-12-25 17:49:01 +00:00
|
|
|
static volatile gsize test_obj_type = 0;
|
2005-08-03 15:59:11 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
if (g_once_init_enter (&test_obj_type)) {
|
2010-07-20 14:25:20 +00:00
|
|
|
GType type;
|
2005-08-03 15:59:11 +00:00
|
|
|
static const GTypeInfo info = {
|
2011-12-25 17:49:01 +00:00
|
|
|
(guint16) sizeof (GstTestObjClass),
|
|
|
|
(GBaseInitFunc) gst_test_obj_base_init, // base_init
|
2005-08-03 15:59:11 +00:00
|
|
|
NULL, // base_finalize
|
2011-12-25 17:49:01 +00:00
|
|
|
(GClassInitFunc) gst_test_obj_class_init, // class_init
|
2005-08-03 15:59:11 +00:00
|
|
|
NULL, // class_finalize
|
|
|
|
NULL, // class_data
|
2011-12-25 17:49:01 +00:00
|
|
|
(guint16) sizeof (GstTestObj),
|
2005-08-03 15:59:11 +00:00
|
|
|
0, // n_preallocs
|
|
|
|
NULL, // instance_init
|
|
|
|
NULL // value_table
|
|
|
|
};
|
2011-12-25 17:49:01 +00:00
|
|
|
type = g_type_register_static (GST_TYPE_ELEMENT, "GstTestObj", &info, 0);
|
|
|
|
g_once_init_leave (&test_obj_type, type);
|
2005-08-03 15:59:11 +00:00
|
|
|
}
|
2011-12-25 17:49:01 +00:00
|
|
|
return test_obj_type;
|
2005-08-03 15:59:11 +00:00
|
|
|
}
|
|
|
|
|
2011-11-04 13:00:24 +00:00
|
|
|
static void
|
|
|
|
setup (void)
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
2011-12-25 17:49:01 +00:00
|
|
|
gst_element_register (NULL, "testobj", GST_RANK_NONE, GST_TYPE_TEST_OBJ);
|
2005-08-03 15:59:11 +00:00
|
|
|
}
|
|
|
|
|
2011-11-04 13:00:24 +00:00
|
|
|
static void
|
|
|
|
teardown (void)
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-11-04 13:00:24 +00:00
|
|
|
|
|
|
|
/* TESTS */
|
2005-08-05 06:57:27 +00:00
|
|
|
|
2011-11-10 17:37:28 +00:00
|
|
|
/* tests if we don't fail on empty interpolation controlsources */
|
2010-04-27 06:42:05 +00:00
|
|
|
GST_START_TEST (controller_controlsource_empty1)
|
|
|
|
{
|
|
|
|
GstElement *elem;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstControlSource *cs;
|
2010-04-27 06:42:05 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2010-04-27 06:42:05 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
2010-04-27 06:42:05 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
2010-04-27 06:42:05 +00:00
|
|
|
|
|
|
|
/* don't fail on empty control point lists */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2010-04-27 06:42:05 +00:00
|
|
|
|
|
|
|
/* unref objects */
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2010-04-27 06:42:05 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2011-11-10 17:37:28 +00:00
|
|
|
/* tests if we don't fail on interpolation controlsources that are empty again */
|
2010-04-27 06:42:05 +00:00
|
|
|
GST_START_TEST (controller_controlsource_empty2)
|
|
|
|
{
|
|
|
|
GstElement *elem;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstControlSource *cs;
|
|
|
|
GstTimedValueControlSource *tvcs;
|
2010-04-27 06:42:05 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2010-04-27 06:42:05 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
2010-04-27 06:42:05 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
2010-04-27 06:42:05 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-31 11:20:41 +00:00
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
|
|
|
gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0);
|
2010-04-27 06:42:05 +00:00
|
|
|
|
|
|
|
/* ... and unset the value */
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_timed_value_control_source_unset (tvcs, 0 * GST_SECOND);
|
2010-04-27 06:42:05 +00:00
|
|
|
|
|
|
|
/* don't fail on empty control point lists */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2010-04-27 06:42:05 +00:00
|
|
|
|
|
|
|
/* unref objects */
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2010-04-27 06:42:05 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2005-08-05 10:02:44 +00:00
|
|
|
/* test timed value handling without interpolation */
|
2012-01-01 19:57:34 +00:00
|
|
|
GST_START_TEST (controller_interpolation_none)
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2005-08-03 15:59:11 +00:00
|
|
|
GstElement *elem;
|
2012-01-01 13:55:35 +00:00
|
|
|
gdouble v;
|
2005-08-03 15:59:11 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2005-08-03 15:59:11 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2005-08-05 10:02:44 +00:00
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
|
2005-08-05 10:02:44 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 1.0));
|
|
|
|
|
|
|
|
/* check values on control source directly */
|
|
|
|
fail_unless (gst_control_source_get_value (cs, 0 * GST_SECOND, &v));
|
|
|
|
fail_unless_equals_float (v, 0.0);
|
|
|
|
fail_unless (gst_control_source_get_value (cs, 1 * GST_SECOND, &v));
|
|
|
|
fail_unless_equals_float (v, 0.0);
|
|
|
|
fail_unless (gst_control_source_get_value (cs, 2 * GST_SECOND, &v));
|
|
|
|
fail_unless_equals_float (v, 1.0);
|
|
|
|
fail_unless (gst_control_source_get_value (cs, 3 * GST_SECOND, &v));
|
|
|
|
fail_unless_equals_float (v, 1.0);
|
2005-08-05 10:02:44 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2012-01-01 13:55:35 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 3 * GST_SECOND);
|
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2005-08-05 10:02:44 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2005-09-20 09:23:39 +00:00
|
|
|
gst_object_unref (elem);
|
2005-08-03 15:59:11 +00:00
|
|
|
}
|
|
|
|
|
2005-08-05 06:57:27 +00:00
|
|
|
GST_END_TEST;
|
|
|
|
|
2005-10-17 17:05:38 +00:00
|
|
|
/* test timed value handling with linear interpolation */
|
2012-01-01 19:57:34 +00:00
|
|
|
GST_START_TEST (controller_interpolation_linear)
|
2005-10-17 17:05:38 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2005-10-17 17:05:38 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2005-10-17 17:05:38 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2005-10-17 17:05:38 +00:00
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
2005-10-17 17:05:38 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 1.0));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2005-10-17 17:05:38 +00:00
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2005-10-17 17:05:38 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2005-10-17 17:05:38 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2007-06-06 14:01:56 +00:00
|
|
|
/* test timed value handling with cubic interpolation */
|
2012-01-01 19:57:34 +00:00
|
|
|
GST_START_TEST (controller_interpolation_cubic)
|
2007-06-06 14:01:56 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2007-06-06 14:01:56 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2007-06-06 14:01:56 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "double", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2007-06-06 14:01:56 +00:00
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_CUBIC, NULL);
|
2007-06-06 14:01:56 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 1 * GST_SECOND, 0.5));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 0.2));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 4 * GST_SECOND, 0.8));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2007-06-06 14:01:56 +00:00
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 50.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 20.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 3 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless (GST_TEST_OBJ (elem)->val_double > 20.0 &&
|
|
|
|
GST_TEST_OBJ (elem)->val_double < 80.0, NULL);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 4 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 80.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 5 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 80.0);
|
2007-06-06 14:01:56 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2007-06-06 14:01:56 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2009-06-01 08:08:31 +00:00
|
|
|
/* test timed value handling with cubic interpolation */
|
2012-01-01 19:57:34 +00:00
|
|
|
GST_START_TEST (controller_interpolation_cubic_too_few_cp)
|
2009-06-01 08:08:31 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2009-06-01 08:08:31 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2009-06-01 08:08:31 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
2009-06-01 08:08:31 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "double", cs)));
|
2009-06-01 08:08:31 +00:00
|
|
|
|
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_CUBIC, NULL);
|
2009-06-01 08:08:31 +00:00
|
|
|
|
|
|
|
/* set 2 control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 0.4));
|
2009-06-01 08:08:31 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps and verify that it used linear
|
|
|
|
* interpolation as we don't gave enough control points
|
|
|
|
*/
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 20.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 40.0);
|
2009-06-01 08:08:31 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2009-06-01 08:08:31 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2006-04-11 21:07:26 +00:00
|
|
|
/* test _unset() */
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
GST_START_TEST (controller_interpolation_unset)
|
2006-04-11 21:07:26 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2006-04-11 21:07:26 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2006-04-11 21:07:26 +00:00
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 1 * GST_SECOND, 1.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 0.5));
|
2006-04-11 21:07:26 +00:00
|
|
|
|
|
|
|
/* verify values */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
|
|
|
/* unset second */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_unset (tvcs, 1 * GST_SECOND));
|
2006-04-11 21:07:26 +00:00
|
|
|
|
|
|
|
/* verify value again */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
2010-02-19 12:26:01 +00:00
|
|
|
/* unset all values, reset and try to unset again */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_unset (tvcs, 0 * GST_SECOND));
|
|
|
|
fail_unless (gst_timed_value_control_source_unset (tvcs, 2 * GST_SECOND));
|
|
|
|
gst_timed_value_control_source_unset_all (tvcs);
|
|
|
|
fail_if (gst_timed_value_control_source_unset (tvcs, 2 * GST_SECOND));
|
2010-02-19 12:26:01 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2006-04-11 21:07:26 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test _unset_all() */
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
GST_START_TEST (controller_interpolation_unset_all)
|
2006-04-11 21:07:26 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2006-04-11 21:07:26 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2006-04-11 21:07:26 +00:00
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 1 * GST_SECOND, 1.0));
|
2006-04-11 21:07:26 +00:00
|
|
|
|
|
|
|
/* verify values */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
2008-06-20 08:17:08 +00:00
|
|
|
/* unset all */
|
2012-01-01 13:55:35 +00:00
|
|
|
gst_timed_value_control_source_unset_all (tvcs);
|
2011-12-25 17:49:01 +00:00
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2006-04-11 21:07:26 +00:00
|
|
|
/* verify value again */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2006-04-11 21:07:26 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2006-04-11 21:07:26 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* test retrieval of an array of values with get_value_array() */
|
|
|
|
GST_START_TEST (controller_interpolation_linear_value_array)
|
2006-04-28 17:33:41 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2006-04-28 17:33:41 +00:00
|
|
|
GstElement *elem;
|
2011-12-22 22:48:30 +00:00
|
|
|
gdouble *raw_values;
|
|
|
|
GValue *g_values;
|
2006-04-28 17:33:41 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2006-04-28 17:33:41 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2006-04-28 17:33:41 +00:00
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
2006-04-28 17:33:41 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 1 * GST_SECOND, 1.0));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* now pull in raw-values for some timestamps */
|
|
|
|
raw_values = g_new (gdouble, 3);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_control_source_get_value_array (cs,
|
|
|
|
0, GST_SECOND / 2, 3, raw_values));
|
2011-12-22 22:48:30 +00:00
|
|
|
fail_unless_equals_float ((raw_values)[0], 0.0);
|
|
|
|
fail_unless_equals_float ((raw_values)[1], 0.5);
|
|
|
|
fail_unless_equals_float ((raw_values)[2], 1.0);
|
|
|
|
|
|
|
|
g_free (raw_values);
|
|
|
|
|
|
|
|
/* now pull in mapped values for some timestamps */
|
|
|
|
g_values = g_new0 (GValue, 3);
|
|
|
|
|
|
|
|
fail_unless (gst_object_get_value_array (GST_OBJECT (elem), "int",
|
2012-01-01 13:55:35 +00:00
|
|
|
0, GST_SECOND / 2, 3, g_values));
|
2011-12-22 22:48:30 +00:00
|
|
|
fail_unless_equals_int (g_value_get_int (&g_values[0]), 0);
|
|
|
|
fail_unless_equals_int (g_value_get_int (&g_values[1]), 50);
|
|
|
|
fail_unless_equals_int (g_value_get_int (&g_values[2]), 100);
|
|
|
|
|
|
|
|
g_free (g_values);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test if values below minimum and above maximum are clipped */
|
|
|
|
GST_START_TEST (controller_interpolation_linear_invalid_values)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "float", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 2.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 4 * GST_SECOND, -2.0));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps and see if clipping works */
|
|
|
|
/* 200.0 */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_float, 100.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* 100.0 */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_float, 100.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* 50.0 */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem),
|
|
|
|
1 * GST_SECOND + 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_float, 50.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* 0.0 */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_float, 0.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* -100.0 */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 3 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_float, 0.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* -200.0 */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 4 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_float, 0.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
GST_START_TEST (controller_interpolation_linear_default_values)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2008-06-20 08:17:08 +00:00
|
|
|
/* Should fail if no value was set yet
|
|
|
|
* FIXME: will not fail, as interpolation assumes val[0]=default_value if
|
|
|
|
* nothing else is set.
|
2012-01-31 11:20:41 +00:00
|
|
|
fail_if (gst_timed_value_control_source_set (tvcs, 1 * GST_SECOND, &val_int));
|
2008-06-20 08:17:08 +00:00
|
|
|
*/
|
2006-04-28 17:33:41 +00:00
|
|
|
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 1 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 3 * GST_SECOND, 1.0));
|
2006-04-28 17:33:41 +00:00
|
|
|
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* now pull in values for some timestamps */
|
|
|
|
/* should give the value of the first control point for timestamps before it */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 3 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2006-04-28 17:33:41 +00:00
|
|
|
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 1.0));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* unset the old ones */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_unset (tvcs, 1 * GST_SECOND));
|
|
|
|
fail_unless (gst_timed_value_control_source_unset (tvcs, 3 * GST_SECOND));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
|
|
|
/* should now give our value for timestamp 0 */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2006-04-28 17:33:41 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
/* test gst_controller_set_disabled() with linear interpolation */
|
2012-01-01 19:57:34 +00:00
|
|
|
GST_START_TEST (controller_interpolation_linear_disabled)
|
2005-08-23 21:32:31 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs1, *cs2;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs1, *tvcs2;
|
2005-08-23 21:32:31 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2005-08-23 21:32:31 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs1 = gst_interpolation_control_source_new ();
|
|
|
|
tvcs1 = (GstTimedValueControlSource *) cs1;
|
2012-01-01 13:55:35 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
cs2 = gst_interpolation_control_source_new ();
|
|
|
|
tvcs2 = (GstTimedValueControlSource *) cs2;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs1)));
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "double", cs2)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs1, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
|
|
|
g_object_set (cs2, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs1, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs1, 2 * GST_SECOND, 1.0));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs2, 0 * GST_SECOND, 0.2));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs2, 2 * GST_SECOND, 0.4));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 20.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 30.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 40.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps, prop double disabled */
|
2011-12-25 17:49:01 +00:00
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
|
|
|
GST_TEST_OBJ (elem)->val_double = 0.0;
|
2011-12-20 21:36:18 +00:00
|
|
|
gst_object_set_control_binding_disabled (GST_OBJECT (elem), "double", TRUE);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps, after enabling double again */
|
2011-12-25 17:49:01 +00:00
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
|
|
|
GST_TEST_OBJ (elem)->val_double = 0.0;
|
2011-12-20 21:36:18 +00:00
|
|
|
gst_object_set_control_binding_disabled (GST_OBJECT (elem), "double", FALSE);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 20.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 30.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 40.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps, after disabling all props */
|
2011-12-25 17:49:01 +00:00
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
|
|
|
GST_TEST_OBJ (elem)->val_double = 0.0;
|
2011-12-20 21:36:18 +00:00
|
|
|
gst_object_set_control_bindings_disabled (GST_OBJECT (elem), TRUE);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 0.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps, enabling double again */
|
2011-12-25 17:49:01 +00:00
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
|
|
|
GST_TEST_OBJ (elem)->val_double = 0.0;
|
2011-12-20 21:36:18 +00:00
|
|
|
gst_object_set_control_binding_disabled (GST_OBJECT (elem), "double", FALSE);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 20.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 30.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 40.0);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps, enabling all */
|
2011-12-25 17:49:01 +00:00
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
|
|
|
GST_TEST_OBJ (elem)->val_double = 0.0;
|
2011-12-20 21:36:18 +00:00
|
|
|
gst_object_set_control_bindings_disabled (GST_OBJECT (elem), FALSE);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 20.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 30.0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
|
|
|
fail_unless_equals_float (GST_TEST_OBJ (elem)->val_double, 40.0);
|
2005-08-23 21:32:31 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs1);
|
|
|
|
gst_object_unref (cs2);
|
2005-09-20 09:23:39 +00:00
|
|
|
gst_object_unref (elem);
|
2005-08-23 21:32:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
|
|
|
GST_START_TEST (controller_interpolation_set_from_list)
|
2006-09-29 12:31:18 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2006-09-29 12:31:18 +00:00
|
|
|
GstTimedValue *tval;
|
|
|
|
GstElement *elem;
|
|
|
|
GSList *list = NULL;
|
|
|
|
|
|
|
|
/* test that an invalid timestamp throws a warning of some sort */
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2006-09-29 12:31:18 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
|
2006-09-29 12:31:18 +00:00
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
2006-09-29 12:31:18 +00:00
|
|
|
|
|
|
|
/* set control value */
|
|
|
|
tval = g_new0 (GstTimedValue, 1);
|
|
|
|
tval->timestamp = GST_CLOCK_TIME_NONE;
|
2011-12-22 22:48:30 +00:00
|
|
|
tval->value = 0.0;
|
2006-09-29 12:31:18 +00:00
|
|
|
|
|
|
|
list = g_slist_append (list, tval);
|
|
|
|
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_if (gst_timed_value_control_source_set_from_list (tvcs, list));
|
2006-09-29 12:31:18 +00:00
|
|
|
|
|
|
|
/* try again with a valid stamp, should work now */
|
|
|
|
tval->timestamp = 0;
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set_from_list (tvcs, list));
|
2006-09-29 12:31:18 +00:00
|
|
|
|
|
|
|
/* allocated GstTimedValue now belongs to the controller, but list not */
|
libs/gst/controller/: Add a new private GstControlPoint struct which "inherits" from
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/gstcontroller.c: (gst_control_point_compare),
(gst_control_point_find), (gst_controlled_property_new),
(gst_control_point_free), (gst_controlled_property_free),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_sync_values):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstinterpolation.c:
(gst_controlled_property_find_control_point_node),
(interpolate_none_get), (interpolate_trigger_get):
Add a new private GstControlPoint struct which "inherits" from
GstTimedValue to allow different interpolators to store internal
values next to each control point. From the outside everything is
still a GstControlPoint so we don't loose binary compatibility.
Also fixup all the GValue handling to not leak GValues or list nodes.
* tests/check/libs/controller.c: (GST_START_TEST):
Free the list nodes and GValues in the controller_misc test.
2007-05-17 17:05:36 +00:00
|
|
|
g_free (tval);
|
2006-09-29 12:31:18 +00:00
|
|
|
g_slist_free (list);
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2006-09-29 12:31:18 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
2005-08-23 21:32:31 +00:00
|
|
|
|
2011-12-19 10:13:45 +00:00
|
|
|
|
|
|
|
/* test linear interpolation for ts < first control point */
|
2012-01-01 19:57:34 +00:00
|
|
|
GST_START_TEST (controller_interpolation_linear_before_ts0)
|
2011-12-19 10:13:45 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2011-12-19 10:13:45 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
2011-12-19 10:13:45 +00:00
|
|
|
|
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 1.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 4 * GST_SECOND, 0.0));
|
2011-12-19 10:13:45 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps after first control point */
|
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 3 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 4 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps before first control point */
|
2011-12-25 17:49:01 +00:00
|
|
|
GST_TEST_OBJ (elem)->val_int = 25;
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2012-01-01 19:55:20 +00:00
|
|
|
/* test linear interpolation of enums */
|
2012-01-01 19:57:34 +00:00
|
|
|
GST_START_TEST (controller_interpolation_linear_enums)
|
2012-01-01 19:55:20 +00:00
|
|
|
{
|
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2012-01-01 19:55:20 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
|
|
|
|
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
2012-01-01 19:55:20 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "enum", cs)));
|
2012-01-01 19:55:20 +00:00
|
|
|
|
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
|
2012-01-01 19:55:20 +00:00
|
|
|
|
|
|
|
/* set control values */
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 4 * GST_SECOND, 1.0));
|
|
|
|
|
|
|
|
/* now pull in values going over the enum values */
|
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_enum, ENUM_V0);
|
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_enum, ENUM_V10);
|
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_enum, ENUM_V11);
|
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 3 * GST_SECOND);
|
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_enum, ENUM_V12);
|
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 4 * GST_SECOND);
|
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_enum, ENUM_V255);
|
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2012-01-01 19:55:20 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2012-01-01 13:55:35 +00:00
|
|
|
/* test timed value counts */
|
|
|
|
GST_START_TEST (controller_timed_value_count)
|
2011-12-19 10:13:45 +00:00
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
2012-01-31 11:20:41 +00:00
|
|
|
GstTimedValueControlSource *tvcs;
|
2011-12-19 10:13:45 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_interpolation_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
2011-12-19 10:13:45 +00:00
|
|
|
|
|
|
|
/* set interpolation mode */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_get_count (tvcs) == 0);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_get_count (tvcs) == 1);
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 1.0));
|
|
|
|
fail_unless (gst_timed_value_control_source_get_count (tvcs) == 2);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2012-01-01 13:55:35 +00:00
|
|
|
/* unset control values */
|
|
|
|
fail_unless (gst_timed_value_control_source_unset (tvcs, 2 * GST_SECOND));
|
|
|
|
fail_unless (gst_timed_value_control_source_get_count (tvcs) == 1);
|
|
|
|
fail_unless (gst_timed_value_control_source_unset (tvcs, 0 * GST_SECOND));
|
|
|
|
fail_unless (gst_timed_value_control_source_get_count (tvcs) == 0);
|
2011-12-19 10:13:45 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2012-01-01 13:55:35 +00:00
|
|
|
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
/* test lfo control source with sine waveform */
|
|
|
|
GST_START_TEST (controller_lfo_sine)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new lfo control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_lfo_control_source_new ();
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* configure lfo */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "waveform", GST_LFO_WAVEFORM_SINE,
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
"frequency", 1.0, "timeshift", (GstClockTime) 0,
|
2011-12-22 22:48:30 +00:00
|
|
|
"amplitude", 0.5, "offset", 0.5, NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test lfo control source with sine waveform and timeshift */
|
|
|
|
GST_START_TEST (controller_lfo_sine_timeshift)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new lfo control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_lfo_control_source_new ();
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* configure lfo */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "waveform", GST_LFO_WAVEFORM_SINE,
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
"frequency", 1.0, "timeshift", 250 * GST_MSECOND,
|
2011-12-22 22:48:30 +00:00
|
|
|
"amplitude", 0.5, "offset", 0.5, NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-01 13:55:35 +00:00
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test lfo control source with square waveform */
|
|
|
|
GST_START_TEST (controller_lfo_square)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new lfo control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_lfo_control_source_new ();
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* configure lfo */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "waveform", GST_LFO_WAVEFORM_SQUARE,
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
"frequency", 1.0, "timeshift", (GstClockTime) 0,
|
2011-12-22 22:48:30 +00:00
|
|
|
"amplitude", 0.5, "offset", 0.5, NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test lfo control source with saw waveform */
|
|
|
|
GST_START_TEST (controller_lfo_saw)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new lfo control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_lfo_control_source_new ();
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* configure lfo */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "waveform", GST_LFO_WAVEFORM_SAW,
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
"frequency", 1.0, "timeshift", (GstClockTime) 0,
|
2011-12-22 22:48:30 +00:00
|
|
|
"amplitude", 0.5, "offset", 0.5, NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 75);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 75);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 75);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test lfo control source with reverse saw waveform */
|
|
|
|
GST_START_TEST (controller_lfo_rsaw)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new lfo control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_lfo_control_source_new ();
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* configure lfo */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "waveform", GST_LFO_WAVEFORM_REVERSE_SAW,
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
"frequency", 1.0, "timeshift", (GstClockTime) 0,
|
2011-12-22 22:48:30 +00:00
|
|
|
"amplitude", 0.5, "offset", 0.5, NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 75);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 75);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 25);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 75);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test lfo control source with saw waveform */
|
|
|
|
GST_START_TEST (controller_lfo_triangle)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new lfo control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_lfo_control_source_new ();
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* configure lfo */
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "waveform", GST_LFO_WAVEFORM_TRIANGLE,
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
"frequency", 1.0, "timeshift", (GstClockTime) 0,
|
2011-12-22 22:48:30 +00:00
|
|
|
"amplitude", 0.5, "offset", 0.5, NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
/* test lfo control source with nothing set */
|
|
|
|
GST_START_TEST (controller_lfo_none)
|
|
|
|
{
|
2012-01-01 13:55:35 +00:00
|
|
|
GstControlSource *cs;
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
GstElement *elem;
|
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new lfo control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_lfo_control_source_new ();
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
|
|
|
/* now pull in values for some timestamps */
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2000 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1250 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1500 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1750 * GST_MSECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2011-12-19 10:13:45 +00:00
|
|
|
/* test timed value handling in trigger mode */
|
|
|
|
GST_START_TEST (controller_trigger_exact)
|
2008-06-20 08:17:08 +00:00
|
|
|
{
|
2011-12-22 22:48:30 +00:00
|
|
|
GstControlSource *cs;
|
|
|
|
GstTimedValueControlSource *tvcs;
|
2008-06-20 08:17:08 +00:00
|
|
|
GstElement *elem;
|
2011-12-22 22:48:30 +00:00
|
|
|
gdouble raw_val;
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_trigger_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
fail_if (gst_control_source_get_value (cs, 0 * GST_SECOND, &raw_val));
|
2008-06-20 08:17:08 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.5));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 1.0));
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-19 10:13:45 +00:00
|
|
|
/* now pull in values for some timestamps */
|
2011-12-22 22:48:30 +00:00
|
|
|
fail_unless (gst_control_source_get_value (cs, 0 * GST_SECOND, &raw_val));
|
2011-12-31 08:56:53 +00:00
|
|
|
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-12-31 08:56:53 +00:00
|
|
|
|
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
|
|
|
fail_if (gst_control_source_get_value (cs, 1 * GST_SECOND, &raw_val));
|
2011-11-10 17:37:28 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-12-31 08:56:53 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
fail_unless (gst_control_source_get_value (cs, 2 * GST_SECOND, &raw_val));
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2008-06-20 08:17:08 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2011-12-19 10:13:45 +00:00
|
|
|
GST_START_TEST (controller_trigger_tolerance)
|
2008-06-20 08:17:08 +00:00
|
|
|
{
|
2011-12-22 22:48:30 +00:00
|
|
|
GstControlSource *cs;
|
|
|
|
GstTimedValueControlSource *tvcs;
|
2008-06-20 08:17:08 +00:00
|
|
|
GstElement *elem;
|
2011-12-22 22:48:30 +00:00
|
|
|
gdouble raw_val;
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-25 17:49:01 +00:00
|
|
|
elem = gst_element_factory_make ("testobj", NULL);
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
/* new interpolation control source */
|
2012-01-31 11:20:41 +00:00
|
|
|
cs = gst_trigger_control_source_new ();
|
|
|
|
tvcs = (GstTimedValueControlSource *) cs;
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2012-01-20 13:42:31 +00:00
|
|
|
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
|
2012-01-30 18:17:00 +00:00
|
|
|
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
g_object_set (cs, "tolerance", G_GINT64_CONSTANT (10), NULL);
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-22 22:48:30 +00:00
|
|
|
fail_if (gst_control_source_get_value (cs, 0 * GST_SECOND, &raw_val));
|
2008-06-20 08:17:08 +00:00
|
|
|
|
|
|
|
/* set control values */
|
2012-01-01 13:55:35 +00:00
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.5));
|
|
|
|
fail_unless (gst_timed_value_control_source_set (tvcs, 2 * GST_SECOND, 1.0));
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2011-12-19 10:13:45 +00:00
|
|
|
/* now pull in values for some timestamps */
|
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_SECOND + 5);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 50);
|
2011-12-31 08:56:53 +00:00
|
|
|
|
|
|
|
GST_TEST_OBJ (elem)->val_int = 0;
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 1 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 0);
|
2011-12-31 08:56:53 +00:00
|
|
|
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND - 5);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2011-12-19 10:13:45 +00:00
|
|
|
gst_object_sync_values (GST_OBJECT (elem), 2 * GST_SECOND);
|
2011-12-25 17:49:01 +00:00
|
|
|
fail_unless_equals_int (GST_TEST_OBJ (elem)->val_int, 100);
|
2008-06-20 08:17:08 +00:00
|
|
|
|
2012-01-31 11:20:41 +00:00
|
|
|
gst_object_unref (cs);
|
2008-06-20 08:17:08 +00:00
|
|
|
gst_object_unref (elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
|
2006-09-29 12:31:18 +00:00
|
|
|
static Suite *
|
2005-08-05 06:57:27 +00:00
|
|
|
gst_controller_suite (void)
|
2005-08-03 15:59:11 +00:00
|
|
|
{
|
|
|
|
Suite *s = suite_create ("Controller");
|
|
|
|
TCase *tc = tcase_create ("general");
|
|
|
|
|
|
|
|
suite_add_tcase (s, tc);
|
2011-11-04 13:00:24 +00:00
|
|
|
tcase_add_checked_fixture (tc, setup, teardown);
|
2010-04-27 06:42:05 +00:00
|
|
|
tcase_add_test (tc, controller_controlsource_empty1);
|
|
|
|
tcase_add_test (tc, controller_controlsource_empty2);
|
2012-01-01 19:57:34 +00:00
|
|
|
tcase_add_test (tc, controller_interpolation_none);
|
|
|
|
tcase_add_test (tc, controller_interpolation_linear);
|
|
|
|
tcase_add_test (tc, controller_interpolation_cubic);
|
|
|
|
tcase_add_test (tc, controller_interpolation_cubic_too_few_cp);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
tcase_add_test (tc, controller_interpolation_unset);
|
|
|
|
tcase_add_test (tc, controller_interpolation_unset_all);
|
|
|
|
tcase_add_test (tc, controller_interpolation_linear_value_array);
|
|
|
|
tcase_add_test (tc, controller_interpolation_linear_invalid_values);
|
|
|
|
tcase_add_test (tc, controller_interpolation_linear_default_values);
|
2012-01-01 19:57:34 +00:00
|
|
|
tcase_add_test (tc, controller_interpolation_linear_disabled);
|
libs/gst/controller/: API: Refactor GstController into the core controller which can take a GstControlSource for prov...
Original commit message from CVS:
Reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstcontroller.c:
(gst_controlled_property_add_interpolation_control_source),
(gst_controlled_property_new), (gst_controlled_property_free),
(gst_controller_find_controlled_property),
(gst_controller_new_valist), (gst_controller_new_list),
(gst_controller_new), (gst_controller_remove_properties_valist),
(gst_controller_remove_properties_list),
(gst_controller_remove_properties),
(gst_controller_set_property_disabled),
(gst_controller_set_disabled), (gst_controller_set_control_source),
(gst_controller_get_control_source), (gst_controller_get),
(gst_controller_sync_values), (gst_controller_get_value_array),
(_gst_controller_dispose), (gst_controller_get_type),
(gst_controlled_property_set_interpolation_mode),
(gst_controller_set), (gst_controller_set_from_list),
(gst_controller_unset), (gst_controller_unset_all),
(gst_controller_get_all), (gst_controller_set_interpolation_mode):
* libs/gst/controller/gstcontroller.h:
* libs/gst/controller/gstcontrollerprivate.h:
* libs/gst/controller/gstcontrolsource.c:
(gst_control_source_class_init), (gst_control_source_init),
(gst_control_source_get_value),
(gst_control_source_get_value_array), (gst_control_source_bind):
* libs/gst/controller/gstcontrolsource.h:
* libs/gst/controller/gsthelper.c: (gst_object_set_control_source),
(gst_object_get_control_source):
* libs/gst/controller/gstinterpolation.c:
(gst_interpolation_control_source_find_control_point_node),
(gst_interpolation_control_source_get_first_value),
(_interpolate_none_get), (interpolate_none_get),
(interpolate_none_get_boolean_value_array),
(interpolate_none_get_enum_value_array),
(interpolate_none_get_string_value_array),
(_interpolate_trigger_get), (interpolate_trigger_get),
(interpolate_trigger_get_boolean_value_array),
(interpolate_trigger_get_enum_value_array),
(interpolate_trigger_get_string_value_array):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_control_point_free), (gst_interpolation_control_source_reset),
(gst_interpolation_control_source_new),
(gst_interpolation_control_source_set_interpolation_mode),
(gst_interpolation_control_source_bind),
(gst_control_point_compare), (gst_control_point_find),
(gst_interpolation_control_source_set_internal),
(gst_interpolation_control_source_set),
(gst_interpolation_control_source_set_from_list),
(gst_interpolation_control_source_unset),
(gst_interpolation_control_source_unset_all),
(gst_interpolation_control_source_get_all),
(gst_interpolation_control_source_get_count),
(gst_interpolation_control_source_init),
(gst_interpolation_control_source_finalize),
(gst_interpolation_control_source_dispose),
(gst_interpolation_control_source_class_init):
* libs/gst/controller/gstinterpolationcontrolsource.h:
* libs/gst/controller/gstinterpolationcontrolsourceprivate.h:
API: Refactor GstController into the core controller which can take
a GstControlSource for providing actual values for timestamps.
Implement a interpolation control source and use this for backward
compatibility, deprecate a bunch of functions that are now handled
by GstControlSource or GstInterpolationControlSource.
Make it possible to disable the controller completely or only for
specific properties. Fixes #450711.
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add new functions and classes to the docs.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* tests/examples/controller/audio-example.c: (main):
Port unit test and example to the new API and add some new
unit tests.
2007-07-06 21:50:02 +00:00
|
|
|
tcase_add_test (tc, controller_interpolation_set_from_list);
|
2012-01-01 19:57:34 +00:00
|
|
|
tcase_add_test (tc, controller_interpolation_linear_before_ts0);
|
|
|
|
tcase_add_test (tc, controller_interpolation_linear_enums);
|
2012-01-01 13:55:35 +00:00
|
|
|
tcase_add_test (tc, controller_timed_value_count);
|
libs/gst/controller/: API: Add GstLFOControlSource, a control source that gives values for specific timestamps based ...
Original commit message from CVS:
reviewed by: Stefan Kost <ensonic@users.sf.net>
* libs/gst/controller/Makefile.am:
* libs/gst/controller/gstlfocontrolsource.c: (_calculate_pos),
(gst_lfo_waveform_get_type), (gst_lfo_control_source_reset),
(gst_lfo_control_source_new),
(gst_lfo_control_source_set_waveform),
(gst_lfo_control_source_bind), (gst_lfo_control_source_init),
(gst_lfo_control_source_finalize),
(gst_lfo_control_source_dispose),
(gst_lfo_control_source_set_property),
(gst_lfo_control_source_get_property),
(gst_lfo_control_source_class_init):
* libs/gst/controller/gstlfocontrolsource.h:
* libs/gst/controller/gstlfocontrolsourceprivate.h:
API: Add GstLFOControlSource, a control source that gives values
for specific timestamps based on several periodic waveforms.
Fixes #459717.
* tests/check/libs/controller.c: (GST_START_TEST),
(gst_controller_suite):
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* docs/libs/gstreamer-libs.types:
Add documentation and unit tests for GstLFOControlSource.
2007-08-03 15:47:17 +00:00
|
|
|
tcase_add_test (tc, controller_lfo_sine);
|
|
|
|
tcase_add_test (tc, controller_lfo_sine_timeshift);
|
|
|
|
tcase_add_test (tc, controller_lfo_square);
|
|
|
|
tcase_add_test (tc, controller_lfo_saw);
|
|
|
|
tcase_add_test (tc, controller_lfo_rsaw);
|
|
|
|
tcase_add_test (tc, controller_lfo_triangle);
|
|
|
|
tcase_add_test (tc, controller_lfo_none);
|
2011-12-19 10:13:45 +00:00
|
|
|
tcase_add_test (tc, controller_trigger_exact);
|
|
|
|
tcase_add_test (tc, controller_trigger_tolerance);
|
2005-08-03 15:59:11 +00:00
|
|
|
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
2006-07-01 20:56:56 +00:00
|
|
|
GST_CHECK_MAIN (gst_controller);
|