Parse the number of views in multiview video buffers.
video/x-raw
- width, G_TYPE_INT
+ width, G_TYPE_INT, mandatory
The width of the image in pixels.
- height, G_TYPE_INT
+ height, G_TYPE_INT, mandatory
The height of the image in pixels
- framerate, GST_TYPE_FRACTION
+ framerate, GST_TYPE_FRACTION, default 0/1
The framerate of the video 0/1 for variable framerate
- pixel-aspect-ratio, GST_TYPE_FRACTION
+ pixel-aspect-ratio, GST_TYPE_FRACTION, default 1/1
The pixel aspect ration of the video
- format, G_TYPE_STRING
+ views, G_TYPE_INT, default 1
+ The number of views for multiview video. Each buffer contains
+ multiple GstMetaVideo buffers that describe each view.
+
+ format, G_TYPE_STRING, mandatory
The format of the video
* "I420" planar 4:2:0 YUV
/**
* GstMetaVideo:
* @meta: parent #GstMeta
+ * @buffer: the buffer this metadata belongs to
* @flags: additional video flags
+ * @format: the video format
+ * @width: the video width
+ * @height: the video height
* @n_planes: the number of planes in the image
* @offset: array of offsets for the planes
* @stride: array of strides for the planes
g_return_if_fail (info != NULL);
memset (info, 0, sizeof (GstVideoInfo));
+ info->views = 1;
/* arrange for sensible defaults, e.g. if turned into caps */
info->fps_n = 0;
info->fps_d = 1;
GstStructure *structure;
const gchar *s;
GstVideoFormat format;
- gint width, height;
+ gint width, height, views;
gint fps_n, fps_d;
gboolean interlaced;
gint par_n, par_d;
else
info->flags &= ~GST_VIDEO_FLAG_INTERLACED;
+ if (gst_structure_get_int (structure, "views", &views))
+ info->views = views;
+ else
+ info->views = 1;
+
s = gst_structure_get_string (structure, "color-matrix");
if (s)
info->color_matrix = s;
if (info->chroma_site)
gst_caps_set_simple (caps, "chroma-site", G_TYPE_STRING, info->chroma_site,
NULL);
+ if (info->views > 1)
+ gst_caps_set_simple (caps, "views", G_TYPE_INT, info->views, NULL);
return caps;
}
* @flags: additional video flags
* @width: the width of the video
* @height: the height of the video
+ * @views: the number of views for multiview video
* @size: the default size of one frame
* @color_matrix: the color matrix. Possible values are
* "sdtv" for the standard definition color matrix (as specified in
gint width;
gint height;
gsize size;
+ gint views;
const gchar *color_matrix;
const gchar *chroma_site;
#define GST_VIDEO_INFO_WIDTH(i) ((i)->width)
#define GST_VIDEO_INFO_HEIGHT(i) ((i)->height)
#define GST_VIDEO_INFO_SIZE(i) ((i)->size)
+#define GST_VIDEO_INFO_VIEWS(i) ((i)->views)
#define GST_VIDEO_INFO_PAR_N(i) ((i)->par_n)
#define GST_VIDEO_INFO_PAR_D(i) ((i)->par_d)
#define GST_VIDEO_INFO_FPS_N(i) ((i)->fps_n)