1/* GStreamer
2 * Copyright (C) <2015> Jan Schmidt <jan@centricular.com>
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., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef __GST_VIDEO_MULTIVIEW_H__
21#define __GST_VIDEO_MULTIVIEW_H__
22
23#include <gst/gst.h>
24#include <gst/video/video-prelude.h>
25
26G_BEGIN_DECLS
27
28/**
29 * GstVideoMultiviewFlagsSet:
30 *
31 * See #GstVideoMultiviewFlags.
32 */
33#define GST_TYPE_VIDEO_MULTIVIEW_FLAGSET (gst_video_multiview_flagset_get_type())
34GST_VIDEO_API
35GType gst_video_multiview_flagset_get_type (void);
36
37GST_VIDEO_API
38const gchar * gst_video_multiview_mode_to_caps_string (GstVideoMultiviewMode mview_mode);
39
40GST_VIDEO_API
41GstVideoMultiviewMode gst_video_multiview_mode_from_caps_string (const gchar * caps_mview_mode);
42
43GST_VIDEO_API
44const GValue *gst_video_multiview_get_mono_modes(void);
45
46GST_VIDEO_API
47const GValue *gst_video_multiview_get_unpacked_modes(void);
48
49GST_VIDEO_API
50const GValue *gst_video_multiview_get_doubled_height_modes(void);
51
52GST_VIDEO_API
53const GValue *gst_video_multiview_get_doubled_width_modes(void);
54
55GST_VIDEO_API
56const GValue *gst_video_multiview_get_doubled_size_modes(void);
57
58GST_VIDEO_API
59void gst_video_multiview_video_info_change_mode (GstVideoInfo *info,
60 GstVideoMultiviewMode out_mview_mode, GstVideoMultiviewFlags out_mview_flags);
61
62GST_VIDEO_API
63gboolean gst_video_multiview_guess_half_aspect (GstVideoMultiviewMode mv_mode,
64 guint width, guint height, guint par_n, guint par_d);
65
66
67#if 0 /* Place-holder for later MVC support */
68#define GST_VIDEO_MULTIVIEW_META_API_TYPE (gst_video_multiview_meta_api_get_type())
69#define GST_VIDEO_MULTIVIEW_META_INFO (gst_video_multiview_meta_get_info())
70
71typedef struct _GstVideoMultiviewMeta GstVideoMultiviewMeta;
72typedef struct _GstVideoMultiviewViewInfo GstVideoMultiviewViewInfo;
73
74GType gst_video_multiview_meta_api_get_type (void);
75const GstMetaInfo * gst_video_multiview_meta_get_info (void);
76
77GstVideoMultiviewMeta * gst_buffer_add_video_multiview_meta (GstBuffer *buffer, guint n_views);
78#define gst_buffer_get_video_multiview_meta(b) ((GstVideoMultiviewMeta *)gst_buffer_get_meta((b),GST_VIDEO_MULTIVIEW_META_API_TYPE))
79
80void gst_video_multiview_meta_set_n_views (GstVideoMultiviewMeta *mview_meta, guint n_views);
81
82typedef enum {
83 GST_VIDEO_MULTIVIEW_VIEW_UNKNOWN = 0,
84 GST_VIDEO_MULTIVIEW_VIEW_MONO = 1,
85 GST_VIDEO_MULTIVIEW_VIEW_LEFT = 2,
86 GST_VIDEO_MULTIVIEW_VIEW_RIGHT = 3
87} GstVideoMultiviewViewLabel;
88
89struct _GstVideoMultiviewViewInfo {
90 GstVideoMultiviewViewLabel view_label;
91
92 guint meta_id; /* id of the GstVideoMeta for this view */
93
94 /*< private >*/
95 gpointer _gst_reserved[GST_PADDING];
96};
97
98struct _GstVideoMultiviewMeta {
99 GstMeta meta;
100
101 guint n_views;
102 GstVideoMultiviewViewInfo *view_info;
103};
104#endif
105
106G_END_DECLS
107
108#endif
109

source code of include/gstreamer-1.0/gst/video/video-multiview.h