Debian Codegraph @

gstreamer/gstreamermm/videoformat.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_VIDEOFORMAT_H
3 #define _GSTREAMERMM_VIDEOFORMAT_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2008-2015 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/video/video-format.h>
29
30
31 namespace Gst
32 {
33 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
34
35 /**
36 *
37 * @ingroup gstreamermmEnums
38 */
39 enum VideoFormat
40 {
41 VIDEO_FORMAT_UNKNOWN,
42 VIDEO_FORMAT_ENCODED,
43 VIDEO_FORMAT_I420,
44 VIDEO_FORMAT_YV12,
45 VIDEO_FORMAT_YUY2,
46 VIDEO_FORMAT_UYVY,
47 VIDEO_FORMAT_AYUV,
48 VIDEO_FORMAT_RGBx,
49 VIDEO_FORMAT_BGRx,
50 VIDEO_FORMAT_xRGB,
51 VIDEO_FORMAT_xBGR,
52 VIDEO_FORMAT_RGBA,
53 VIDEO_FORMAT_BGRA,
54 VIDEO_FORMAT_ARGB,
55 VIDEO_FORMAT_ABGR,
56 VIDEO_FORMAT_RGB,
57 VIDEO_FORMAT_BGR,
58 VIDEO_FORMAT_Y41B,
59 VIDEO_FORMAT_Y42B,
60 VIDEO_FORMAT_YVYU,
61 VIDEO_FORMAT_Y444,
62 VIDEO_FORMAT_v210,
63 VIDEO_FORMAT_v216,
64 VIDEO_FORMAT_NV12,
65 VIDEO_FORMAT_NV21,
66 VIDEO_FORMAT_GRAY8,
67 VIDEO_FORMAT_GRAY16_BE,
68 VIDEO_FORMAT_GRAY16_LE,
69 VIDEO_FORMAT_v308,
70 VIDEO_FORMAT_RGB16,
71 VIDEO_FORMAT_BGR16,
72 VIDEO_FORMAT_RGB15,
73 VIDEO_FORMAT_BGR15,
74 VIDEO_FORMAT_UYVP,
75 VIDEO_FORMAT_A420,
76 VIDEO_FORMAT_RGB8P,
77 VIDEO_FORMAT_YUV9,
78 VIDEO_FORMAT_YVU9,
79 VIDEO_FORMAT_IYU1,
80 VIDEO_FORMAT_ARGB64,
81 VIDEO_FORMAT_AYUV64,
82 VIDEO_FORMAT_r210,
83 VIDEO_FORMAT_I420_10BE,
84 VIDEO_FORMAT_I420_10LE,
85 VIDEO_FORMAT_I422_10BE,
86 VIDEO_FORMAT_I422_10LE,
87 VIDEO_FORMAT_Y444_10BE,
88 VIDEO_FORMAT_Y444_10LE,
89 VIDEO_FORMAT_GBR,
90 VIDEO_FORMAT_GBR_10BE,
91 VIDEO_FORMAT_GBR_10LE,
92 VIDEO_FORMAT_NV16,
93 VIDEO_FORMAT_NV24,
94 VIDEO_FORMAT_NV12_64Z32,
95 VIDEO_FORMAT_A420_10BE,
96 VIDEO_FORMAT_A420_10LE,
97 VIDEO_FORMAT_A422_10BE,
98 VIDEO_FORMAT_A422_10LE,
99 VIDEO_FORMAT_A444_10BE,
100 VIDEO_FORMAT_A444_10LE,
101 VIDEO_FORMAT_NV61
102 };
103
104 } // namespace Gst
105
106 #ifndef DOXYGEN_SHOULD_SKIP_THIS
107 namespace Glib
108 {
109
110 template <>
111 class Value<Gst::VideoFormat> : public Glib::Value_Enum<Gst::VideoFormat>
112 {
113 public:
114 static GType value_type() G_GNUC_CONST;
115 };
116
117 } // namespace Glib
118 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
119
120 namespace Gst
121 {
122
123 /**
124 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_YUV
125 * The video format is YUV, components are numbered
126 * 0=Y, 1=U, 2=V.
127 *
128 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_RGB
129 * The video format is RGB, components are numbered
130 * 0=R, 1=G, 2=B.
131 *
132 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_GRAY
133 * The video is gray, there is one gray component
134 * with index 0.
135 *
136 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_ALPHA
137 * The video format has an alpha components with
138 * the number 3.
139 *
140 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_LE
141 * The video format has data stored in little
142 * endianness.
143 *
144 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_PALETTE
145 * The video format has a palette. The palette
146 * is stored in the second plane and indexes are stored in the first plane.
147 *
148 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_COMPLEX
149 * The video format has a complex layout that
150 * can't be described with the usual information in the Gst::VideoFormatInfo.
151 *
152 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_UNPACK
153 * This format can be used in a
154 * Gst::VideoFormatUnpack and Gst::VideoFormatPack function.
155 *
156 * @var VideoFormatFlags VIDEO_FORMAT_FLAG_TILED
157 * The format is tiled, there is tiling information
158 * in the last plane.
159 *
160 * @enum VideoFormatFlags
161 *
162 * The different video flags that a format info can have.
163 *
164 * @ingroup gstreamermmEnums
165 * @par Bitwise operators:
166 * <tt>%VideoFormatFlags operator|(VideoFormatFlags, VideoFormatFlags)</tt><br>
167 * <tt>%VideoFormatFlags operator&(VideoFormatFlags, VideoFormatFlags)</tt><br>
168 * <tt>%VideoFormatFlags operator^(VideoFormatFlags, VideoFormatFlags)</tt><br>
169 * <tt>%VideoFormatFlags operator~(VideoFormatFlags)</tt><br>
170 * <tt>%VideoFormatFlags& operator|=(VideoFormatFlags&, VideoFormatFlags)</tt><br>
171 * <tt>%VideoFormatFlags& operator&=(VideoFormatFlags&, VideoFormatFlags)</tt><br>
172 * <tt>%VideoFormatFlags& operator^=(VideoFormatFlags&, VideoFormatFlags)</tt><br>
173 */
174 enum VideoFormatFlags
175 {
176 VIDEO_FORMAT_FLAG_YUV = (1 << 0),
177 VIDEO_FORMAT_FLAG_RGB = (1 << 1),
178 VIDEO_FORMAT_FLAG_GRAY = (1 << 2),
179 VIDEO_FORMAT_FLAG_ALPHA = (1 << 3),
180 VIDEO_FORMAT_FLAG_LE = (1 << 4),
181 VIDEO_FORMAT_FLAG_PALETTE = (1 << 5),
182 VIDEO_FORMAT_FLAG_COMPLEX = (1 << 6),
183 VIDEO_FORMAT_FLAG_UNPACK = (1 << 7),
184 VIDEO_FORMAT_FLAG_TILED = (1 << 8)
185 };
186
187 /** @ingroup gstreamermmEnums */
188 inline VideoFormatFlags operator|(VideoFormatFlags lhs, VideoFormatFlags rhs)
189 { return static_cast<VideoFormatFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
190
191 /** @ingroup gstreamermmEnums */
192 inline VideoFormatFlags operator&(VideoFormatFlags lhs, VideoFormatFlags rhs)
193 { return static_cast<VideoFormatFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
194
195 /** @ingroup gstreamermmEnums */
196 inline VideoFormatFlags operator^(VideoFormatFlags lhs, VideoFormatFlags rhs)
197 { return static_cast<VideoFormatFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
198
199 /** @ingroup gstreamermmEnums */
200 inline VideoFormatFlags operator~(VideoFormatFlags flags)
201 { return static_cast<VideoFormatFlags>(~static_cast<unsigned>(flags)); }
202
203 /** @ingroup gstreamermmEnums */
204 inline VideoFormatFlags& operator|=(VideoFormatFlags& lhs, VideoFormatFlags rhs)
205 { return (lhs = static_cast<VideoFormatFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
206
207 /** @ingroup gstreamermmEnums */
208 inline VideoFormatFlags& operator&=(VideoFormatFlags& lhs, VideoFormatFlags rhs)
209 { return (lhs = static_cast<VideoFormatFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
210
211 /** @ingroup gstreamermmEnums */
212 inline VideoFormatFlags& operator^=(VideoFormatFlags& lhs, VideoFormatFlags rhs)
213 { return (lhs = static_cast<VideoFormatFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
214
215 } // namespace Gst
216
217 #ifndef DOXYGEN_SHOULD_SKIP_THIS
218 namespace Glib
219 {
220
221 template <>
222 class Value<Gst::VideoFormatFlags> : public Glib::Value_Flags<Gst::VideoFormatFlags>
223 {
224 public:
225 static GType value_type() G_GNUC_CONST;
226 };
227
228 } // namespace Glib
229 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
230
231 namespace Gst
232 {
233
234 /**
235 * @var VideoPackFlags VIDEO_PACK_FLAG_NONE
236 * No flag.
237 *
238 * @var VideoPackFlags VIDEO_PACK_FLAG_TRUNCATE_RANGE
239 * When the source has a smaller depth
240 * than the target format, set the least significant bits of the target
241 * to 0. This is likely sightly faster but less accurate. When this flag
242 * is not specified, the most significant bits of the source are duplicated
243 * in the least significant bits of the destination.
244 *
245 * @var VideoPackFlags VIDEO_PACK_FLAG_INTERLACED
246 * The source is interlaced. The unpacked
247 * format will be interlaced as well with each line containing
248 * information from alternating fields. (Since 1.2).
249 *
250 * @enum VideoPackFlags
251 *
252 * The different flags that can be used when packing and unpacking.
253 *
254 * @ingroup gstreamermmEnums
255 * @par Bitwise operators:
256 * <tt>%VideoPackFlags operator|(VideoPackFlags, VideoPackFlags)</tt><br>
257 * <tt>%VideoPackFlags operator&(VideoPackFlags, VideoPackFlags)</tt><br>
258 * <tt>%VideoPackFlags operator^(VideoPackFlags, VideoPackFlags)</tt><br>
259 * <tt>%VideoPackFlags operator~(VideoPackFlags)</tt><br>
260 * <tt>%VideoPackFlags& operator|=(VideoPackFlags&, VideoPackFlags)</tt><br>
261 * <tt>%VideoPackFlags& operator&=(VideoPackFlags&, VideoPackFlags)</tt><br>
262 * <tt>%VideoPackFlags& operator^=(VideoPackFlags&, VideoPackFlags)</tt><br>
263 */
264 enum VideoPackFlags
265 {
266 VIDEO_PACK_FLAG_NONE = 0x0,
267 VIDEO_PACK_FLAG_TRUNCATE_RANGE = (1 << 0),
268 VIDEO_PACK_FLAG_INTERLACED = (1 << 1)
269 };
270
271 /** @ingroup gstreamermmEnums */
272 inline VideoPackFlags operator|(VideoPackFlags lhs, VideoPackFlags rhs)
273 { return static_cast<VideoPackFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
274
275 /** @ingroup gstreamermmEnums */
276 inline VideoPackFlags operator&(VideoPackFlags lhs, VideoPackFlags rhs)
277 { return static_cast<VideoPackFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
278
279 /** @ingroup gstreamermmEnums */
280 inline VideoPackFlags operator^(VideoPackFlags lhs, VideoPackFlags rhs)
281 { return static_cast<VideoPackFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
282
283 /** @ingroup gstreamermmEnums */
284 inline VideoPackFlags operator~(VideoPackFlags flags)
285 { return static_cast<VideoPackFlags>(~static_cast<unsigned>(flags)); }
286
287 /** @ingroup gstreamermmEnums */
288 inline VideoPackFlags& operator|=(VideoPackFlags& lhs, VideoPackFlags rhs)
289 { return (lhs = static_cast<VideoPackFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
290
291 /** @ingroup gstreamermmEnums */
292 inline VideoPackFlags& operator&=(VideoPackFlags& lhs, VideoPackFlags rhs)
293 { return (lhs = static_cast<VideoPackFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
294
295 /** @ingroup gstreamermmEnums */
296 inline VideoPackFlags& operator^=(VideoPackFlags& lhs, VideoPackFlags rhs)
297 { return (lhs = static_cast<VideoPackFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
298
299 } // namespace Gst
300
301 #ifndef DOXYGEN_SHOULD_SKIP_THIS
302 namespace Glib
303 {
304
305 template <>
306 class Value<Gst::VideoPackFlags> : public Glib::Value_Flags<Gst::VideoPackFlags>
307 {
308 public:
309 static GType value_type() G_GNUC_CONST;
310 };
311
312 } // namespace Glib
313 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
314
315 namespace Gst
316 {
317
318
319 /**
320 * Information for a video format.
321 */
322 class VideoFormatInfo
323 {
324 public:
325 #ifndef DOXYGEN_SHOULD_SKIP_THIS
326 using CppObjectType = VideoFormatInfo;
327 using BaseObjectType = GstVideoFormatInfo;
328 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
329
330 private:
331
332
333 public:
334 explicit VideoFormatInfo(const GstVideoFormatInfo* castitem);
335 virtual ~VideoFormatInfo();
336
337 const GstVideoFormatInfo* gobj() const { return gobj_; };
338
339 VideoFormat get_format() const;
340
341 Glib::ustring get_name() const;
342
343 Glib::ustring get_description() const;
344
345 VideoFormatFlags get_flags() const;
346
347 guint get_bits() const;
348
349 guint get_n_components() const;
350
351 guint get_n_planes() const;
352
353 VideoFormat get_unpack_format() const;
354
355 gint get_pack_lines() const;
356
357 protected:
358 #ifndef DOXYGEN_SHOULD_SKIP_THIS
359 const GstVideoFormatInfo* gobj_;
360 #endif
361
362
363 };
364 }
365
366
367 #endif /* _GSTREAMERMM_VIDEOFORMAT_H */
368