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

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m

Issue 2811643006: Reconfigure capture session in a single transaction. (Closed)
Patch Set: Reconfigure capture session in a single transaction. Created 3 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m b/webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m
index 6545b2f0d9f2c0b7ba836a58c71b55e316dfebc2..16ddc13c9eaba1f5aaf42176a66c5444a4740e3e 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m
+++ b/webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m
@@ -378,6 +378,7 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
RTCLogError(@"Failed to create front camera input: %@", error.localizedDescription);
return;
}
+ [_captureSession beginConfiguration];
for (AVCaptureDeviceInput *oldInput in [_captureSession.inputs copy]) {
[_captureSession removeInput:oldInput];
}
@@ -385,8 +386,8 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
[_captureSession addInput:input];
} else {
RTCLogError(@"Cannot add camera as an input to the session.");
- return;
}
+ [_captureSession commitConfiguration];
}
- (void)updateOrientation {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698