Enable mjpg capture for Linux.

BUG=306
TEST=ViE Loopback test using resolution larger than 640x480.

Review URL: https://webrtc-codereview.appspot.com/411001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1768 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org
2012-02-27 08:10:17 +00:00
parent c29280d767
commit f3811194a5
2 changed files with 1 additions and 8 deletions

View File

@ -27,8 +27,6 @@
#include "critical_section_wrapper.h"
#include "video_capture_linux.h"
// #define WEBRTC_MJPEG
namespace webrtc
{
namespace videocapturemodule
@ -153,10 +151,6 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
}
// Supported video formats in preferred order.
#ifndef WEBRTC_MJPEG
const int nFormats = 2;
unsigned int fmts[nFormats] = { V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_YUYV };
#else
// If the requested resolution is larger than VGA, we prefer MJPEG. Go for
// I420 otherwise.
const int nFormats = 3;
@ -170,7 +164,6 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
fmts[1] = V4L2_PIX_FMT_YUYV;
fmts[2] = V4L2_PIX_FMT_MJPEG;
}
#endif
struct v4l2_format video_fmt;
memset(&video_fmt, 0, sizeof(struct v4l2_format));

View File

@ -295,7 +295,7 @@ WebRtc_Word32 VideoCaptureImpl::IncomingFrame(
videoFrame,
0, 0, // No cropping
width, height,
0, // Ignored for non-JPG.
videoFrameLength,
width, height, dstStride,
_rotateFrame,
_captureFrame.Buffer());