Debian Codegraph @

gstreamer/gstreamermm/videoinfo.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_VIDEOINFO_H
3 #define _GSTREAMERMM_VIDEOINFO_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-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 <gstreamermm/caps.h>
29 #include <gstreamermm/videoformat.h>
30 #include <gstreamermm/format.h>
31 #include <gstreamermm/videochroma.h>
32 #include <gst/video/video-info.h>
33
34
35 namespace Gst
36 {
37
38 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
39
40 /**
41 * @var VideoInterlaceMode VIDEO_INTERLACE_MODE_PROGRESSIVE
42 * All frames are progressive.
43 *
44 * @var VideoInterlaceMode VIDEO_INTERLACE_MODE_INTERLEAVED
45 * 2 fields are interleaved in one video
46 * frame. Extra buffer flags describe the field order.
47 *
48 * @var VideoInterlaceMode VIDEO_INTERLACE_MODE_MIXED
49 * Frames contains both interlaced and
50 * progressive video, the buffer flags describe the frame and fields.
51 *
52 * @var VideoInterlaceMode VIDEO_INTERLACE_MODE_FIELDS
53 * 2 fields are stored in one buffer, use the
54 * frame ID to get access to the required field. For multiview (the
55 * 'views' property > 1) the fields of view N can be found at frame ID
56 * (N * 2) and (N * 2) + 1.
57 * Each field has only half the amount of lines as noted in the
58 * height property. This mode requires multiple GstVideoMeta metadata
59 * to describe the fields.
60 *
61 * @enum VideoInterlaceMode
62 *
63 * The possible values of the Gst::VideoInterlaceMode describing the interlace
64 * mode of the stream.
65 *
66 * @ingroup gstreamermmEnums
67 */
68 enum VideoInterlaceMode
69 {
70 VIDEO_INTERLACE_MODE_PROGRESSIVE,
71 VIDEO_INTERLACE_MODE_INTERLEAVED,
72 VIDEO_INTERLACE_MODE_MIXED,
73 VIDEO_INTERLACE_MODE_FIELDS
74 };
75
76 } // namespace Gst
77
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79 namespace Glib
80 {
81
82 template <>
83 class Value<Gst::VideoInterlaceMode> : public Glib::Value_Enum<Gst::VideoInterlaceMode>
84 {
85 public:
86 static GType value_type() G_GNUC_CONST;
87 };
88
89 } // namespace Glib
90 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
91
92 namespace Gst
93 {
94
95 /**
96 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_NONE
97 * A special value indicating
98 * no multiview information. Used in GstVideoInfo and other places to
99 * indicate that no specific multiview handling has been requested or
100 * provided. This value is never carried on caps.
101 *
102 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_MONO
103 * All frames are monoscopic.
104 *
105 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_LEFT
106 * All frames represent a left-eye view.
107 *
108 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_RIGHT
109 * All frames represent a right-eye view.
110 *
111 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE
112 * Left and right eye views are
113 * provided in the left and right half of the frame respectively.
114 *
115 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX
116 * Left and right eye
117 * views are provided in the left and right half of the frame, but
118 * have been sampled using quincunx method, with half-pixel offset
119 * between the 2 views.
120 *
121 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED
122 * Alternating vertical
123 * columns of pixels represent the left and right eye view respectively.
124 *
125 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED
126 * Alternating horizontal
127 * rows of pixels represent the left and right eye view respectively.
128 *
129 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_TOP_BOTTOM
130 * The top half of the frame
131 * contains the left eye, and the bottom half the right eye.
132 *
133 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_CHECKERBOARD
134 * Pixels are arranged with
135 * alternating pixels representing left and right eye views in a
136 * checkerboard fashion.
137 *
138 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME
139 * Left and right eye views
140 * are provided in separate frames alternately.
141 *
142 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME
143 * Multiple
144 * independent views are provided in separate frames in sequence.
145 * This method only applies to raw video buffers at the moment.
146 * Specific view identification is via the Gst::VideoMultiviewMeta
147 * and Gst::VideoMeta(s) on raw video buffers.
148 *
149 * @var VideoMultiviewMode VIDEO_MULTIVIEW_MODE_SEPARATED
150 * Multiple views are
151 * provided as separate Gst::Memory framebuffers attached to each
152 * Gst::Buffer, described by the Gst::VideoMultiviewMeta
153 * and Gst::VideoMeta(s).
154 *
155 * @enum VideoMultiviewMode
156 *
157 * All possible stereoscopic 3D and multiview representations.
158 * In conjunction with Gst::VideoMultiviewFlags, describes how
159 * multiview content is being transported in the stream.
160 *
161 * @ingroup gstreamermmEnums
162 */
163 enum VideoMultiviewMode
164 {
165 VIDEO_MULTIVIEW_MODE_NONE = -1,
166 VIDEO_MULTIVIEW_MODE_MONO = 0,
167 VIDEO_MULTIVIEW_MODE_LEFT = 1,
168 VIDEO_MULTIVIEW_MODE_RIGHT = 2,
169 VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE = 3,
170 VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX = 4,
171 VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED = 5,
172 VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED = 6,
173 VIDEO_MULTIVIEW_MODE_TOP_BOTTOM = 7,
174 VIDEO_MULTIVIEW_MODE_CHECKERBOARD = 8,
175 VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME = 32,
176 VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME = 33,
177 VIDEO_MULTIVIEW_MODE_SEPARATED = 34
178 };
179
180 } // namespace Gst
181
182 #ifndef DOXYGEN_SHOULD_SKIP_THIS
183 namespace Glib
184 {
185
186 template <>
187 class Value<Gst::VideoMultiviewMode> : public Glib::Value_Enum<Gst::VideoMultiviewMode>
188 {
189 public:
190 static GType value_type() G_GNUC_CONST;
191 };
192
193 } // namespace Glib
194 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
195
196 namespace Gst
197 {
198
199 /**
200 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_NONE
201 * A special value indicating
202 * no frame packing info.
203 *
204 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_MONO
205 * All frames are monoscopic.
206 *
207 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_LEFT
208 * All frames represent a left-eye view.
209 *
210 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT
211 * All frames represent a right-eye view.
212 *
213 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE
214 * Left and right eye views are
215 * provided in the left and right half of the frame respectively.
216 *
217 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX
218 * Left and right eye
219 * views are provided in the left and right half of the frame, but
220 * have been sampled using quincunx method, with half-pixel offset
221 * between the 2 views.
222 *
223 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED
224 * Alternating vertical
225 * columns of pixels represent the left and right eye view respectively.
226 *
227 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED
228 * Alternating horizontal
229 * rows of pixels represent the left and right eye view respectively.
230 *
231 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM
232 * The top half of the frame
233 * contains the left eye, and the bottom half the right eye.
234 *
235 * @var VideoMultiviewFramePacking VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD
236 * Pixels are arranged with
237 * alternating pixels representing left and right eye views in a
238 * checkerboard fashion.
239 *
240 * @enum VideoMultiviewFramePacking
241 *
242 * Gst::VideoMultiviewFramePacking represents the subset of Gst::VideoMultiviewMode
243 * values that can be applied to any video frame without needing extra metadata.
244 * It can be used by elements that provide a property to override the
245 * multiview interpretation of a video stream when the video doesn't contain
246 * any markers.
247 *
248 * This enum is used (for example) on playbin, to re-interpret a played
249 * video stream as a stereoscopic video. The individual enum values are
250 * equivalent to and have the same value as the matching Gst::VideoMultiviewMode.
251 *
252 * @ingroup gstreamermmEnums
253 */
254 enum VideoMultiviewFramePacking
255 {
256 VIDEO_MULTIVIEW_FRAME_PACKING_NONE = -1,
257 VIDEO_MULTIVIEW_FRAME_PACKING_MONO,
258 VIDEO_MULTIVIEW_FRAME_PACKING_LEFT,
259 VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT,
260 VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE,
261 VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX,
262 VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED,
263 VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED,
264 VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM,
265 VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD
266 };
267
268 } // namespace Gst
269
270 #ifndef DOXYGEN_SHOULD_SKIP_THIS
271 namespace Glib
272 {
273
274 template <>
275 class Value<Gst::VideoMultiviewFramePacking> : public Glib::Value_Enum<Gst::VideoMultiviewFramePacking>
276 {
277 public:
278 static GType value_type() G_GNUC_CONST;
279 };
280
281 } // namespace Glib
282 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
283
284 namespace Gst
285 {
286
287 /**
288 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_NONE
289 * No flags.
290 *
291 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST
292 * For stereo streams, the
293 * normal arrangement of left and right views is reversed.
294 *
295 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED
296 * The left view is vertically
297 * mirrored.
298 *
299 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED
300 * The left view is horizontally
301 * mirrored.
302 *
303 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED
304 * The right view is
305 * vertically mirrored.
306 *
307 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED
308 * The right view is
309 * horizontally mirrored.
310 *
311 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT
312 * For frame-packed
313 * multiview modes, indicates that the individual
314 * views have been encoded with half the true width or height
315 * and should be scaled back up for display. This flag
316 * is used for overriding input layout interpretation
317 * by adjusting pixel-aspect-ratio.
318 * For side-by-side, column interleaved or checkerboard packings, the
319 * pixel width will be doubled. For row interleaved and top-bottom
320 * encodings, pixel height will be doubled.
321 *
322 * @var VideoMultiviewFlags VIDEO_MULTIVIEW_FLAGS_MIXED_MONO
323 * The video stream contains both
324 * mono and multiview portions, signalled on each buffer by the
325 * absence or presence of the @a GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW
326 * buffer flag.
327 *
328 * @enum VideoMultiviewFlags
329 *
330 * GstVideoMultiviewFlags are used to indicate extra properties of a
331 * stereo/multiview stream beyond the frame layout and buffer mapping
332 * that is conveyed in the Gst::MultiviewMode.
333 *
334 * @ingroup gstreamermmEnums
335 * @par Bitwise operators:
336 * <tt>%VideoMultiviewFlags operator|(VideoMultiviewFlags, VideoMultiviewFlags)</tt><br>
337 * <tt>%VideoMultiviewFlags operator&(VideoMultiviewFlags, VideoMultiviewFlags)</tt><br>
338 * <tt>%VideoMultiviewFlags operator^(VideoMultiviewFlags, VideoMultiviewFlags)</tt><br>
339 * <tt>%VideoMultiviewFlags operator~(VideoMultiviewFlags)</tt><br>
340 * <tt>%VideoMultiviewFlags& operator|=(VideoMultiviewFlags&, VideoMultiviewFlags)</tt><br>
341 * <tt>%VideoMultiviewFlags& operator&=(VideoMultiviewFlags&, VideoMultiviewFlags)</tt><br>
342 * <tt>%VideoMultiviewFlags& operator^=(VideoMultiviewFlags&, VideoMultiviewFlags)</tt><br>
343 */
344 enum VideoMultiviewFlags
345 {
346 VIDEO_MULTIVIEW_FLAGS_NONE = 0x0,
347 VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST = (1 << 0),
348 VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED = (1 << 1),
349 VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED = (1 << 2),
350 VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED = (1 << 3),
351 VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED = (1 << 4),
352 VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT = (1 << 14),
353 VIDEO_MULTIVIEW_FLAGS_MIXED_MONO = (1 << 15)
354 };
355
356 /** @ingroup gstreamermmEnums */
357 inline VideoMultiviewFlags operator|(VideoMultiviewFlags lhs, VideoMultiviewFlags rhs)
358 { return static_cast<VideoMultiviewFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
359
360 /** @ingroup gstreamermmEnums */
361 inline VideoMultiviewFlags operator&(VideoMultiviewFlags lhs, VideoMultiviewFlags rhs)
362 { return static_cast<VideoMultiviewFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
363
364 /** @ingroup gstreamermmEnums */
365 inline VideoMultiviewFlags operator^(VideoMultiviewFlags lhs, VideoMultiviewFlags rhs)
366 { return static_cast<VideoMultiviewFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
367
368 /** @ingroup gstreamermmEnums */
369 inline VideoMultiviewFlags operator~(VideoMultiviewFlags flags)
370 { return static_cast<VideoMultiviewFlags>(~static_cast<unsigned>(flags)); }
371
372 /** @ingroup gstreamermmEnums */
373 inline VideoMultiviewFlags& operator|=(VideoMultiviewFlags& lhs, VideoMultiviewFlags rhs)
374 { return (lhs = static_cast<VideoMultiviewFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
375
376 /** @ingroup gstreamermmEnums */
377 inline VideoMultiviewFlags& operator&=(VideoMultiviewFlags& lhs, VideoMultiviewFlags rhs)
378 { return (lhs = static_cast<VideoMultiviewFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
379
380 /** @ingroup gstreamermmEnums */
381 inline VideoMultiviewFlags& operator^=(VideoMultiviewFlags& lhs, VideoMultiviewFlags rhs)
382 { return (lhs = static_cast<VideoMultiviewFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
383
384 } // namespace Gst
385
386 #ifndef DOXYGEN_SHOULD_SKIP_THIS
387 namespace Glib
388 {
389
390 template <>
391 class Value<Gst::VideoMultiviewFlags> : public Glib::Value_Flags<Gst::VideoMultiviewFlags>
392 {
393 public:
394 static GType value_type() G_GNUC_CONST;
395 };
396
397 } // namespace Glib
398 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
399
400 namespace Gst
401 {
402
403 /**
404 * @var VideoFlags VIDEO_FLAG_NONE
405 * No flags.
406 *
407 * @var VideoFlags VIDEO_FLAG_VARIABLE_FPS
408 * A variable fps is selected, fps_n and fps_d
409 * denote the maximum fps of the video.
410 *
411 * @var VideoFlags VIDEO_FLAG_PREMULTIPLIED_ALPHA
412 * Each color has been scaled by the alpha
413 * value.
414 *
415 * @enum VideoFlags
416 *
417 * Extra video flags
418 *
419 * @ingroup gstreamermmEnums
420 * @par Bitwise operators:
421 * <tt>%VideoFlags operator|(VideoFlags, VideoFlags)</tt><br>
422 * <tt>%VideoFlags operator&(VideoFlags, VideoFlags)</tt><br>
423 * <tt>%VideoFlags operator^(VideoFlags, VideoFlags)</tt><br>
424 * <tt>%VideoFlags operator~(VideoFlags)</tt><br>
425 * <tt>%VideoFlags& operator|=(VideoFlags&, VideoFlags)</tt><br>
426 * <tt>%VideoFlags& operator&=(VideoFlags&, VideoFlags)</tt><br>
427 * <tt>%VideoFlags& operator^=(VideoFlags&, VideoFlags)</tt><br>
428 */
429 enum VideoFlags
430 {
431 VIDEO_FLAG_NONE = 0x0,
432 VIDEO_FLAG_VARIABLE_FPS = (1 << 0),
433 VIDEO_FLAG_PREMULTIPLIED_ALPHA = (1 << 1)
434 };
435
436 /** @ingroup gstreamermmEnums */
437 inline VideoFlags operator|(VideoFlags lhs, VideoFlags rhs)
438 { return static_cast<VideoFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
439
440 /** @ingroup gstreamermmEnums */
441 inline VideoFlags operator&(VideoFlags lhs, VideoFlags rhs)
442 { return static_cast<VideoFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
443
444 /** @ingroup gstreamermmEnums */
445 inline VideoFlags operator^(VideoFlags lhs, VideoFlags rhs)
446 { return static_cast<VideoFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
447
448 /** @ingroup gstreamermmEnums */
449 inline VideoFlags operator~(VideoFlags flags)
450 { return static_cast<VideoFlags>(~static_cast<unsigned>(flags)); }
451
452 /** @ingroup gstreamermmEnums */
453 inline VideoFlags& operator|=(VideoFlags& lhs, VideoFlags rhs)
454 { return (lhs = static_cast<VideoFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
455
456 /** @ingroup gstreamermmEnums */
457 inline VideoFlags& operator&=(VideoFlags& lhs, VideoFlags rhs)
458 { return (lhs = static_cast<VideoFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
459
460 /** @ingroup gstreamermmEnums */
461 inline VideoFlags& operator^=(VideoFlags& lhs, VideoFlags rhs)
462 { return (lhs = static_cast<VideoFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
463
464 } // namespace Gst
465
466 #ifndef DOXYGEN_SHOULD_SKIP_THIS
467 namespace Glib
468 {
469
470 template <>
471 class Value<Gst::VideoFlags> : public Glib::Value_Flags<Gst::VideoFlags>
472 {
473 public:
474 static GType value_type() G_GNUC_CONST;
475 };
476
477 } // namespace Glib
478 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
479
480 namespace Gst
481 {
482
483
484 /** Information describing image properties. This information can be filled
485 * in from Gst::Caps with from_caps(). The information is also used
486 * to store the specific video info when mapping a video frame with
487 * VideoFrame::map().
488 *
489 * Last reviewed on 2016-09-14 (1.8.0).
490 */
491 class VideoInfo
492 {
493 public:
494 #ifndef DOXYGEN_SHOULD_SKIP_THIS
495 using CppObjectType = VideoInfo;
496 using BaseObjectType = GstVideoInfo;
497 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
498
499 private:
500
501
502 public:
503 VideoInfo();
504 VideoInfo(const VideoInfo& other);
505 VideoInfo& operator=(const VideoInfo& other);
506
507 /** This constructor allows to wrap both dynamic and static allocated
508 * GstVideoInfo object. If castitem is either static allocated or
509 * dynamic allocated, but will be freed somewhere else, @a take_ownership
510 * should be set to false. If @a take_ownership is set to true, castitem
511 * is freed in VideoInfo destructor.
512 */
513 VideoInfo(GstVideoInfo* castitem, bool take_ownership);
514 ~VideoInfo();
515
516 GstVideoInfo* gobj() { return gobject_; }
517 const GstVideoInfo* gobj() const { return gobject_; }
518
519
520 /** Initialize @a info with default values.
521 */
522 void init();
523
524 /** Set the default info for a video frame of @a format and @a width and @a height.
525 *
526 * @note This initializes @a info first, no values are preserved. This function
527 * does not set the offsets correctly for interlaced vertically
528 * subsampled formats.
529 *
530 * @param format The format.
531 * @param width A width.
532 * @param height A height.
533 */
534 void set_format(Gst::VideoFormat format, guint width, guint height);
535
536 /** Parse @a caps and update @a info.
537 *
538 * @param caps A Gst::Caps.
539 * @return <tt>true</tt> if @a caps could be parsed.
540 */
541 bool from_caps(const Glib::RefPtr<const Gst::Caps>& caps);
542
543 /** Convert the values of @a info into a Gst::Caps.
544 *
545 * @return A new Gst::Caps containing the info of @a info.
546 */
547 Glib::RefPtr<Gst::Caps> to_caps() const;;
548
549 /** Converts among various Gst::Format types. This function handles
550 * GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For
551 * raw video, GST_FORMAT_DEFAULT corresponds to video frames. This
552 * function can be used to handle pad queries of the type GST_QUERY_CONVERT.
553 *
554 * @param src_format Gst::Format of the @a src_value.
555 * @param src_value Value to convert.
556 * @param dest_format Gst::Format of the @a dest_value.
557 * @param dest_value Pointer to destination value.
558 * @return <tt>true</tt> if the conversion was successful.
559 */
560 bool convert(Gst::Format src_format, gint64 src_value, Gst::Format dest_format, gint64& dest_value);
561
562 /** Compares two Gst::VideoInfo and returns whether they are equal or not
563 *
564 * @param other A Gst::VideoInfo.
565 * @return <tt>true</tt> if @a info and @a other are equal, else <tt>false</tt>.
566 */
567 bool is_equal(const Gst::VideoInfo& other) const;
568
569 const VideoFormatInfo get_finfo() const;
570
571 Gst::VideoInterlaceMode get_interlace_mode() const;
572 void set_interlace_mode(const Gst::VideoInterlaceMode& value);
573
574 Gst::VideoFlags get_flags() const;
575 void set_flags(const Gst::VideoFlags& value);
576
577 gint get_width() const;
578 void set_width(const gint& value);
579
580 gint get_height() const;
581 void set_height(const gint& value);
582
583 gsize get_size() const;
584 void set_size(const gsize& value);
585
586 gint get_views() const;
587 void set_views(const gint& value);
588
589 Gst::VideoChromaSite get_chroma_site() const;
590 void set_chroma_site(const Gst::VideoChromaSite& value);
591
592 gint get_par_n() const;
593 void set_par_n(const gint& value);
594
595 gint get_par_d() const;
596 void set_par_d(const gint& value);
597
598 gint get_fps_n() const;
599 void set_fps_n(const gint& value);
600
601 gint get_fps_d() const;
602 void set_fps_d(const gint& value);
603
604 Gst::VideoMultiviewMode get_multiview_mode() const;
605 void set_multiview_mode(const Gst::VideoMultiviewMode& value);
606
607 Gst::VideoMultiviewFlags get_multiview_flags() const;
608 void set_multiview_flags(const Gst::VideoMultiviewFlags& value);
609
610 private:
611 GstVideoInfo* gobject_;
612 bool take_ownership;
613
614
615 };
616
617 }
618
619
620 #endif /* _GSTREAMERMM_VIDEOINFO_H */
621