element: remove more query_types
[platform/upstream/gstreamer.git] / gst / gstcontroller.h
1 /* GStreamer
2  *
3  * Copyright (C) 2005 Stefan Kost <ensonic at users dot sf dot net>
4  *               2011 Stefan Sauer <ensonic at users dot sf dot net>
5  *
6  * gstcontroller.h: dynamic parameter control subsystem
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., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef __GST_CONTROLLER_H__
25 #define __GST_CONTROLLER_H__
26
27 #include <gst/gstconfig.h>
28
29 #include <string.h>
30
31 #include <glib.h>
32 #include <glib-object.h>
33 #include <glib/gprintf.h>
34
35 #include <gst/gstobject.h>
36 #include <gst/gstcontrolsource.h>
37
38 G_BEGIN_DECLS
39
40 /* type macros */
41
42 #define GST_TYPE_CONTROLLER            (gst_controller_get_type ())
43 #define GST_CONTROLLER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_CONTROLLER, GstController))
44 #define GST_CONTROLLER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_CONTROLLER, GstControllerClass))
45 #define GST_IS_CONTROLLER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_CONTROLLER))
46 #define GST_IS_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CONTROLLERE))
47 #define GST_CONTROLLER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CONTROLLER, GstControllerClass))
48
49 typedef struct _GstController GstController;
50 typedef struct _GstControllerClass GstControllerClass;
51 typedef struct _GstControllerPrivate GstControllerPrivate;
52
53 /**
54  * GstController:
55  *
56  * The instance structure of GstController
57  */
58
59 struct _GstController
60 {
61   GObject parent;
62
63   GList *properties;  /* List of GstControlledProperty */
64   GMutex *lock;       /* Secure property access, elements will access from threads */
65   GstObject *object;  /* the object we control */
66
67   /*< private >*/
68   GstControllerPrivate *priv;
69   gpointer       _gst_reserved[GST_PADDING - 1];
70 };
71
72 struct _GstControllerClass
73 {
74   GObjectClass parent_class;
75
76   /*< private >*/
77   gpointer       _gst_reserved[GST_PADDING];
78 };
79
80 GType gst_controller_get_type (void);
81
82 /* GstController functions */
83
84 GstController *gst_controller_new_valist (GstObject * object, va_list var_args);
85 GstController *gst_controller_new_list (GstObject * object, GList *list);
86 GstController *gst_controller_new (GstObject * object, ...) G_GNUC_NULL_TERMINATED;
87
88 gboolean gst_controller_add_properties_valist (GstController * self, va_list var_args);
89 gboolean gst_controller_add_properties_list (GstController * self, GList *list);
90 gboolean gst_controller_add_properties (GstController * self, ...) G_GNUC_NULL_TERMINATED;
91
92 gboolean gst_controller_remove_properties_valist (GstController * self, va_list var_args);
93 gboolean gst_controller_remove_properties_list (GstController * self, GList *list);
94 gboolean gst_controller_remove_properties (GstController * self, ...) G_GNUC_NULL_TERMINATED;
95
96 gboolean gst_controller_is_active (GstController * self);
97 void gst_controller_set_disabled (GstController *self, gboolean disabled);
98 void gst_controller_set_property_disabled (GstController *self, const gchar * property_name, gboolean disabled);
99 gboolean gst_controller_set_control_source (GstController *self, const gchar * property_name, GstControlSource *csource);
100 GstControlSource * gst_controller_get_control_source (GstController *self, const gchar * property_name);
101
102 GstClockTime gst_controller_suggest_next_sync (GstController *self);
103 gboolean gst_controller_sync_values (GstController * self,
104     GstClockTime timestamp);
105
106 GValue *gst_controller_get (GstController * self, const gchar * property_name,
107     GstClockTime timestamp);
108 gboolean gst_controller_get_value_arrays (GstController * self,
109     GstClockTime timestamp, GSList * value_arrays);
110 gboolean gst_controller_get_value_array (GstController * self,
111     GstClockTime timestamp, GstValueArray * value_array);
112
113
114 G_END_DECLS
115
116 #endif /* __GST_CONTROLLER_H__ */