1 /* GStreamer 2 * 3 * Copyright (C) 2011 Stefan Sauer <ensonic@users.sf.net> 4 * 5 * gstargbcontrolbinding.h: Attachment for multiple control sources to gargb 6 * properties 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library; if not, write to the 20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 21 * Boston, MA 02110-1301, USA. 22 */ 23 24 #ifndef __GST_ARGB_CONTROL_BINDING_H__ 25 #define __GST_ARGB_CONTROL_BINDING_H__ 26 27 #include <gst/gstconfig.h> 28 29 #include <glib-object.h> 30 31 #include <gst/gstcontrolsource.h> 32 #include <gst/controller/controller-prelude.h> 33 34 G_BEGIN_DECLS 35 36 #define GST_TYPE_ARGB_CONTROL_BINDING \ 37 (gst_argb_control_binding_get_type()) 38 #define GST_ARGB_CONTROL_BINDING(obj) \ 39 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ARGB_CONTROL_BINDING,GstARGBControlBinding)) 40 #define GST_ARGB_CONTROL_BINDING_CLASS(klass) \ 41 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ARGB_CONTROL_BINDING,GstARGBControlBindingClass)) 42 #define GST_IS_ARGB_CONTROL_BINDING(obj) \ 43 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ARGB_CONTROL_BINDING)) 44 #define GST_IS_ARGB_CONTROL_BINDING_CLASS(klass) \ 45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ARGB_CONTROL_BINDING)) 46 #define GST_ARGB_CONTROL_BINDING_GET_CLASS(obj) \ 47 (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTOL_SOURCE, GstARGBControlBindingClass)) 48 49 typedef struct _GstARGBControlBinding GstARGBControlBinding; 50 typedef struct _GstARGBControlBindingClass GstARGBControlBindingClass; 51 52 /** 53 * GstARGBControlBinding: 54 * @name: name of the property of this binding 55 * 56 * The instance structure of #GstARGBControlBinding. 57 */ 58 struct _GstARGBControlBinding { 59 GstControlBinding parent; 60 61 /*< private >*/ 62 GstControlSource *cs_a; /* GstControlSources for this property */ 63 GstControlSource *cs_r; 64 GstControlSource *cs_g; 65 GstControlSource *cs_b; 66 67 GValue cur_value; 68 guint32 last_value; 69 70 gpointer _gst_reserved[GST_PADDING]; 71 }; 72 73 /** 74 * GstARGBControlBindingClass: 75 * @parent_class: Parent class 76 * @convert: Class method to convert control-values 77 * 78 * The class structure of #GstARGBControlBinding. 79 */ 80 81 struct _GstARGBControlBindingClass 82 { 83 GstControlBindingClass parent_class; 84 85 /*< private >*/ 86 gpointer _gst_reserved[GST_PADDING]; 87 }; 88 89 GST_CONTROLLER_API 90 GType gst_argb_control_binding_get_type (void); 91 92 /* Functions */ 93 94 GST_CONTROLLER_API 95 GstControlBinding * gst_argb_control_binding_new (GstObject * object, const gchar * property_name, 96 GstControlSource * cs_a, GstControlSource * cs_r, 97 GstControlSource * cs_g, GstControlSource * cs_b); 98 99 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstARGBControlBinding, gst_object_unref) 100 101 G_END_DECLS 102 103 #endif /* __GST_ARGB_CONTROL_BINDING_H__ */ 104