tizen 2.3 release
[framework/multimedia/gst-plugins-base0.10.git] / gst-libs / gst / interfaces / propertyprobe.h
1 /* GStreamer PropertyProbe
2  * Copyright (C) 2003 David A. Schleef <ds@schleef.org>
3  *
4  * property_probe.h: property_probe interface design
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GST_PROPERTY_PROBE_H__
23 #define __GST_PROPERTY_PROBE_H__
24
25 #include <gst/gst.h>
26
27 G_BEGIN_DECLS
28
29 #define GST_TYPE_PROPERTY_PROBE \
30   (gst_property_probe_get_type ())
31 #define GST_PROPERTY_PROBE(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbe))
33 #define GST_IS_PROPERTY_PROBE(obj) \
34   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PROPERTY_PROBE))
35 #define GST_PROPERTY_PROBE_GET_IFACE(obj) \
36   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbeInterface))
37
38 /**
39  * GstPropertyProbe:
40  *
41  * Opaque #GstPropertyProbe data structure.
42  */
43 typedef struct _GstPropertyProbe GstPropertyProbe; /* dummy typedef */
44 typedef struct _GstPropertyProbeInterface GstPropertyProbeInterface;
45
46 /**
47  * GstPropertyProbeInterface:
48  * @klass: parent interface type.
49  * @probe_needed: default signal handler
50  * @get_properties: virtual method to get list of probable properties
51  * @needs_probe: virtual method to tell if probe need update
52  * @probe_property: virtual method to probe a property
53  * @get_values: virtual method to get probe results for a property
54  *
55  * #GstPropertyProbe interface.
56  */
57 struct _GstPropertyProbeInterface {
58   GTypeInterface klass;
59
60   /* signals */
61   void          (*probe_needed)   (GstPropertyProbe *probe,
62                                    const GParamSpec *pspec);
63
64   /* virtual functions */
65   const GList * (*get_properties) (GstPropertyProbe *probe);
66   gboolean      (*needs_probe)    (GstPropertyProbe *probe,
67                                    guint             prop_id,
68                                    const GParamSpec *pspec);
69   void          (*probe_property) (GstPropertyProbe *probe,
70                                    guint             prop_id,
71                                    const GParamSpec *pspec);
72   GValueArray * (*get_values)     (GstPropertyProbe *probe,
73                                    guint             prop_id,
74                                    const GParamSpec *pspec);
75
76   /*< private >*/
77   gpointer _gst_reserved[GST_PADDING];
78 };
79
80 GType        gst_property_probe_get_type       (void);
81
82 /* virtual class function wrappers */
83
84 /* returns list of GParamSpecs */
85 const GList *     gst_property_probe_get_properties      (GstPropertyProbe *probe);
86 const GParamSpec *gst_property_probe_get_property        (GstPropertyProbe *probe,
87                                                           const gchar      *name);
88
89 /* probe one property */
90 void              gst_property_probe_probe_property      (GstPropertyProbe *probe,
91                                                           const GParamSpec *pspec);
92 void              gst_property_probe_probe_property_name (GstPropertyProbe *probe,
93                                                           const gchar      *name);
94
95 /* do we need a probe? */
96 gboolean          gst_property_probe_needs_probe         (GstPropertyProbe *probe,
97                                                           const GParamSpec *pspec);
98 gboolean          gst_property_probe_needs_probe_name    (GstPropertyProbe *probe,
99                                                           const gchar      *name);
100
101 /* returns list of GValues */
102 GValueArray *     gst_property_probe_get_values          (GstPropertyProbe *probe,
103                                                           const GParamSpec *pspec);
104 GValueArray *     gst_property_probe_get_values_name     (GstPropertyProbe *probe,
105                                                           const gchar      *name);
106
107 /* sugar */
108 GValueArray *     gst_property_probe_probe_and_get_values (GstPropertyProbe *probe,
109                                                           const GParamSpec *pspec);
110 GValueArray *     gst_property_probe_probe_and_get_values_name (GstPropertyProbe *probe,
111                                                           const gchar      *name);
112
113 G_END_DECLS
114
115 #endif /* __GST_PROPERTY_PROBE_H__ */