Debian Codegraph @

gstreamer/gstreamermm/value.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!cxx . . $ `<file>/gstreamer/gstreamermm/value.h`/
2 #ifndef _GSTREAMERMM_VALUE_H
3 #define _GSTREAMERMM_VALUE_Hcxx . . $ `gstreamer/gstreamermm/value.h:3:9`!
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2008-2016 The gstreamermm Development Team
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28 #include <gst/gst.h>
29 #include <gst/gstvalue.h>
30 #include <glibmm/value_custom.h>
31
32
33 namespace Gstcxx . . $ Gst/
34 {
35
36 /** @defgroup GstHelperClasses gstreamermm Helper Classes
37 * Classes used to represent GStreamer internal GValue types such as
38 * GST_TYPE_FRACTION, etc.
39 */
40
41 /** A class that represents a 4 byte identifier (used in codecs).
42 * Gst::Fourcc is used to store a four byte identifier in Gst::Structure of
43 * Gst::Caps as a value representing a property (see GStreamer Application
44 * Development Manual section 8.2.2 and GstValue docs). When the value is set,
45 * it is transformed to a GStreamer GType so retrieving the value is a bit
46 * different. The class can be used in setting and getting a Gst::Structure
47 * field like so:
48 *
49 * @code
50 * Glib::Value<Gst::Fourcc> value;
51 * value.init(Glib::Value<Gst::Fourcc>::value_type());
52 * value.set(Gst::Fourcc('M', 'J', 'P', 'G'));
53 *
54 * Gst::Structure structure("my-structure");
55 * structure.set_field("id", value);
56 * ...
57 * Glib::ValueBase gst_value;
58 * structure.get_field("id", gst_value);
59 * Gst::Fourcc fourcc(gst_value);
60 * char first_char = fourcc.first;
61 * ...
62 * @endcode
63 *
64 * Last reviewed on 2016-08-27 (1.8.0)
65 *
66 * @ingroup GstHelperClasses
67 */
68 class Fourcccxx . . $ Gst/Fourcc#
69 {
70 public:
71 /** Construct an undefined Gst::Fourcc.
72 */
73 Fourcccxx . . $ Gst/Fourcc#Fourcc(49f6e7a06ebc5aa8).();
74
75 /** Construct a Gst::Fourcc from another.
76 */
77 Fourcccxx . . $ Gst/Fourcc#Fourcc(7e71b10a75a3dbcc).(const Fourcccxx . . $ Gst/Fourcc#& src);
78
79 /** Construct a Gst::Fourcc from 4 characters.
80 */
81 Fourcccxx . . $ Gst/Fourcc#Fourcc(69126b37bb499ac).(char first, char second, char third, char fourth);
82
83 /** Construct a Gst::Fourcc from an input string. Caller is responsible for
84 * ensuring the input string consists of at least four characters.
85 */
86 explicit Fourcccxx . . $ Gst/Fourcc#Fourcc(1ff0bff2cee2bc51).(const Glibcxx . . $ Glib/::ustringcxx . . $ Glib/ustring#& s);
87
88 /** Construct a Gst::Fourcc from a 32 bit unsigned integer.
89 */
90 explicit Fourcccxx . . $ Gst/Fourcc#Fourcc(cb2f890c2fdad230).(guint32 fourcc);
91
92 Fourcccxx . . $ Gst/Fourcc#& operatorcxx . . $ Gst/Fourcc#`operator=`(9addaf9861381963).=(const Fourcccxx . . $ Gst/Fourcc#& src);
93
94
95 public:
96
97 public:
98 char firstcxx . . $ Gst/Fourcc#first.;
99 char secondcxx . . $ Gst/Fourcc#second.;
100 char thirdcxx . . $ Gst/Fourcc#third.;
101 char fourthcxx . . $ Gst/Fourcc#fourth.;
102
103 private:
104 void set_ccscxx . . $ Gst/Fourcc#set_ccs(cb2f890c2fdad230).(guint32 fourcc);
105 };
106
107
108 /** A class that represents a fraction.
109 * Gst::Fraction is used to store a fraction in Gst::Structures of Gst::Caps as
110 * a value representing a property (see GStreamer Application Development
111 * Manual section 8.2.2 and GstValue docs). When the value is set, it is
112 * transformed to a GStreamer GType so retrieving the value is a bit different.
113 * The class can be used in setting and getting a Gst::Structure field like so:
114 *
115 * @code
116 * Glib::Value<Gst::Fraction> value;
117 * value.init(Glib::Value<Gst::Fraction>::value_type());
118 * value.set(Gst::Fraction(25,1));
119 *
120 * Gst::Structure structure("my-structure");
121 * structure.set_field("framerate", value);
122 * ...
123 * Glib::ValueBase gst_value;
124 * structure.get_field("framerate", gst_value);
125 * Gst::Fraction fract(gst_value);
126 * int numerator = fract.num;
127 * ...
128 * @endcode
129 *
130 * Last reviewed on 2016-08-27 (1.8.0)
131 *
132 * @ingroup GstHelperClasses
133 */
134 class Fractioncxx . . $ Gst/Fraction#
135 {
136 public:
137 /** Constructs a zero Gst::Fraction (0/1).
138 */
139 Fractioncxx . . $ Gst/Fraction#Fraction(49f6e7a06ebc5aa8).();
140
141 /** Constructs a Gst::Fraction from another.
142 */
143 Fractioncxx . . $ Gst/Fraction#Fraction(f311997da585039c).(const Fractioncxx . . $ Gst/Fraction#& src);
144
145 /** Constructs a Gst::Fraction (num/denom).
146 */
147 Fractioncxx . . $ Gst/Fraction#Fraction(3e454b8ccf442868).(int num, int denom);
148
149 /** Constructs a Gst::Fraction from a GST_TYPE_FRACTION.
150 */
151 explicit Fractioncxx . . $ Gst/Fraction#Fraction(ce1a39f4061a801e).(const Glibcxx . . $ Glib/::ValueBasecxx . . $ Glib/ValueBase#& gst_fraction_value);
152
153 /** Constructs a Gst::Fraction from a GST_TYPE_FRACTION.
154 */
155 explicit Fractioncxx . . $ Gst/Fraction#Fraction(cb1ebed02b53c336).(const GValue& gst_fraction_value);
156
157 Fractioncxx . . $ Gst/Fraction#& operatorcxx . . $ Gst/Fraction#`operator=`(ad658318082dddf7).=(const Fractioncxx . . $ Gst/Fraction#& src);
158
159
160 public:
161 int numcxx . . $ Gst/Fraction#num.;
162 int denomcxx . . $ Gst/Fraction#denom.;
163 };
164
165 /** A class that represents a range (min - max).
166 * Gst::Range is used to store a range in Gst::Structures of
167 * Gst::Caps as a value representing a property (see GStreamer Application
168 * Development Manual section 8.2.2 and GstValue docs). When the value is set,
169 * it is transformed to a GStreamer GType so retrieving the value is a bit
170 * different. The class can be used in setting and getting a Gst::Structure
171 * field like so:
172 *
173 * @code
174 * Glib::Value<Gst::Range<int>> value;
175 * value.init(Glib::Value<Gst::Range<int>>::value_type());
176 * value.set(Gst::Range<int>(8000, 50000));
177 *
178 * Gst::Structure structure("my-structure");
179 * structure.set_field("rate", value);
180 * ...
181 * Glib::ValueBase gst_value;
182 * structure.get_field("rate", gst_value);
183 * Gst::Range<int> range(gst_value);
184 * int max = range.max;
185 * ...
186 * @endcode
187 *
188 * Gst::Range should be used with following types: int, double, Gst::Fraction.
189 *
190 * Last reviewed on 2016-08-27 (1.8.0)
191 *
192 * @ingroup GstHelperClasses
193 */
194 template<typename T>
195 class Rangecxx . . $ Gst/Range#
196 {
197 public:
198 /** Constructs a zero Gst::Range.
199 */
200 Rangecxx . . $ Gst/Range#`Range<T>`(49f6e7a06ebc5aa8).() : mincxx . . $ Gst/Range#min.(T()), maxcxx . . $ Gst/Range#max.(T()) {}
201
202 /** Constructs a Gst::Range (min - max).
203 */
204 Rangecxx . . $ Gst/Range#`Range<T>`(249673c20e2b8d5).(T min, T max) : mincxx . . $ Gst/Range#min.(min), maxcxx . . $ Gst/Range#max.(max) {}
205
206 /** Constructs an Gst::Range from another range.
207 */
208 Rangecxx . . $ Gst/Range#`Range<T>`(77370412fa02d226).(const Range& src) : mincxx . . $ Gst/Range#min.(src.mincxx . . $ Gst/Range#min.), maxcxx . . $ Gst/Range#max.(src.maxcxx . . $ Gst/Range#max.) {}
209
210 /** Constructs an Gst::Range from a Glib::ValueBase.
211 */
212 explicit Rangecxx . . $ Gst/Range#`Range<T>`(1be7783f45a9aead).(const Glibcxx . . $ Glib/::Valuecxx . . $ Glib/Value#<Rangecxx . . $ Gst/Range#<T>>& range_value)
213 {
214 mincxx . . $ Gst/Range#min. = range_value.getcxx . . $ Glib/Value#get(8f5363d873dd4781).().min;
215 maxcxx . . $ Gst/Range#max. = range_value.getcxx . . $ Glib/Value#get(8f5363d873dd4781).().max;
216 }
217
218 /** Constructs an Gst::Range from a GValue.
219 */
220 explicit Rangecxx . . $ Gst/Range#`Range<T>`(cb1ebed02b53c336).(const GValue& range_value)
221 {
222 init_rangecxx . . $ Gst/Range#init_range(cb1ebed02b53c336).(range_value);
223 }
224
225 Range& operatorcxx . . $ Gst/Range#`operator=`(20b00853c626a9e1).=(const Range& src)
226 {
227 mincxx . . $ Gst/Range#min. = src.mincxx . . $ Gst/Range#min.;
228 maxcxx . . $ Gst/Range#max. = src.maxcxx . . $ Gst/Range#max.;
229 return *this;
230 }
231
232 public:
233 T mincxx . . $ Gst/Range#min.;
234 T maxcxx . . $ Gst/Range#max.;
235
236 private:
237 void init_rangecxx . . $ Gst/Range#init_range(cb1ebed02b53c336).(const GValue& range_value);
238 };
239
240 } //namespace Gst
241
242 #ifndef DOXYGEN_SHOULD_SKIP_THIS
243 namespace Glibcxx . . $ Glib/
244 {
245
246 template<>
247 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::Fourcccxx . . $ Gst/Fourcc#> : public Valuecxx . . $ Glib/Value#<unsigned int>
248 {
249 public:
250 typedef Gstcxx . . $ Gst/::Fourcccxx . . $ Gst/Fourcc# CppTypecxx . . $ Glib/Value#CppType#;
251 typedef guint32 CTypecxx . . $ Glib/Value#CType#;
252
253 static GType value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
254
255 void setcxx . . $ Glib/Value#set(7e71b10a75a3dbcc).(const Gstcxx . . $ Gst/::Fourcccxx . . $ Gst/Fourcc#& data);
256 Gstcxx . . $ Gst/::Fourcccxx . . $ Gst/Fourcc# getcxx . . $ Glib/Value#get(b77c5882d5c9065b).() const;
257 };
258
259 template<>
260 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<int>> : public ValueBase_Boxedcxx . . $ Glib/ValueBase_Boxed#
261 {
262 public:
263 typedef Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<int> CppTypecxx . . $ Glib/Value#CppType#;
264
265 static GType value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
266
267 void setcxx . . $ Glib/Value#set(b66b2687a045994).(const Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<int>& data);
268 Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<int> getcxx . . $ Glib/Value#get(a4bc615bdecd76b6).() const;
269 };
270
271 template<>
272 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<double>> : public ValueBase_Boxedcxx . . $ Glib/ValueBase_Boxed#
273 {
274 public:
275 typedef Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<double> CppTypecxx . . $ Glib/Value#CppType#;
276
277 static GType value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
278
279 void setcxx . . $ Glib/Value#set(b80a3eee3629b109).(const Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<double>& data);
280 Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<double> getcxx . . $ Glib/Value#get(abf1827713cf72c2).() const;
281 };
282
283 template<>
284 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction#> : public ValueBase_Boxedcxx . . $ Glib/ValueBase_Boxed#
285 {
286 public:
287 typedef Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction# CppTypecxx . . $ Glib/Value#CppType#;
288
289 static GType value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
290
291 void setcxx . . $ Glib/Value#set(f311997da585039c).(const Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction#& data);
292 Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction# getcxx . . $ Glib/Value#get(500f54724967c4c8).() const;
293 };
294
295 template<>
296 class Valuecxx . . $ Glib/Value#<Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction#>> : public ValueBase_Boxedcxx . . $ Glib/ValueBase_Boxed#
297 {
298 public:
299 typedef Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction#> CppTypecxx . . $ Glib/Value#CppType#;
300
301 static GType value_typecxx . . $ Glib/Value#value_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
302
303 void setcxx . . $ Glib/Value#set(1263bab206ad4921).(const Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction#>& data);
304 Gstcxx . . $ Gst/::Rangecxx . . $ Gst/Range#<Gstcxx . . $ Gst/::Fractioncxx . . $ Gst/Fraction#> getcxx . . $ Glib/Value#get(af11f4fa24534110).() const;
305 };
306
307 } // namespace Glib
308 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
309
310
311 #endif /* _GSTREAMERMM_VALUE_H */
312