# HG changeset patch # User Andreas Pehrson # Date 1520006279 -3600 # Fri Mar 02 16:57:59 2018 +0100 # Node ID 844dff31a28622a1e3416bbc5332ba2ca37a64f1 # Parent 4b3733f7e7f2fceb763f590845b2dcb26e0687cc Bug 1441145 - Hack the frame rotation through to CamerasParent and CamerasChild. r=jib MozReview-Commit-ID: 1UL1Ixkzl86 diff --git a/media/webrtc/trunk/webrtc/modules/video_capture/video_capture_impl.cc b/media/webrtc/trunk/webrtc/modules/video_capture/video_capture_impl.cc --- 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; }