|
Packit Service |
963350 |
/* GStreamer
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net>
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* gstcontrolbinding.h: Attachment for control sources
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
963350 |
* modify it under the terms of the GNU Library General Public
|
|
Packit Service |
963350 |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
963350 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
963350 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
963350 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
963350 |
* Library General Public License for more details.
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* You should have received a copy of the GNU Library General Public
|
|
Packit Service |
963350 |
* License along with this library; if not, write to the
|
|
Packit Service |
963350 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Packit Service |
963350 |
* Boston, MA 02110-1301, USA.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#ifndef __GST_CONTROL_BINDING_H__
|
|
Packit Service |
963350 |
#define __GST_CONTROL_BINDING_H__
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#include <gst/gstconfig.h>
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#include <glib-object.h>
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
G_BEGIN_DECLS
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#define GST_TYPE_CONTROL_BINDING \
|
|
Packit Service |
963350 |
(gst_control_binding_get_type())
|
|
Packit Service |
963350 |
#define GST_CONTROL_BINDING(obj) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CONTROL_BINDING,GstControlBinding))
|
|
Packit Service |
963350 |
#define GST_CONTROL_BINDING_CLASS(klass) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CONTROL_BINDING,GstControlBindingClass))
|
|
Packit Service |
963350 |
#define GST_IS_CONTROL_BINDING(obj) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CONTROL_BINDING))
|
|
Packit Service |
963350 |
#define GST_IS_CONTROL_BINDING_CLASS(klass) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CONTROL_BINDING))
|
|
Packit Service |
963350 |
#define GST_CONTROL_BINDING_GET_CLASS(obj) \
|
|
Packit Service |
963350 |
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstControlBindingClass))
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
typedef struct _GstControlBinding GstControlBinding;
|
|
Packit Service |
963350 |
typedef struct _GstControlBindingClass GstControlBindingClass;
|
|
Packit Service |
963350 |
typedef struct _GstControlBindingPrivate GstControlBindingPrivate;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#include <gst/gstcontrolsource.h>
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/* FIXME(2.0): remove, this is unused */
|
|
Packit Service |
963350 |
typedef void (* GstControlBindingConvert) (GstControlBinding *binding, gdouble src_value, GValue *dest_value);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/**
|
|
Packit Service |
963350 |
* GstControlBinding:
|
|
Packit Service |
963350 |
* @name: name of the property of this binding
|
|
Packit Service |
963350 |
* @pspec: #GParamSpec for this property
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* The instance structure of #GstControlBinding.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
struct _GstControlBinding {
|
|
Packit Service |
963350 |
GstObject parent;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/*< public >*/
|
|
Packit Service |
963350 |
gchar *name;
|
|
Packit Service |
963350 |
GParamSpec *pspec;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/*< private >*/
|
|
Packit Service |
963350 |
#ifndef GST_DISABLE_DEPRECATED
|
|
Packit Service |
963350 |
GstObject *object; /* GstObject owning the property
|
|
Packit Service |
963350 |
* (== parent when bound) */
|
|
Packit Service |
963350 |
#else
|
|
Packit Service |
963350 |
gpointer __object;
|
|
Packit Service |
963350 |
#endif
|
|
Packit Service |
963350 |
gboolean disabled;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
union {
|
|
Packit Service |
963350 |
struct {
|
|
Packit Service |
963350 |
GstControlBindingPrivate *priv;
|
|
Packit Service |
963350 |
} abi;
|
|
Packit Service |
963350 |
gpointer _gst_reserved[GST_PADDING];
|
|
Packit Service |
963350 |
} ABI;
|
|
Packit Service |
963350 |
};
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/**
|
|
Packit Service |
963350 |
* GstControlBindingClass:
|
|
Packit Service |
963350 |
* @parent_class: Parent class
|
|
Packit Service |
963350 |
* @sync_values: implementation for updating the target values
|
|
Packit Service |
963350 |
* @get_value: implementation to fetch a single control-value
|
|
Packit Service |
963350 |
* @get_value_array: implementation to fetch a series of control-values
|
|
Packit Service |
963350 |
* @get_g_value_array: implementation to fetch a series of control-values
|
|
Packit Service |
963350 |
* as g_values
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* The class structure of #GstControlBinding.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
struct _GstControlBindingClass
|
|
Packit Service |
963350 |
{
|
|
Packit Service |
963350 |
GstObjectClass parent_class;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/*< public >*/
|
|
Packit Service |
963350 |
gboolean (* sync_values) (GstControlBinding *binding, GstObject *object, GstClockTime timestamp, GstClockTime last_sync);
|
|
Packit Service |
963350 |
GValue * (* get_value) (GstControlBinding *binding, GstClockTime timestamp);
|
|
Packit Service |
963350 |
gboolean (* get_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, gpointer values);
|
|
Packit Service |
963350 |
gboolean (* get_g_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, GValue *values);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/*< private >*/
|
|
Packit Service |
963350 |
gpointer _gst_reserved[GST_PADDING];
|
|
Packit Service |
963350 |
};
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#define GST_CONTROL_BINDING_PSPEC(cb) (((GstControlBinding *) cb)->pspec)
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
GType gst_control_binding_get_type (void);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/* Functions */
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_control_binding_sync_values (GstControlBinding * binding, GstObject *object,
|
|
Packit Service |
963350 |
GstClockTime timestamp, GstClockTime last_sync);
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
GValue * gst_control_binding_get_value (GstControlBinding *binding,
|
|
Packit Service |
963350 |
GstClockTime timestamp);
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_control_binding_get_value_array (GstControlBinding *binding, GstClockTime timestamp,
|
|
Packit Service |
963350 |
GstClockTime interval, guint n_values, gpointer values);
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_control_binding_get_g_value_array (GstControlBinding *binding, GstClockTime timestamp,
|
|
Packit Service |
963350 |
GstClockTime interval, guint n_values, GValue *values);
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
void gst_control_binding_set_disabled (GstControlBinding * binding, gboolean disabled);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GST_API
|
|
Packit Service |
963350 |
gboolean gst_control_binding_is_disabled (GstControlBinding * binding);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
|
|
Packit Service |
963350 |
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstControlBinding, gst_object_unref)
|
|
Packit Service |
963350 |
#endif
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
G_END_DECLS
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#endif /* __GST_CONTROL_BINDING_H__ */
|