controller: rename control-bindings

gst_control_binding_xxx -> gst_xxx_control_binding for consistency.
This commit is contained in:
Stefan Sauer 2012-01-30 19:17:00 +01:00
parent c4bee19a25
commit 4deaf9b8be
12 changed files with 207 additions and 207 deletions

View file

@ -117,7 +117,7 @@
* </para></listitem>
* <listitem><para>
* Attach the #GstControlSource on the controller to a property.
* gst_object_add_control_binding (object, gst_control_binding_direct_new (objetct, "prop1", csource));
* gst_object_add_control_binding (object, gst_direct_control_binding_new (objetct, "prop1", csource));
* </para></listitem>
* <listitem><para>
* Set the control values

View file

@ -2,16 +2,16 @@ lib_LTLIBRARIES = libgstcontroller-@GST_MAJORMINOR@.la
libgstcontroller_@GST_MAJORMINOR@_includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/controller
libgstcontroller_@GST_MAJORMINOR@_include_HEADERS = \
gstcontrolbindingargb.h \
gstcontrolbindingdirect.h \
gstargbcontrolbinding.h \
gstdirectcontrolbinding.h \
gsttimedvaluecontrolsource.h \
gstinterpolationcontrolsource.h \
gsttriggercontrolsource.h \
gstlfocontrolsource.h
libgstcontroller_@GST_MAJORMINOR@_la_SOURCES = \
gstcontrolbindingargb.c \
gstcontrolbindingdirect.c \
gstargbcontrolbinding.c \
gstdirectcontrolbinding.c \
gsttimedvaluecontrolsource.c \
gstinterpolationcontrolsource.c \
gsttriggercontrolsource.c \

View file

