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

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

Issue 2800853006: Address tkchin's comments on RTCCameraVideoCapturer. (Closed)
Patch Set: Address comments. 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 | webrtc/sdk/objc/Framework/Classes/RTCDispatcher.m » ('j') | 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..35f15d2ec2d6369e1acca009dae7244636b89451 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m
+++ b/webrtc/sdk/objc/Framework/Classes/RTCCameraVideoCapturer.m
@@ -361,6 +361,8 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
#pragma mark - Private, called inside capture queue
- (void)updateDeviceCaptureFormat:(AVCaptureDeviceFormat *)format fps:(int)fps {
+ NSAssert([RTCDispatcher isOnQueueForType:RTCDispatcherTypeCaptureSession],
+ @"updateDeviceCaptureFormat must be called on the capture queue.");
@try {
_currentDevice.activeFormat = format;
_currentDevice.activeVideoMinFrameDuration = CMTimeMake(1, fps);
@@ -371,6 +373,8 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
}
- (void)reconfigureCaptureSessionInput {
+ NSAssert([RTCDispatcher isOnQueueForType:RTCDispatcherTypeCaptureSession],
+ @"reconfigureCaptureSessionInput must be called on the capture queue.");
NSError *error = nil;
AVCaptureDeviceInput *input =
[AVCaptureDeviceInput deviceInputWithDevice:_currentDevice error:&error];
@@ -390,6 +394,8 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
}
- (void)updateOrientation {
+ NSAssert([RTCDispatcher isOnQueueForType:RTCDispatcherTypeCaptureSession],
+ @"updateOrientation must be called on the capture queue.");
#if TARGET_OS_IPHONE
BOOL usingFrontCamera = _currentDevice.position == AVCaptureDevicePositionFront;
switch ([UIDevice currentDevice].orientation) {
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Classes/RTCDispatcher.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698