This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: (c)v4l-helpers.h: support the new xfer_func field. Author: Hans Verkuil <[email protected]> Date: Sat Jun 6 10:44:46 2015 +0200 Add helper functions to get/set the new xfer_func field. Signed-off-by: Hans Verkuil <[email protected]> utils/v4l2-compliance/cv4l-helpers.h | 2 ++ utils/v4l2-compliance/v4l-helpers.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=a6b7431f3676793b98e5584fad7fb5811c924ffc diff --git a/utils/v4l2-compliance/cv4l-helpers.h b/utils/v4l2-compliance/cv4l-helpers.h index 06c72d9..2fee6d7 100644 --- a/utils/v4l2-compliance/cv4l-helpers.h +++ b/utils/v4l2-compliance/cv4l-helpers.h @@ -665,6 +665,8 @@ public: void s_pixelformat(__u32 pixelformat) { v4l_format_s_pixelformat(this, pixelformat); } unsigned g_colorspace() const { return v4l_format_g_colorspace(this); } void s_colorspace(unsigned colorspace) { v4l_format_s_colorspace(this, colorspace); } + unsigned g_xfer_func() const { return v4l_format_g_xfer_func(this); } + void s_xfer_func(unsigned xfer_func) { v4l_format_s_xfer_func(this, xfer_func); } unsigned g_ycbcr_enc() const { return v4l_format_g_ycbcr_enc(this); } void s_ycbcr_enc(unsigned ycbcr_enc) { v4l_format_s_ycbcr_enc(this, ycbcr_enc); } unsigned g_quantization() const { return v4l_format_g_quantization(this); } diff --git a/utils/v4l2-compliance/v4l-helpers.h b/utils/v4l2-compliance/v4l-helpers.h index a36ca14..44395c0 100644 --- a/utils/v4l2-compliance/v4l-helpers.h +++ b/utils/v4l2-compliance/v4l-helpers.h @@ -649,6 +649,36 @@ v4l_format_g_colorspace(const struct v4l2_format *fmt) } } +static inline void v4l_format_s_xfer_func(struct v4l2_format *fmt, + unsigned xfer_func) +{ + switch (fmt->type) { + case V4L2_BUF_TYPE_VIDEO_CAPTURE: + case V4L2_BUF_TYPE_VIDEO_OUTPUT: + fmt->fmt.pix.xfer_func = xfer_func; + break; + case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: + case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: + fmt->fmt.pix_mp.xfer_func = xfer_func; + break; + } +} + +static inline unsigned +v4l_format_g_xfer_func(const struct v4l2_format *fmt) +{ + switch (fmt->type) { + case V4L2_BUF_TYPE_VIDEO_CAPTURE: + case V4L2_BUF_TYPE_VIDEO_OUTPUT: + return fmt->fmt.pix.xfer_func; + case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE: + case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE: + return fmt->fmt.pix_mp.xfer_func; + default: + return 0; + } +} + static inline void v4l_format_s_ycbcr_enc(struct v4l2_format *fmt, unsigned ycbcr_enc) { _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
