Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: media/video/capture/linux/video_capture_device_linux.cc

Issue 539443003: Add support for pixel format UYVY in Linux video capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/capture/linux/video_capture_device_linux.cc
diff --git a/media/video/capture/linux/video_capture_device_linux.cc b/media/video/capture/linux/video_capture_device_linux.cc
index c15f2f1cfec0ccca914b2271823f291ac05db9f5..9c3cfe5c6f5194adb3014038521126e27df0d21a 100644
--- a/media/video/capture/linux/video_capture_device_linux.cc
+++ b/media/video/capture/linux/video_capture_device_linux.cc
@@ -43,7 +43,8 @@ enum { kTypicalFramerate = 30 };
// V4L2 color formats VideoCaptureDeviceLinux support.
static const int32 kV4l2RawFmts[] = {
V4L2_PIX_FMT_YUV420,
- V4L2_PIX_FMT_YUYV
+ V4L2_PIX_FMT_YUYV,
+ V4L2_PIX_FMT_UYVY
};
// USB VID and PID are both 4 bytes long.
@@ -82,6 +83,9 @@ VideoPixelFormat VideoCaptureDeviceLinux::V4l2ColorToVideoCaptureColorFormat(
case V4L2_PIX_FMT_YUYV:
result = PIXEL_FORMAT_YUY2;
break;
+ case V4L2_PIX_FMT_UYVY:
+ result = PIXEL_FORMAT_UYVY;
+ break;
case V4L2_PIX_FMT_MJPEG:
case V4L2_PIX_FMT_JPEG:
result = PIXEL_FORMAT_MJPEG;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698