Bug 1441145 - Hack the frame rotation through to CamerasParent and CamerasChild. r?jib
MozReview-Commit-ID: 1UL1Ixkzl86
--- a/media/webrtc/trunk/webrtc/modules/video_capture/video_capture_impl.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/video_capture_impl.cc
@@ -202,16 +202,23 @@ int32_t VideoCaptureImpl::IncomingFrame(
return -1;
}
VideoFrame captureFrame(
buffer, 0, rtc::TimeMillis(),
!apply_rotation ? _rotateFrame : kVideoRotation_0);
captureFrame.set_ntp_time_ms(captureTime);
+ // This is one ugly hack to let CamerasParent know what rotation
+ // the frame was captured at. Note that this goes against the intended
+ // meaning of rotation of the frame (how to rotate it before rendering).
+ // We do this so CamerasChild can scale to the proper dimensions
+ // later on in the pipe.
+ captureFrame.set_rotation(_rotateFrame);
+
DeliverCapturedFrame(captureFrame);
}
else // Encoded format
{
assert(false);
return -1;
}