Merge pull request #418 from fryshorts/v4l2-rgb-formats

linux-v4l2: Fix compile error for missing formats
master
Jim 2015-04-20 12:05:50 -07:00
commit 4af2353b8d
1 changed files with 4 additions and 0 deletions

View File

@ -63,8 +63,12 @@ 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;
#ifdef V4L2_PIX_FMT_XBGR32
case V4L2_PIX_FMT_XBGR32: return VIDEO_FORMAT_BGRX;
#endif
#ifdef V4L2_PIX_FMT_ABGR32
case V4L2_PIX_FMT_ABGR32: return VIDEO_FORMAT_BGRA;
#endif
default: return VIDEO_FORMAT_NONE;
}
}