From 2ba36a69bfddf64a5d3193c1d35ddecec790f91c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 29 May 2012 09:53:15 +0200 Subject: [PATCH] video: add flags for the pack/unpack functions Add a flag argument to the pack and unpack function so that we can expand it later when needed. We could for example prefer a High Quality pack/unpack operation later. --- gst-libs/gst/video/video.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/video/video.h b/gst-libs/gst/video/video.h index d139033..5f9c42c 100644 --- a/gst-libs/gst/video/video.h +++ b/gst-libs/gst/video/video.h @@ -171,8 +171,20 @@ typedef enum #define GST_VIDEO_COMP_A 3 /** + * GstVideoPackFlags: + * @GST_VIDEO_PACK_FLAG_NONE: No flag + * + * The different flags that can be used when packing and unpacking. + */ +typedef enum +{ + GST_VIDEO_PACK_FLAG_NONE = 0 +} GstVideoPackFlags; + +/** * GstVideoFormatUnpack: * @info: a #GstVideoFormatInfo + * @flags: flags to control the unpacking * @dest: a destination array * @data: pointers to the data planes * @stride: strides of the planes @@ -185,13 +197,15 @@ typedef enum * interleaved. @dest should at least be big enough to hold @width * * n_components * size(unpack_format) bytes. */ -typedef void (*GstVideoFormatUnpack) (GstVideoFormatInfo *info, gpointer dest, +typedef void (*GstVideoFormatUnpack) (GstVideoFormatInfo *info, + GstVideoPackFlags flags, gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES], const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width); /** * GstVideoFormatPack: * @info: a #GstVideoFormatInfo + * @flags: flags to control the packing * @src: a source array * @data: pointers to the destination data planes * @stride: strides of the destination planes @@ -203,7 +217,8 @@ typedef void (*GstVideoFormatUnpack) (GstVideoFormatInfo *info, gpointer * format @info. The pixels from source have each component interleaved * and will be packed into the planes in @data. */ -typedef void (*GstVideoFormatPack) (GstVideoFormatInfo *info, const gpointer src, +typedef void (*GstVideoFormatPack) (GstVideoFormatInfo *info, + GstVideoPackFlags flags, const gpointer src, gpointer data[GST_VIDEO_MAX_PLANES], const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width); -- 2.7.4