Updating capture module following latest libyuv api changes

Review URL: http://webrtc-codereview.appspot.com/337009

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1338 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mikhal@webrtc.org 2012-01-04 19:23:24 +00:00
parent 7d5ca2be1f
commit a58888d382
2 changed files with 11 additions and 6 deletions

View File

@ -459,7 +459,8 @@ using namespace videocapturemodule;
tempCaptureCapability.width = _frameWidth;
tempCaptureCapability.height = _frameHeight;
tempCaptureCapability.maxFPS = _frameRate;
tempCaptureCapability.rawType = kVideoARGB;
// TODO(wu) : Update actual type and not hard-coded value.
tempCaptureCapability.rawType = kVideoBGRA;
_owner->IncomingFrame((unsigned char*)baseAddress,
frameSize,

View File

@ -294,11 +294,15 @@ WebRtc_Word32 VideoCaptureImpl::IncomingFrame(WebRtc_UWord8* videoFrame,
}
memset(_captureFrame.Buffer(), 0, _captureFrame.Size());
const WebRtc_Word32 conversionResult = ConvertToI420(commonVideoType, videoFrame,
width, height,
_captureFrame.Buffer(),
_requestedCapability.interlaced,
_rotateFrame);
int dstStride = width; // Keeping stride = width for I420 destination.
const int conversionResult = ConvertToI420(commonVideoType,
videoFrame,
0, 0, // No cropping
width, height,
0, // Ignored for non-JPG.
width, height, dstStride,
_rotateFrame,
_captureFrame.Buffer());
if (conversionResult < 0)
{
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,