Add GST_PARAM_CONTROLLABLE and GST_PARAM_USER_SHIFT. Move paramspec docs to own section.
[platform/upstream/gstreamer.git] / gst / gstparamspecs.h
1 /* GStreamer - GParamSpecs for for some of our types
2  * Copyright (C) 2007 Tim-Philipp Müller  <tim centricular net>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GST_PARAMSPECS_H__
21 #define __GST_PARAMSPECS_H__
22
23 #include <gst/gstvalue.h>
24
25 G_BEGIN_DECLS
26
27 /* --- paramspec flags */
28
29 /**
30  * GST_PARAM_CONTROLLABLE:
31  *
32  * Use this flag on GObject properties to signal they can make sense to be.
33  * controlled over time. This hint is used by the GstController.
34  */
35 #define GST_PARAM_CONTROLLABLE  (1 << (G_PARAM_USER_SHIFT + 1))
36
37 /**
38  * GST_PARAM_USER_SHIFT:
39  *
40  * Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications.
41  */
42 #define GST_PARAM_USER_SHIFT    (1 << (G_PARAM_USER_SHIFT + 8))
43
44
45 /* --- type macros --- */
46
47 #define GST_TYPE_PARAM_FRACTION           (gst_param_spec_fraction_get_type ())
48 #define GST_IS_PARAM_SPEC_FRACTION(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GST_TYPE_PARAM_FRACTION))
49 #define GST_PARAM_SPEC_FRACTION(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GST_TYPE_PARAM_FRACTION, GstParamSpecFraction))
50
51
52 /* --- get_type functions --- */
53
54 GType  gst_param_spec_fraction_get_type (void);
55
56
57 /* --- typedefs & structures --- */
58
59 typedef struct _GstParamSpecFraction GstParamSpecFraction;
60
61 /**
62  * GstParamSpecFraction:
63  * @parent_instance: super class
64  * @min_num: minimal numerator
65  * @min_den: minimal denominator
66  * @max_num: maximal numerator
67  * @max_den: maximal denominator
68  * @def_num: default numerator
69  * @def_den: default denominator
70  *
71  * A GParamSpec derived structure that contains the meta data for fractional
72  * properties.
73  */
74 struct _GstParamSpecFraction {
75   GParamSpec    parent_instance;
76   
77   gint          min_num, min_den;
78   gint          max_num, max_den;
79   gint          def_num, def_den;
80 };
81
82
83 /* --- GParamSpec prototypes --- */
84
85 GParamSpec  * gst_param_spec_fraction (const gchar * name,
86                                        const gchar * nick,
87                                        const gchar * blurb,
88                                        gint min_num, gint min_denom,
89                                        gint max_num, gint max_denom,
90                                        gint default_num, gint default_denom,
91                                        GParamFlags flags);
92
93 G_END_DECLS
94
95 #endif /* __GST_PARAMSPECS_H__ */
96