From 3f4174a8c023b7223cbe597b446293a2a8c9ec42 Mon Sep 17 00:00:00 2001 From: fryshorts Date: Mon, 20 Apr 2015 19:58:33 +0200 Subject: [PATCH] linux-v4l2: Add additional video formats Add BGRX and BGRA as supported video formats, since obs can handle them directly. I unfortunately missed those when i initially wrote this mapping due to my webcam not offering those formats. --- plugins/linux-v4l2/v4l2-helpers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/linux-v4l2/v4l2-helpers.h b/plugins/linux-v4l2/v4l2-helpers.h index f0221e665..4e8e0c9b5 100644 --- a/plugins/linux-v4l2/v4l2-helpers.h +++ b/plugins/linux-v4l2/v4l2-helpers.h @@ -63,6 +63,8 @@ static inline enum video_format v4l2_to_obs_video_format(uint_fast32_t format) case V4L2_PIX_FMT_NV12: return VIDEO_FORMAT_NV12; case V4L2_PIX_FMT_YUV420: return VIDEO_FORMAT_I420; case V4L2_PIX_FMT_YVU420: return VIDEO_FORMAT_I420; + case V4L2_PIX_FMT_XBGR32: return VIDEO_FORMAT_BGRX; + case V4L2_PIX_FMT_ABGR32: return VIDEO_FORMAT_BGRA; default: return VIDEO_FORMAT_NONE; } }