Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm

Issue 2528493004: Add method on AVFoundation capturer to adapt output format. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
index 57425665f98a559ac1dfee62a4f0400d4c6d650c..28ae3f2bd4102ac119778141a1cca2a0ed660052 100644
--- a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
+++ b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
@@ -113,6 +113,11 @@ bool AVFoundationVideoCapturer::GetUseBackCamera() const {
return _capturer.useBackCamera;
}
+void AVFoundationVideoCapturer::AdaptOutputFormat(int width, int height, int fps) {
magjed_webrtc 2016/11/23 13:53:40 nit: Too long lines.
kthelgason 2016/11/23 14:01:48 Don't we have 100 char limits in objc files?
magjed_webrtc 2016/11/24 13:04:31 Yeah, maybe, but the rest of this file is indented
tkchin_webrtc 2016/11/30 22:08:52 100char change came after the file was written. 10
kthelgason 2016/12/01 09:16:59 Acknowledged.
+ cricket::VideoFormat format(width, height, cricket::VideoFormat::FpsToInterval(fps), 0);
+ video_adapter()->OnOutputFormatRequest(format);
+}
+
void AVFoundationVideoCapturer::CaptureSampleBuffer(
CMSampleBufferRef sample_buffer, VideoRotation rotation) {
if (CMSampleBufferGetNumSamples(sample_buffer) != 1 ||

Powered by Google App Engine
This is Rietveld 408576698