Implement CVO for iOS capturer

The rotation is currently always applied by AVFoundation by
reconfiguring the capture connection video orientation. This CL sets the
rotation field in the frame instead. This avoids the current flash in
the video when the device is rotated, and also avoids reconfiguring the
local encoder and remote decoder when the device is rotated.

BUG=b/30651939

Review-Url: https://codereview.webrtc.org/2271583003
Cr-Commit-Position: refs/heads/master@{#13916}
diff --git a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
index 37378e7..5ce0462 100644
--- a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
+++ b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
@@ -56,13 +56,16 @@
 
   // Converts the sample buffer into a cricket::CapturedFrame and signals the
   // frame for capture.
-  void CaptureSampleBuffer(CMSampleBufferRef sampleBuffer);
+  void CaptureSampleBuffer(CMSampleBufferRef sample_buffer,
+                           webrtc::VideoRotation rotation);
 
   // Handles messages from posts.
   void OnMessage(rtc::Message *msg) override;
 
  private:
-  void OnFrameMessage(CVImageBufferRef image_buffer, int64_t capture_time_ns);
+  void OnFrameMessage(CVImageBufferRef image_buffer,
+                      webrtc::VideoRotation rotation,
+                      int64_t capture_time_ns);
 
   RTCAVFoundationVideoCapturerInternal *_capturer;
   rtc::Thread *_startThread;  // Set in Start(), unset in Stop().