diff options
author | magjed <magjed@chromium.org> | 2014-09-03 11:46:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-03 18:53:30 +0000 |
commit | ce824a56750b490919571196c610a064f2e17ecb (patch) | |
tree | 503f2c8f5bf26a59ffb9b1c07517496e59a69c73 | |
parent | 828da409d7ffa5a837187eedf77af3f867f5ee31 (diff) | |
download | chromium_src-ce824a56750b490919571196c610a064f2e17ecb.zip chromium_src-ce824a56750b490919571196c610a064f2e17ecb.tar.gz chromium_src-ce824a56750b490919571196c610a064f2e17ecb.tar.bz2 |
Add support for pixel format UYVY in Linux video capture
BUG=410202
TEST=Use Kinect camera on Linux. Go to page https://src.chromium.org/svn/trunk/src/chrome/test/data/webrtc/manual/peerconnection.html. Press button "Get devices". An entry "Microsoft Kinect Camera" should show up in the "Video source" list. Press button "Request GetUserMedia". You should get a stream with size 640x480 in the preview.
Review URL: https://codereview.chromium.org/539443003
Cr-Commit-Position: refs/heads/master@{#293178}
-rw-r--r-- | media/video/capture/linux/video_capture_device_linux.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/video/capture/linux/video_capture_device_linux.cc b/media/video/capture/linux/video_capture_device_linux.cc index 33a91c4..0192daba 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; |