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:
parent
7d5ca2be1f
commit
a58888d382
@ -459,7 +459,8 @@ using namespace videocapturemodule;
|
|||||||
tempCaptureCapability.width = _frameWidth;
|
tempCaptureCapability.width = _frameWidth;
|
||||||
tempCaptureCapability.height = _frameHeight;
|
tempCaptureCapability.height = _frameHeight;
|
||||||
tempCaptureCapability.maxFPS = _frameRate;
|
tempCaptureCapability.maxFPS = _frameRate;
|
||||||
tempCaptureCapability.rawType = kVideoARGB;
|
// TODO(wu) : Update actual type and not hard-coded value.
|
||||||
|
tempCaptureCapability.rawType = kVideoBGRA;
|
||||||
|
|
||||||
_owner->IncomingFrame((unsigned char*)baseAddress,
|
_owner->IncomingFrame((unsigned char*)baseAddress,
|
||||||
frameSize,
|
frameSize,
|
||||||
|
@ -294,11 +294,15 @@ WebRtc_Word32 VideoCaptureImpl::IncomingFrame(WebRtc_UWord8* videoFrame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(_captureFrame.Buffer(), 0, _captureFrame.Size());
|
memset(_captureFrame.Buffer(), 0, _captureFrame.Size());
|
||||||
const WebRtc_Word32 conversionResult = ConvertToI420(commonVideoType, videoFrame,
|
int dstStride = width; // Keeping stride = width for I420 destination.
|
||||||
width, height,
|
const int conversionResult = ConvertToI420(commonVideoType,
|
||||||
_captureFrame.Buffer(),
|
videoFrame,
|
||||||
_requestedCapability.interlaced,
|
0, 0, // No cropping
|
||||||
_rotateFrame);
|
width, height,
|
||||||
|
0, // Ignored for non-JPG.
|
||||||
|
width, height, dstStride,
|
||||||
|
_rotateFrame,
|
||||||
|
_captureFrame.Buffer());
|
||||||
if (conversionResult < 0)
|
if (conversionResult < 0)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
|
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user