1 /* GStreamer - GParamSpecs for for some of our types
2 * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
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.
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.
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.
20 #ifndef __GST_PARAMSPECS_H__
21 #define __GST_PARAMSPECS_H__
23 #include <gst/gstelement.h>
24 #include <gst/gstvalue.h>
28 /* --- paramspec flags */
31 * GST_PARAM_CONTROLLABLE:
33 * Use this flag on GObject properties to signal they can make sense to be.
34 * controlled over time. This hint is used by the GstController.
36 #define GST_PARAM_CONTROLLABLE (1 << (G_PARAM_USER_SHIFT + 1))
39 * GST_PARAM_MUTABLE_READY:
41 * Use this flag on GObject properties of GstElements to indicate that
42 * they can be changed when the element is in the READY or lower state.
44 #define GST_PARAM_MUTABLE_READY (1 << (G_PARAM_USER_SHIFT + 2))
47 * GST_PARAM_MUTABLE_PAUSED:
49 * Use this flag on GObject properties of GstElements to indicate that
50 * they can be changed when the element is in the PAUSED or lower state.
51 * This flag implies GST_PARAM_MUTABLE_READY.
53 #define GST_PARAM_MUTABLE_PAUSED (1 << (G_PARAM_USER_SHIFT + 3))
56 * GST_PARAM_MUTABLE_PLAYING:
58 * Use this flag on GObject properties of GstElements to indicate that
59 * they can be changed when the element is in the PLAYING or lower state.
60 * This flag implies GST_PARAM_MUTABLE_PAUSED.
62 #define GST_PARAM_MUTABLE_PLAYING (1 << (G_PARAM_USER_SHIFT + 4))
65 * GST_PARAM_USER_SHIFT:
67 * Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications.
69 #define GST_PARAM_USER_SHIFT (1 << (G_PARAM_USER_SHIFT + 8))
72 /* --- type macros --- */
74 #define GST_TYPE_PARAM_FRACTION (gst_param_spec_fraction_get_type ())
75 #define GST_IS_PARAM_SPEC_FRACTION(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GST_TYPE_PARAM_FRACTION))
76 #define GST_PARAM_SPEC_FRACTION(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GST_TYPE_PARAM_FRACTION, GstParamSpecFraction))
79 /* --- get_type functions --- */
81 GType gst_param_spec_fraction_get_type (void);
84 /* --- typedefs & structures --- */
86 typedef struct _GstParamSpecFraction GstParamSpecFraction;
89 * GstParamSpecFraction:
90 * @parent_instance: super class
91 * @min_num: minimal numerator
92 * @min_den: minimal denominator
93 * @max_num: maximal numerator
94 * @max_den: maximal denominator
95 * @def_num: default numerator
96 * @def_den: default denominator
98 * A GParamSpec derived structure that contains the meta data for fractional
101 struct _GstParamSpecFraction {
102 GParamSpec parent_instance;
104 gint min_num, min_den;
105 gint max_num, max_den;
106 gint def_num, def_den;
110 /* --- GParamSpec prototypes --- */
112 GParamSpec * gst_param_spec_fraction (const gchar * name,
115 gint min_num, gint min_denom,
116 gint max_num, gint max_denom,
117 gint default_num, gint default_denom,
120 gboolean gst_param_spec_is_mutable (GParamSpec *param_spec,
121 GstElement *element);
125 #endif /* __GST_PARAMSPECS_H__ */