forked from mirrors/gecko-dev
Bug 1817724 - [libwebrtc] Restore changes to RTCCameraVideoCapturer.m. r=webrtc-reviewers,ng
Differential Revision: https://phabricator.services.mozilla.com/D171961
This commit is contained in:
parent
a4c00309de
commit
dd4f9a828f
1 changed files with 1 additions and 7 deletions
|
|
@ -186,7 +186,6 @@ const int64_t kNanosecondsPerSecond = 1000000000;
|
|||
[self updateOrientation];
|
||||
[self updateDeviceCaptureFormat:format fps:fps];
|
||||
[self updateVideoDataOutputPixelFormat:format];
|
||||
[_videoDataOutput setSampleBufferDelegate:self queue:self.frameQueue];
|
||||
[self.captureSession startRunning];
|
||||
[self.currentDevice unlockForConfiguration];
|
||||
self.isRunning = YES;
|
||||
|
|
@ -206,7 +205,6 @@ const int64_t kNanosecondsPerSecond = 1000000000;
|
|||
for (AVCaptureDeviceInput *oldInput in [self.captureSession.inputs copy]) {
|
||||
[self.captureSession removeInput:oldInput];
|
||||
}
|
||||
[_videoDataOutput setSampleBufferDelegate:nil queue:nil];
|
||||
[self.captureSession stopRunning];
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
|
@ -217,11 +215,6 @@ const int64_t kNanosecondsPerSecond = 1000000000;
|
|||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
// Wait for any pending captureOutput tasks.
|
||||
dispatch_sync(self.frameQueue, ^{
|
||||
});
|
||||
|
||||
self.isRunning = NO;
|
||||
if (completionHandler) {
|
||||
completionHandler();
|
||||
|
|
@ -471,6 +464,7 @@ const int64_t kNanosecondsPerSecond = 1000000000;
|
|||
_outputPixelFormat = _preferredOutputPixelFormat;
|
||||
videoDataOutput.videoSettings = @{(NSString *)kCVPixelBufferPixelFormatTypeKey : pixelFormat};
|
||||
videoDataOutput.alwaysDiscardsLateVideoFrames = NO;
|
||||
[videoDataOutput setSampleBufferDelegate:self queue:self.frameQueue];
|
||||
_videoDataOutput = videoDataOutput;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue