X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstcontrolbinding.h;h=ba67547a8797b55dd7c2fff1325b09674b449518;hb=790f193d632979b1fc0e7e851837b9f8f3a59d1a;hp=96652fab5b6115af7093dee6efe76a83cf5f9ab6;hpb=ea7c1225c1e4f890dcc71a25143036467e3f02b8;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstcontrolbinding.h b/gst/gstcontrolbinding.h index 96652fa..ba67547 100644 --- a/gst/gstcontrolbinding.h +++ b/gst/gstcontrolbinding.h @@ -16,8 +16,8 @@ * * 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. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef __GST_CONTROL_BINDING_H__ @@ -27,8 +27,6 @@ #include -#include - G_BEGIN_DECLS #define GST_TYPE_CONTROL_BINDING \ @@ -46,42 +44,52 @@ G_BEGIN_DECLS typedef struct _GstControlBinding GstControlBinding; typedef struct _GstControlBindingClass GstControlBindingClass; +typedef struct _GstControlBindingPrivate GstControlBindingPrivate; -/** - * GstControlBindingConvert: - * @self: the #GstControlBinding 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 (* GstControlBindingConvert) (GstControlBinding *self, gdouble src_value, GValue *dest_value); +#include + +/* FIXME(2.0): remove, this is unused */ +typedef void (* GstControlBindingConvert) (GstControlBinding *binding, gdouble src_value, GValue *dest_value); /** * GstControlBinding: * @name: name of the property of this binding + * @pspec: #GParamSpec for this property * * The instance structure of #GstControlBinding. */ struct _GstControlBinding { GstObject parent; - + /*< public >*/ - gchar *name; /* name of the property */ - GParamSpec *pspec; /* GParamSpec for this property */ + gchar *name; + GParamSpec *pspec; /*< private >*/ +#ifndef GST_DISABLE_DEPRECATED GstObject *object; /* GstObject owning the property * (== parent when bound) */ +#else + gpointer __object; +#endif gboolean disabled; - gpointer _gst_reserved[GST_PADDING]; + union { + struct { + GstControlBindingPrivate *priv; + } abi; + gpointer _gst_reserved[GST_PADDING]; + } ABI; }; /** * GstControlBindingClass: * @parent_class: Parent class - * @convert: Class method to convert control-values + * @sync_values: implementation for updating the target values + * @get_value: implementation to fetch a single control-value + * @get_value_array: implementation to fetch a series of control-values + * @get_g_value_array: implementation to fetch a series of control-values + * as g_values * * The class structure of #GstControlBinding. */ @@ -90,10 +98,11 @@ struct _GstControlBindingClass { GstObjectClass parent_class; - /* virtual methods */ - gboolean (* sync_values) (GstControlBinding *self, GstObject *object, GstClockTime timestamp, GstClockTime last_sync); - GValue * (* get_value) (GstControlBinding *self, GstClockTime timestamp); - gboolean (* get_value_array) (GstControlBinding *self, GstClockTime timestamp,GstClockTime interval, guint n_values, GValue *values); + /*< public >*/ + gboolean (* sync_values) (GstControlBinding *binding, GstObject *object, GstClockTime timestamp, GstClockTime last_sync); + GValue * (* get_value) (GstControlBinding *binding, GstClockTime timestamp); + gboolean (* get_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, gpointer values); + gboolean (* get_g_value_array) (GstControlBinding *binding, GstClockTime timestamp,GstClockTime interval, guint n_values, GValue *values); /*< private >*/ gpointer _gst_reserved[GST_PADDING]; @@ -101,19 +110,33 @@ struct _GstControlBindingClass #define GST_CONTROL_BINDING_PSPEC(cb) (((GstControlBinding *) cb)->pspec) -GType gst_control_binding_get_type (void); +GST_API +GType gst_control_binding_get_type (void); /* Functions */ -gboolean gst_control_binding_sync_values (GstControlBinding * self, GstObject *object, +GST_API +gboolean gst_control_binding_sync_values (GstControlBinding * binding, GstObject *object, GstClockTime timestamp, GstClockTime last_sync); +GST_API GValue * gst_control_binding_get_value (GstControlBinding *binding, GstClockTime timestamp); +GST_API gboolean gst_control_binding_get_value_array (GstControlBinding *binding, GstClockTime timestamp, + GstClockTime interval, guint n_values, gpointer values); +GST_API +gboolean gst_control_binding_get_g_value_array (GstControlBinding *binding, GstClockTime timestamp, GstClockTime interval, guint n_values, GValue *values); +GST_API +void gst_control_binding_set_disabled (GstControlBinding * binding, gboolean disabled); + +GST_API +gboolean gst_control_binding_is_disabled (GstControlBinding * binding); + +#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC +G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstControlBinding, gst_object_unref) +#endif -void gst_control_binding_set_disabled (GstControlBinding * self, gboolean disabled); -gboolean gst_control_binding_is_disabled (GstControlBinding * self); G_END_DECLS #endif /* __GST_CONTROL_BINDING_H__ */