| 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 5708346ae2bccdee06da02c5eea8d2a13d37d453..3550a8ab203ab7c4a0f3b91bea8855b61d2f3bd2 100644
|
| --- a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
|
| +++ b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm
|
| @@ -78,7 +78,7 @@ static NSString *GetSessionPresetForVideoFormat(
|
| @property(nonatomic, readonly) dispatch_queue_t frameQueue;
|
| @property(nonatomic, readonly) BOOL canUseBackCamera;
|
| @property(nonatomic, assign) BOOL useBackCamera; // Defaults to NO.
|
| -@property(nonatomic, assign) BOOL isRunning; // Whether the capture session is running.
|
| +@property(atomic, assign) BOOL isRunning; // Whether the capture session is running.
|
| @property(atomic, assign) BOOL hasStarted; // Whether we have an unmatched start.
|
|
|
| // We keep a pointer back to AVFoundationVideoCapturer to make callbacks on it
|
| @@ -103,7 +103,6 @@ static NSString *GetSessionPresetForVideoFormat(
|
| webrtc::AVFoundationVideoCapturer *_capturer;
|
| webrtc::VideoRotation _rotation;
|
| BOOL _hasRetriedOnFatalError;
|
| - BOOL _isRunning;
|
| BOOL _hasStarted;
|
| rtc::CriticalSection _crit;
|
| }
|
| @@ -217,16 +216,6 @@ static NSString *GetSessionPresetForVideoFormat(
|
| }
|
| }
|
|
|
| -- (BOOL)isRunning {
|
| - rtc::CritScope cs(&_crit);
|
| - return _isRunning;
|
| -}
|
| -
|
| -- (void)setIsRunning:(BOOL)isRunning {
|
| - rtc::CritScope cs(&_crit);
|
| - _isRunning = isRunning;
|
| -}
|
| -
|
| // Called from WebRTC thread.
|
| - (void)start {
|
| if (self.hasStarted) {
|
| @@ -354,6 +343,7 @@ static NSString *GetSessionPresetForVideoFormat(
|
|
|
| - (void)handleCaptureSessionDidStartRunning:(NSNotification *)notification {
|
| RTCLog(@"Capture session started.");
|
| +
|
| self.isRunning = YES;
|
| [RTCDispatcher dispatchAsyncOnType:RTCDispatcherTypeCaptureSession
|
| block:^{
|
|
|