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:
@ -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));
|
||||
|
@ -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());
|
||||
|
Reference in New Issue
Block a user