@ -2,7 +2,7 @@
*
* Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net>
*
* gstcontrolbindingargb.c: Attachment for multiple control sources to gargb
* gstargbcontrolbinding.c: Attachment for multiple control sources to gargb
* properties
*
* This library is free software; you can redistribute it and/or
@ -21,7 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
/**
* SECTION:gstcontrolbindingargb
* SECTION:gstargbcontrolbinding
* @short_description: attachment for control source sources to argb properties
*
* A value mapping object that attaches multiple control sources to a guint
@ -31,35 +31,35 @@
#include <glib-object.h>
#include <gst/gst.h>
#include "gstcontrolbindingargb.h"
#include "gstargbcontrolbinding.h"
#include <math.h>
#define GST_CAT_DEFAULT control_binding_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static GObject *gst_control_binding_argb_constructor (GType type,
static GObject *gst_argb_control_binding_constructor (GType type,
guint n_construct_params, GObjectConstructParam * construct_params);
static void gst_control_binding_argb_set_property (GObject * object,
static void gst_argb_control_binding_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_control_binding_argb_get_property (GObject * object,
static void gst_argb_control_binding_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static void gst_control_binding_argb_dispose (GObject * object);
static void gst_control_binding_argb_finalize (GObject * object);
static void gst_argb_control_binding_dispose (GObject * object);
static void gst_argb_control_binding_finalize (GObject * object);
static gboolean gst_control_binding_argb_sync_values (GstControlBinding * _self,
static gboolean gst_argb_control_binding_sync_values (GstControlBinding * _self,
GstObject * object, GstClockTime timestamp, GstClockTime last_sync);
static GValue *gst_control_binding_argb_get_value (GstControlBinding * _self,
static GValue *gst_argb_control_binding_get_value (GstControlBinding * _self,
GstClockTime timestamp);
static gboolean gst_control_binding_argb_get_value_array (GstControlBinding *
static gboolean gst_argb_control_binding_get_value_array (GstControlBinding *
_self, GstClockTime timestamp, GstClockTime interval, guint n_values,
GValue * values);
#define _do_init \
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstcontrolbindingargb", 0, \
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstargbcontrolbinding", 0, \
"dynamic parameter control source attachment");
G_DEFINE_TYPE_WITH_CODE (GstControlBindingARGB, gst_control_binding_argb,
G_DEFINE_TYPE_WITH_CODE (GstARGBControlBinding, gst_argb_control_binding,
GST_TYPE_CONTROL_BINDING, _do_init);
enum
@ -77,22 +77,22 @@ static GParamSpec *properties[PROP_LAST];
/* vmethods */
static void
gst_control_binding_argb_class_init (GstControlBindingARGBClass * klass)
gst_argb_control_binding_class_init (GstARGBControlBindingClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstControlBindingClass *control_binding_class =
GST_CONTROL_BINDING_CLASS (klass);
gobject_class->constructor = gst_control_binding_argb_constructor;
gobject_class->set_property = gst_control_binding_argb_set_property;
gobject_class->get_property = gst_control_binding_argb_get_property;
gobject_class->dispose = gst_control_binding_argb_dispose;
gobject_class->finalize = gst_control_binding_argb_finalize;
gobject_class->constructor = gst_argb_control_binding_constructor;
gobject_class->set_property = gst_argb_control_binding_set_property;
gobject_class->get_property = gst_argb_control_binding_get_property;
gobject_class->dispose = gst_argb_control_binding_dispose;
gobject_class->finalize = gst_argb_control_binding_finalize;
control_binding_class->sync_values = gst_control_binding_argb_sync_values;
control_binding_class->get_value = gst_control_binding_argb_get_value;
control_binding_class->sync_values = gst_argb_control_binding_sync_values;
control_binding_class->get_value = gst_argb_control_binding_get_value;
control_binding_class->get_value_array =
gst_control_binding_argb_get_value_array;
gst_argb_control_binding_get_value_array;
properties[PROP_CS_A] =
g_param_spec_object ("control-source-a", "ControlSource A",
@ -122,19 +122,19 @@ gst_control_binding_argb_class_init (GstControlBindingARGBClass * klass)
}
static void
gst_control_binding_argb_init (GstControlBindingARGB * self)
gst_argb_control_binding_init (GstARGBControlBinding * self)
{
}
static GObject *
gst_control_binding_argb_constructor (GType type, guint n_construct_params,
gst_argb_control_binding_constructor (GType type, guint n_construct_params,
GObjectConstructParam * construct_params)
{
GstControlBindingARGB *self;
GstARGBControlBinding *self;
self =
GST_CONTROL_BINDING_ARGB (G_OBJECT_CLASS
(gst_control_binding_argb_parent_class)
GST_ARGB_CONTROL_BINDING (G_OBJECT_CLASS
(gst_argb_control_binding_parent_class)
->constructor (type, n_construct_params, construct_params));
if (GST_CONTROL_BINDING_PSPEC (self)) {
@ -151,10 +151,10 @@ gst_control_binding_argb_constructor (GType type, guint n_construct_params,
}
static void
gst_control_binding_argb_set_property (GObject * object, guint prop_id,
gst_argb_control_binding_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstControlBindingARGB *self = GST_CONTROL_BINDING_ARGB (object);
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (object);
switch (prop_id) {
case PROP_CS_A:
@ -176,10 +176,10 @@ gst_control_binding_argb_set_property (GObject * object, guint prop_id,
}
static void
gst_control_binding_argb_get_property (GObject * object, guint prop_id,
gst_argb_control_binding_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstControlBindingARGB *self = GST_CONTROL_BINDING_ARGB (object);
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (object);
switch (prop_id) {
case PROP_CS_A:
@ -201,9 +201,9 @@ gst_control_binding_argb_get_property (GObject * object, guint prop_id,
}
static void
gst_control_binding_argb_dispose (GObject * object)
gst_argb_control_binding_dispose (GObject * object)
{
GstControlBindingARGB *self = GST_CONTROL_BINDING_ARGB (object);
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (object);
if (self->cs_a)
gst_object_replace ((GstObject **) & self->cs_a, NULL);
@ -216,22 +216,22 @@ gst_control_binding_argb_dispose (GObject * object)
}
static void
gst_control_binding_argb_finalize (GObject * object)
gst_argb_control_binding_finalize (GObject * object)
{
GstControlBindingARGB *self = GST_CONTROL_BINDING_ARGB (object);
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (object);
g_value_unset (&self->cur_value);
}
static gboolean
gst_control_binding_argb_sync_values (GstControlBinding * _self,
gst_argb_control_binding_sync_values (GstControlBinding * _self,
GstObject * object, GstClockTime timestamp, GstClockTime last_sync)
{
GstControlBindingARGB *self = GST_CONTROL_BINDING_ARGB (_self);
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (_self);
gdouble src_val_a = 1.0, src_val_r = 0.0, src_val_g = 0.0, src_val_b = 0.0;
gboolean ret = TRUE;
g_return_val_if_fail (GST_IS_CONTROL_BINDING_ARGB (self), FALSE);
g_return_val_if_fail (GST_IS_ARGB_CONTROL_BINDING (self), FALSE);
g_return_val_if_fail (GST_CONTROL_BINDING_PSPEC (self), FALSE);
GST_LOG_OBJECT (object, "property '%s' at ts=%" GST_TIME_FORMAT,
@ -272,15 +272,15 @@ gst_control_binding_argb_sync_values (GstControlBinding * _self,
}
static GValue *
gst_control_binding_argb_get_value (GstControlBinding * _self,
gst_argb_control_binding_get_value (GstControlBinding * _self,
GstClockTime timestamp)
{
GstControlBindingARGB *self = GST_CONTROL_BINDING_ARGB (_self);
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (_self);
GValue *dst_val = NULL;
gdouble src_val_a = 1.0, src_val_r = 0.0, src_val_g = 0.0, src_val_b = 0.0;
gboolean ret = TRUE;
g_return_val_if_fail (GST_IS_CONTROL_BINDING_ARGB (self), NULL);
g_return_val_if_fail (GST_IS_ARGB_CONTROL_BINDING (self), NULL);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), NULL);
g_return_val_if_fail (GST_CONTROL_BINDING_PSPEC (self), FALSE);
@ -310,18 +310,18 @@ gst_control_binding_argb_get_value (GstControlBinding * _self,
}
static gboolean
gst_control_binding_argb_get_value_array (GstControlBinding * _self,
gst_argb_control_binding_get_value_array (GstControlBinding * _self,
GstClockTime timestamp, GstClockTime interval, guint n_values,
GValue * values)
{
GstControlBindingARGB *self = GST_CONTROL_BINDING_ARGB (_self);
GstARGBControlBinding *self = GST_ARGB_CONTROL_BINDING (_self);
gint i;
gdouble *src_val_a = NULL, *src_val_r = NULL, *src_val_g = NULL, *src_val_b =
NULL;
guint src_val;
gboolean ret = TRUE;
g_return_val_if_fail (GST_IS_CONTROL_BINDING_ARGB (self), FALSE);
g_return_val_if_fail (GST_IS_ARGB_CONTROL_BINDING (self), FALSE);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (interval), FALSE);
g_return_val_if_fail (values, FALSE);
@ -379,7 +379,7 @@ gst_control_binding_argb_get_value_array (GstControlBinding * _self,
/* functions */
/**
* gst_control_binding_argb_new:
* gst_argb_control_binding_new:
* @object: the object of the property
* @property_name: the property-name to attach the control source
* @cs_a: the control source for the alpha channel
@ -390,14 +390,14 @@ gst_control_binding_argb_get_value_array (GstControlBinding * _self,
* Create a new control-binding that attaches the given #GstControlSource to the
* #GObject property.
*
* Returns: (transfer floating): the new #GstControlBindingARGB
* Returns: (transfer floating): the new #GstARGBControlBinding
*/
GstControlBinding *
gst_control_binding_argb_new (GstObject * object, const gchar * property_name,
gst_argb_control_binding_new (GstObject * object, const gchar * property_name,
GstControlSource * cs_a, GstControlSource * cs_r, GstControlSource * cs_g,
GstControlSource * cs_b)
{
return (GstControlBinding *) g_object_new (GST_TYPE_CONTROL_BINDING_ARGB,
return (GstControlBinding *) g_object_new (GST_TYPE_ARGB_CONTROL_BINDING,
"object", object, "name", property_name,
"control-source-a", cs_a,
"control-source-r", cs_r,

View file

@ -2,7 +2,7 @@
*
* Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net>
*
* gstcontrolbindingargb.h: Attachment for multiple control sources to gargb
* gstargbcontrolbinding.h: Attachment for multiple control sources to gargb
* properties
*
* This library is free software; you can redistribute it and/or
@ -21,8 +21,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_CONTROL_BINDING_ARGB_H__
#define __GST_CONTROL_BINDING_ARGB_H__
#ifndef __GST_ARGB_CONTROL_BINDING_H__
#define __GST_ARGB_CONTROL_BINDING_H__
#include <gst/gstconfig.h>
@ -32,29 +32,29 @@
G_BEGIN_DECLS
#define GST_TYPE_CONTROL_BINDING_ARGB \
(gst_control_binding_argb_get_type())
#define GST_CONTROL_BINDING_ARGB(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CONTROL_BINDING_ARGB,GstControlBindingARGB))
#define GST_CONTROL_BINDING_ARGB_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CONTROL_BINDING_ARGB,GstControlBindingARGBClass))
#define GST_IS_CONTROL_BINDING_ARGB(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CONTROL_BINDING_ARGB))
#define GST_IS_CONTROL_BINDING_ARGB_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CONTROL_BINDING_ARGB))
#define GST_CONTROL_BINDING_ARGB_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstControlBindingARGBClass))
#define GST_TYPE_ARGB_CONTROL_BINDING \
(gst_argb_control_binding_get_type())
#define GST_ARGB_CONTROL_BINDING(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ARGB_CONTROL_BINDING,GstARGBControlBinding))
#define GST_ARGB_CONTROL_BINDING_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ARGB_CONTROL_BINDING,GstARGBControlBindingClass))
#define GST_IS_ARGB_CONTROL_BINDING(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ARGB_CONTROL_BINDING))
#define GST_IS_ARGB_CONTROL_BINDING_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ARGB_CONTROL_BINDING))
#define GST_ARGB_CONTROL_BINDING_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstARGBControlBindingClass))
typedef struct _GstControlBindingARGB GstControlBindingARGB;
typedef struct _GstControlBindingARGBClass GstControlBindingARGBClass;
typedef struct _GstARGBControlBinding GstARGBControlBinding;
typedef struct _GstARGBControlBindingClass GstARGBControlBindingClass;
/**
* GstControlBindingARGB:
* GstARGBControlBinding:
* @name: name of the property of this binding
*
* The instance structure of #GstControlBindingARGB.
* The instance structure of #GstARGBControlBinding.
*/
struct _GstControlBindingARGB {
struct _GstARGBControlBinding {
GstControlBinding parent;
/*< private >*/
@ -70,14 +70,14 @@ struct _GstControlBindingARGB {
};
/**
* GstControlBindingARGBClass:
* GstARGBControlBindingClass:
* @parent_class: Parent class
* @convert: Class method to convert control-values
*
* The class structure of #GstControlBindingARGB.
* The class structure of #GstARGBControlBinding.
*/
struct _GstControlBindingARGBClass
struct _GstARGBControlBindingClass
{
GstControlBindingClass parent_class;
@ -85,14 +85,14 @@ struct _GstControlBindingARGBClass
gpointer _gst_reserved[GST_PADDING];
};
GType gst_control_binding_argb_get_type (void);
GType gst_argb_control_binding_get_type (void);
/* Functions */
GstControlBinding * gst_control_binding_argb_new (GstObject * object, const gchar * property_name,
GstControlBinding * gst_argb_control_binding_new (GstObject * object, const gchar * property_name,
GstControlSource * cs_a, GstControlSource * cs_r,
GstControlSource * cs_g, GstControlSource * cs_b);
G_END_DECLS
#endif /* __GST_CONTROL_BINDING_ARGB_H__ */
#endif /* __GST_ARGB_CONTROL_BINDING_H__ */

View file

@ -2,7 +2,7 @@
*
* Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net>
*
* gstcontrolbindingdirect.c: Direct attachment for control sources
* gstdirectcontrolbinding.c: Direct attachment for control sources
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -20,7 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
/**
* SECTION:gstcontrolbindingdirect
* SECTION:gstdirectcontrolbinding
* @short_description: direct attachment for control source sources
*
* A value mapping object that attaches control sources to gobject properties.
@ -30,35 +30,35 @@
#include <glib-object.h>
#include <gst/gst.h>
#include "gstcontrolbindingdirect.h"
#include "gstdirectcontrolbinding.h"
#include <math.h>
#define GST_CAT_DEFAULT control_binding_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static GObject *gst_control_binding_direct_constructor (GType type,
static GObject *gst_direct_control_binding_constructor (GType type,
guint n_construct_params, GObjectConstructParam * construct_params);
static void gst_control_binding_direct_set_property (GObject * object,
static void gst_direct_control_binding_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_control_binding_direct_get_property (GObject * object,
static void gst_direct_control_binding_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static void gst_control_binding_direct_dispose (GObject * object);
static void gst_control_binding_direct_finalize (GObject * object);
static void gst_direct_control_binding_dispose (GObject * object);
static void gst_direct_control_binding_finalize (GObject * object);
static gboolean gst_control_binding_direct_sync_values (GstControlBinding *
static gboolean gst_direct_control_binding_sync_values (GstControlBinding *
_self, GstObject * object, GstClockTime timestamp, GstClockTime last_sync);
static GValue *gst_control_binding_direct_get_value (GstControlBinding * _self,
static GValue *gst_direct_control_binding_get_value (GstControlBinding * _self,
GstClockTime timestamp);
static gboolean gst_control_binding_direct_get_value_array (GstControlBinding *
static gboolean gst_direct_control_binding_get_value_array (GstControlBinding *
_self, GstClockTime timestamp, GstClockTime interval, guint n_values,
GValue * values);
#define _do_init \
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstcontrolbindingdirect", 0, \
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gstdirectcontrolbinding", 0, \
"dynamic parameter control source attachment");
G_DEFINE_TYPE_WITH_CODE (GstControlBindingDirect, gst_control_binding_direct,
G_DEFINE_TYPE_WITH_CODE (GstDirectControlBinding, gst_direct_control_binding,
GST_TYPE_CONTROL_BINDING, _do_init);
enum
@ -74,7 +74,7 @@ static GParamSpec *properties[PROP_LAST];
#define DEFINE_CONVERT(type,Type,TYPE) \
static void \
convert_to_##type (GstControlBindingDirect *self, gdouble s, GValue *d) \
convert_to_##type (GstDirectControlBinding *self, gdouble s, GValue *d) \
{ \
GParamSpec##Type *pspec = G_PARAM_SPEC_##TYPE (((GstControlBinding *)self)->pspec); \
g##type v; \
@ -94,14 +94,14 @@ DEFINE_CONVERT (float, Float, FLOAT);
DEFINE_CONVERT (double, Double, DOUBLE);
static void
convert_to_boolean (GstControlBindingDirect * self, gdouble s, GValue * d)
convert_to_boolean (GstDirectControlBinding * self, gdouble s, GValue * d)
{
s = CLAMP (s, 0.0, 1.0);
g_value_set_boolean (d, (gboolean) (s + 0.5));
}
static void
convert_to_enum (GstControlBindingDirect * self, gdouble s, GValue * d)
convert_to_enum (GstDirectControlBinding * self, gdouble s, GValue * d)
{
GParamSpecEnum *pspec =
G_PARAM_SPEC_ENUM (((GstControlBinding *) self)->pspec);
@ -116,22 +116,22 @@ convert_to_enum (GstControlBindingDirect * self, gdouble s, GValue * d)
/* vmethods */
static void
gst_control_binding_direct_class_init (GstControlBindingDirectClass * klass)
gst_direct_control_binding_class_init (GstDirectControlBindingClass * klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GstControlBindingClass *control_binding_class =
GST_CONTROL_BINDING_CLASS (klass);
gobject_class->constructor = gst_control_binding_direct_constructor;
gobject_class->set_property = gst_control_binding_direct_set_property;
gobject_class->get_property = gst_control_binding_direct_get_property;
gobject_class->dispose = gst_control_binding_direct_dispose;
gobject_class->finalize = gst_control_binding_direct_finalize;
gobject_class->constructor = gst_direct_control_binding_constructor;
gobject_class->set_property = gst_direct_control_binding_set_property;
gobject_class->get_property = gst_direct_control_binding_get_property;
gobject_class->dispose = gst_direct_control_binding_dispose;
gobject_class->finalize = gst_direct_control_binding_finalize;
control_binding_class->sync_values = gst_control_binding_direct_sync_values;
control_binding_class->get_value = gst_control_binding_direct_get_value;
control_binding_class->sync_values = gst_direct_control_binding_sync_values;
control_binding_class->get_value = gst_direct_control_binding_get_value;
control_binding_class->get_value_array =
gst_control_binding_direct_get_value_array;
gst_direct_control_binding_get_value_array;
properties[PROP_CS] =
g_param_spec_object ("control-source", "ControlSource",
@ -143,19 +143,19 @@ gst_control_binding_direct_class_init (GstControlBindingDirectClass * klass)
}
static void
gst_control_binding_direct_init (GstControlBindingDirect * self)
gst_direct_control_binding_init (GstDirectControlBinding * self)
{
}
static GObject *
gst_control_binding_direct_constructor (GType type, guint n_construct_params,
gst_direct_control_binding_constructor (GType type, guint n_construct_params,
GObjectConstructParam * construct_params)
{
GstControlBindingDirect *self;
GstDirectControlBinding *self;
self =
GST_CONTROL_BINDING_DIRECT (G_OBJECT_CLASS
(gst_control_binding_direct_parent_class)
GST_DIRECT_CONTROL_BINDING (G_OBJECT_CLASS
(gst_direct_control_binding_parent_class)
->constructor (type, n_construct_params, construct_params));
if (GST_CONTROL_BINDING_PSPEC (self)) {
@ -211,10 +211,10 @@ gst_control_binding_direct_constructor (GType type, guint n_construct_params,
}
static void
gst_control_binding_direct_set_property (GObject * object, guint prop_id,
gst_direct_control_binding_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstControlBindingDirect *self = GST_CONTROL_BINDING_DIRECT (object);
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (object);
switch (prop_id) {
case PROP_CS:
@ -227,10 +227,10 @@ gst_control_binding_direct_set_property (GObject * object, guint prop_id,
}
static void
gst_control_binding_direct_get_property (GObject * object, guint prop_id,
gst_direct_control_binding_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstControlBindingDirect *self = GST_CONTROL_BINDING_DIRECT (object);
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (object);
switch (prop_id) {
case PROP_CS:
@ -243,31 +243,31 @@ gst_control_binding_direct_get_property (GObject * object, guint prop_id,
}
static void
gst_control_binding_direct_dispose (GObject * object)
gst_direct_control_binding_dispose (GObject * object)
{
GstControlBindingDirect *self = GST_CONTROL_BINDING_DIRECT (object);
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (object);
if (self->cs)
gst_object_replace ((GstObject **) & self->cs, NULL);
}
static void
gst_control_binding_direct_finalize (GObject * object)
gst_direct_control_binding_finalize (GObject * object)
{
GstControlBindingDirect *self = GST_CONTROL_BINDING_DIRECT (object);
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (object);
g_value_unset (&self->cur_value);
}
static gboolean
gst_control_binding_direct_sync_values (GstControlBinding * _self,
gst_direct_control_binding_sync_values (GstControlBinding * _self,
GstObject * object, GstClockTime timestamp, GstClockTime last_sync)
{
GstControlBindingDirect *self = GST_CONTROL_BINDING_DIRECT (_self);
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (_self);
gdouble src_val;
gboolean ret;
g_return_val_if_fail (GST_IS_CONTROL_BINDING_DIRECT (self), FALSE);
g_return_val_if_fail (GST_IS_DIRECT_CONTROL_BINDING (self), FALSE);
g_return_val_if_fail (GST_CONTROL_BINDING_PSPEC (self), FALSE);
GST_LOG_OBJECT (object, "property '%s' at ts=%" GST_TIME_FORMAT,
@ -300,14 +300,14 @@ gst_control_binding_direct_sync_values (GstControlBinding * _self,
}
static GValue *
gst_control_binding_direct_get_value (GstControlBinding * _self,
gst_direct_control_binding_get_value (GstControlBinding * _self,
GstClockTime timestamp)
{
GstControlBindingDirect *self = GST_CONTROL_BINDING_DIRECT (_self);
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (_self);
GValue *dst_val = NULL;
gdouble src_val;
g_return_val_if_fail (GST_IS_CONTROL_BINDING_DIRECT (self), NULL);
g_return_val_if_fail (GST_IS_DIRECT_CONTROL_BINDING (self), NULL);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), NULL);
g_return_val_if_fail (GST_CONTROL_BINDING_PSPEC (self), FALSE);
@ -325,18 +325,18 @@ gst_control_binding_direct_get_value (GstControlBinding * _self,
}
static gboolean
gst_control_binding_direct_get_value_array (GstControlBinding * _self,
gst_direct_control_binding_get_value_array (GstControlBinding * _self,
GstClockTime timestamp, GstClockTime interval, guint n_values,
GValue * values)
{
GstControlBindingDirect *self = GST_CONTROL_BINDING_DIRECT (_self);
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (_self);
gint i;
gdouble *src_val;
gboolean res = FALSE;
GType type;
GstControlBindingDirectConvert convert;
GstDirectControlBindingConvert convert;
g_return_val_if_fail (GST_IS_CONTROL_BINDING_DIRECT (self), FALSE);
g_return_val_if_fail (GST_IS_DIRECT_CONTROL_BINDING (self), FALSE);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), FALSE);
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (interval), FALSE);
g_return_val_if_fail (values, FALSE);
@ -368,7 +368,7 @@ gst_control_binding_direct_get_value_array (GstControlBinding * _self,
/* functions */
/**
* gst_control_binding_direct_new:
* gst_direct_control_binding_new:
* @object: the object of the property
* @property_name: the property-name to attach the control source
* @csource: the control source
@ -376,12 +376,12 @@ gst_control_binding_direct_get_value_array (GstControlBinding * _self,
* Create a new control-binding that attaches the #GstControlSource to the
* #GObject property.
*
* Returns: (transfer floating): the new #GstControlBindingDirect
* Returns: (transfer floating): the new #GstDirectControlBinding
*/
GstControlBinding *
gst_control_binding_direct_new (GstObject * object, const gchar * property_name,
gst_direct_control_binding_new (GstObject * object, const gchar * property_name,
GstControlSource * cs)
{
return (GstControlBinding *) g_object_new (GST_TYPE_CONTROL_BINDING_DIRECT,
return (GstControlBinding *) g_object_new (GST_TYPE_DIRECT_CONTROL_BINDING,
"object", object, "name", property_name, "control-source", cs, NULL);
}

View file

@ -2,7 +2,7 @@
*
* Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net>
*
* gstcontrolbindingdirect.h: Direct attachment for control sources
* gstdirectcontrolbinding.h: Direct attachment for control sources
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@ -20,8 +20,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_CONTROL_BINDING_DIRECT_H__
#define __GST_CONTROL_BINDING_DIRECT_H__
#ifndef __GST_DIRECT_CONTROL_BINDING_H__
#define __GST_DIRECT_CONTROL_BINDING_H__
#include <gst/gstconfig.h>
@ -31,39 +31,39 @@
G_BEGIN_DECLS
#define GST_TYPE_CONTROL_BINDING_DIRECT \
(gst_control_binding_direct_get_type())
#define GST_CONTROL_BINDING_DIRECT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CONTROL_BINDING_DIRECT,GstControlBindingDirect))
#define GST_CONTROL_BINDING_DIRECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CONTROL_BINDING_DIRECT,GstControlBindingDirectClass))
#define GST_IS_CONTROL_BINDING_DIRECT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CONTROL_BINDING_DIRECT))
#define GST_IS_CONTROL_BINDING_DIRECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CONTROL_BINDING_DIRECT))
#define GST_CONTROL_BINDING_DIRECT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstControlBindingDirectClass))
#define GST_TYPE_DIRECT_CONTROL_BINDING \
(gst_direct_control_binding_get_type())
#define GST_DIRECT_CONTROL_BINDING(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECT_CONTROL_BINDING,GstDirectControlBinding))
#define GST_DIRECT_CONTROL_BINDING_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECT_CONTROL_BINDING,GstDirectControlBindingClass))
#define GST_IS_DIRECT_CONTROL_BINDING(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECT_CONTROL_BINDING))
#define GST_IS_DIRECT_CONTROL_BINDING_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIRECT_CONTROL_BINDING))
#define GST_DIRECT_CONTROL_BINDING_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstDirectControlBindingClass))
typedef struct _GstControlBindingDirect GstControlBindingDirect;
typedef struct _GstControlBindingDirectClass GstControlBindingDirectClass;
typedef struct _GstDirectControlBinding GstDirectControlBinding;
typedef struct _GstDirectControlBindingClass GstDirectControlBindingClass;
/**
* GstControlBindingDirectConvert:
* @self: the #GstControlBindingDirect instance
* GstDirectControlBindingConvert:
* @self: the #GstDirectControlBinding instance
* @src_value: the value returned by the cotnrol source
* @dest_value: the target GValue
*
* Function to map a control-value to the target GValue.
*/
typedef void (* GstControlBindingDirectConvert) (GstControlBindingDirect *self, gdouble src_value, GValue *dest_value);
typedef void (* GstDirectControlBindingConvert) (GstDirectControlBinding *self, gdouble src_value, GValue *dest_value);
/**
* GstControlBindingDirect:
* GstDirectControlBinding:
* @name: name of the property of this binding
*
* The instance structure of #GstControlBindingDirect.
* The instance structure of #GstDirectControlBinding.
*/
struct _GstControlBindingDirect {
struct _GstDirectControlBinding {
GstControlBinding parent;
/*< private >*/
@ -71,20 +71,20 @@ struct _GstControlBindingDirect {
GValue cur_value;
gdouble last_value;
GstControlBindingDirectConvert convert;
GstDirectControlBindingConvert convert;
gpointer _gst_reserved[GST_PADDING];
};
/**
* GstControlBindingDirectClass:
* GstDirectControlBindingClass:
* @parent_class: Parent class
* @convert: Class method to convert control-values
*
* The class structure of #GstControlBindingDirect.
* The class structure of #GstDirectControlBinding.
*/
struct _GstControlBindingDirectClass
struct _GstDirectControlBindingClass
{
GstControlBindingClass parent_class;
@ -92,12 +92,12 @@ struct _GstControlBindingDirectClass
gpointer _gst_reserved[GST_PADDING];
};
GType gst_control_binding_direct_get_type (void);
GType gst_direct_control_binding_get_type (void);
/* Functions */
GstControlBinding * gst_control_binding_direct_new (GstObject * object, const gchar * property_name,
GstControlBinding * gst_direct_control_binding_new (GstObject * object, const gchar * property_name,
GstControlSource * cs);
G_END_DECLS
#endif /* __GST_CONTROL_BINDING_DIRECT_H__ */
#endif /* __GST_DIRECT_CONTROL_BINDING_H__ */

View file

@ -23,7 +23,7 @@
#include <gst/gst.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
#include <gst/controller/gstcontrolbindingdirect.h>
#include <gst/controller/gstdirectcontrolbinding.h>
/* a song in buzztard can easily reach 30000 here */
#define NUM_CP 15000
@ -113,7 +113,7 @@ main (gint argc, gchar * argv[])
/* create and configure control source */
csource = gst_interpolation_control_source_new ();
gst_object_add_control_binding (GST_OBJECT (src),
gst_control_binding_direct_new (GST_OBJECT (src), "freq",
gst_direct_control_binding_new (GST_OBJECT (src), "freq",
GST_CONTROL_SOURCE (csource)));
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);

View file

@ -29,7 +29,7 @@
#include <gst/controller/gstinterpolationcontrolsource.h>
#include <gst/controller/gstlfocontrolsource.h>
#include <gst/controller/gsttriggercontrolsource.h>
#include <gst/controller/gstcontrolbindingdirect.h>
#include <gst/controller/gstdirectcontrolbinding.h>
/* enum for text element */
@ -287,7 +287,7 @@ GST_START_TEST (controller_controlsource_empty1)
fail_unless (csource != NULL, NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int",
gst_direct_control_binding_new (GST_OBJECT (elem), "int",
(GstControlSource *) csource)));
/* don't fail on empty control point lists */
@ -313,7 +313,7 @@ GST_START_TEST (controller_controlsource_empty2)
fail_unless (csource != NULL, NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int",
gst_direct_control_binding_new (GST_OBJECT (elem), "int",
(GstControlSource *) csource)));
/* set control values */
@ -351,7 +351,7 @@ GST_START_TEST (controller_interpolation_none)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
@ -403,7 +403,7 @@ GST_START_TEST (controller_interpolation_linear)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -443,7 +443,7 @@ GST_START_TEST (controller_interpolation_cubic)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "double", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "double", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_CUBIC, NULL);
@ -492,7 +492,7 @@ GST_START_TEST (controller_interpolation_cubic_too_few_cp)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "double", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "double", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_CUBIC, NULL);
@ -534,7 +534,7 @@ GST_START_TEST (controller_interpolation_unset)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
@ -590,7 +590,7 @@ GST_START_TEST (controller_interpolation_unset_all)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
@ -638,7 +638,7 @@ GST_START_TEST (controller_interpolation_linear_value_array)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -692,7 +692,7 @@ GST_START_TEST (controller_interpolation_linear_invalid_values)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "float", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "float", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -744,7 +744,7 @@ GST_START_TEST (controller_interpolation_linear_default_values)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -815,10 +815,10 @@ GST_START_TEST (controller_interpolation_linear_disabled)
fail_unless (csource1 != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs1)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs1)));
fail_unless (csource2 != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "double", cs2)));
gst_direct_control_binding_new (GST_OBJECT (elem), "double", cs2)));
/* set interpolation mode */
g_object_set (csource1, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -940,7 +940,7 @@ GST_START_TEST (controller_interpolation_set_from_list)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -985,7 +985,7 @@ GST_START_TEST (controller_interpolation_linear_before_ts0)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -1032,7 +1032,7 @@ GST_START_TEST (controller_interpolation_linear_enums)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "enum", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "enum", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);
@ -1076,7 +1076,7 @@ GST_START_TEST (controller_timed_value_count)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* set interpolation mode */
g_object_set (csource, "mode", GST_INTERPOLATION_MODE_NONE, NULL);
@ -1117,7 +1117,7 @@ GST_START_TEST (controller_lfo_sine)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* configure lfo */
g_object_set (csource, "waveform", GST_LFO_WAVEFORM_SINE,
@ -1171,7 +1171,7 @@ GST_START_TEST (controller_lfo_sine_timeshift)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* configure lfo */
g_object_set (csource, "waveform", GST_LFO_WAVEFORM_SINE,
@ -1225,7 +1225,7 @@ GST_START_TEST (controller_lfo_square)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* configure lfo */
g_object_set (csource, "waveform", GST_LFO_WAVEFORM_SQUARE,
@ -1279,7 +1279,7 @@ GST_START_TEST (controller_lfo_saw)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* configure lfo */
g_object_set (csource, "waveform", GST_LFO_WAVEFORM_SAW,
@ -1333,7 +1333,7 @@ GST_START_TEST (controller_lfo_rsaw)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* configure lfo */
g_object_set (csource, "waveform", GST_LFO_WAVEFORM_REVERSE_SAW,
@ -1387,7 +1387,7 @@ GST_START_TEST (controller_lfo_triangle)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* configure lfo */
g_object_set (csource, "waveform", GST_LFO_WAVEFORM_TRIANGLE,
@ -1441,7 +1441,7 @@ GST_START_TEST (controller_lfo_none)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
/* now pull in values for some timestamps */
gst_object_sync_values (GST_OBJECT (elem), 0 * GST_MSECOND);
@ -1493,7 +1493,7 @@ GST_START_TEST (controller_trigger_exact)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
fail_if (gst_control_source_get_value (cs, 0 * GST_SECOND, &raw_val));
@ -1539,7 +1539,7 @@ GST_START_TEST (controller_trigger_tolerance)
fail_unless (csource != NULL);
fail_unless (gst_object_add_control_binding (GST_OBJECT (elem),
gst_control_binding_direct_new (GST_OBJECT (elem), "int", cs)));
gst_direct_control_binding_new (GST_OBJECT (elem), "int", cs)));
g_object_set (csource, "tolerance", G_GINT64_CONSTANT (10), NULL);

View file

@ -9,7 +9,7 @@
#include <gst/gst.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
#include <gst/controller/gstcontrolbindingdirect.h>
#include <gst/controller/gstdirectcontrolbinding.h>
gint
main (gint argc, gchar ** argv)
@ -50,10 +50,10 @@ main (gint argc, gchar ** argv)
csource2 = gst_interpolation_control_source_new ();
gst_object_add_control_binding (GST_OBJECT_CAST (src),
gst_control_binding_direct_new (GST_OBJECT_CAST (src), "volume",
gst_direct_control_binding_new (GST_OBJECT_CAST (src), "volume",
GST_CONTROL_SOURCE (csource1)));
gst_object_add_control_binding (GST_OBJECT_CAST (src),
gst_control_binding_direct_new (GST_OBJECT_CAST (src), "freq",
gst_direct_control_binding_new (GST_OBJECT_CAST (src), "freq",
GST_CONTROL_SOURCE (csource2)));
/* set interpolation mode */

View file

@ -15,7 +15,7 @@
#include <gst/gst.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
#include <gst/controller/gstlfocontrolsource.h>
#include <gst/controller/gstcontrolbindingdirect.h>
#include <gst/controller/gstdirectcontrolbinding.h>
/* local test element */
@ -193,7 +193,7 @@ test_interpolation (void)
tvcs = (GstTimedValueControlSource *) ics;
cs = (GstControlSource *) ics;
gst_object_add_control_binding (e, gst_control_binding_direct_new (e, "int",
gst_object_add_control_binding (e, gst_direct_control_binding_new (e, "int",
cs));
gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0);
@ -277,7 +277,7 @@ test_lfo (void)
lfocs = gst_lfo_control_source_new ();
cs = (GstControlSource *) lfocs;
gst_object_add_control_binding (e, gst_control_binding_direct_new (e, "int",
gst_object_add_control_binding (e, gst_direct_control_binding_new (e, "int",
cs));
g_object_set (lfocs,
@ -384,7 +384,7 @@ test_chained_lfo (void)
lfocs1 = gst_lfo_control_source_new ();
cs1 = (GstControlSource *) lfocs1;
gst_object_add_control_binding (e, gst_control_binding_direct_new (e, "int",
gst_object_add_control_binding (e, gst_direct_control_binding_new (e, "int",
cs1));
g_object_set (lfocs1,
@ -396,7 +396,7 @@ test_chained_lfo (void)
cs2 = (GstControlSource *) lfocs2;
gst_object_add_control_binding ((GstObject *) lfocs1,
gst_control_binding_direct_new ((GstObject *) lfocs1, "amplitude", cs2));
gst_direct_control_binding_new ((GstObject *) lfocs1, "amplitude", cs2));
g_object_set (lfocs2,
"waveform", GST_LFO_WAVEFORM_SINE,

View file

@ -10,8 +10,8 @@
#include <gst/gst.h>
#include <gst/controller/gstinterpolationcontrolsource.h>
#include <gst/controller/gstlfocontrolsource.h>
#include <gst/controller/gstcontrolbindingargb.h>
#include <gst/controller/gstcontrolbindingdirect.h>
#include <gst/controller/gstargbcontrolbinding.h>
#include <gst/controller/gstdirectcontrolbinding.h>
gint
main (gint argc, gchar ** argv)
@ -65,7 +65,7 @@ main (gint argc, gchar ** argv)
"frequency", (gdouble) 0.11,
"amplitude", (gdouble) 0.2, "offset", (gdouble) 0.5, NULL);
gst_object_add_control_binding (GST_OBJECT_CAST (text),
gst_control_binding_direct_new (GST_OBJECT_CAST (text), "xpos",
gst_direct_control_binding_new (GST_OBJECT_CAST (text), "xpos",
GST_CONTROL_SOURCE (cs)));
gst_object_unref (cs);
@ -74,7 +74,7 @@ main (gint argc, gchar ** argv)
"frequency", (gdouble) 0.04,
"amplitude", (gdouble) 0.4, "offset", (gdouble) 0.5, NULL);
gst_object_add_control_binding (GST_OBJECT_CAST (text),
gst_control_binding_direct_new (GST_OBJECT_CAST (text), "ypos",
gst_direct_control_binding_new (GST_OBJECT_CAST (text), "ypos",
GST_CONTROL_SOURCE (cs)));
gst_object_unref (cs);
@ -91,7 +91,7 @@ main (gint argc, gchar ** argv)
"frequency", (gdouble) 0.13,
"amplitude", (gdouble) 0.5, "offset", (gdouble) 0.5, NULL);
gst_object_add_control_binding (GST_OBJECT_CAST (text),
gst_control_binding_argb_new (GST_OBJECT_CAST (text), "color", NULL,
gst_argb_control_binding_new (GST_OBJECT_CAST (text), "color", NULL,
GST_CONTROL_SOURCE (cs_r), GST_CONTROL_SOURCE (cs_g),
GST_CONTROL_SOURCE (cs_b)));
gst_object_unref (cs_r);

View file

@ -1,8 +1,8 @@
EXPORTS
gst_control_binding_argb_get_type
gst_control_binding_argb_new
gst_control_binding_direct_get_type
gst_control_binding_direct_new
gst_argb_control_binding_get_type
gst_argb_control_binding_new
gst_direct_control_binding_get_type
gst_direct_control_binding_new
gst_interpolation_control_source_get_type
gst_interpolation_control_source_new
gst_interpolation_mode_get_type