Bugfix:setting capture framerate always defaults to 30fps.
Bug: webrtc:7777 Change-Id: Ia8db06eea29d271fe8a74db203b68cabd4fa5939 Reviewed-on: https://chromium-review.googlesource.com/539641 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Daniela Jovanoska Petrenko <denicija@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18673}
This commit is contained in:
@ -129,18 +129,16 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
|
|||||||
_currentDevice = device;
|
_currentDevice = device;
|
||||||
|
|
||||||
NSError *error = nil;
|
NSError *error = nil;
|
||||||
if ([_currentDevice lockForConfiguration:&error]) {
|
if (![_currentDevice lockForConfiguration:&error]) {
|
||||||
[self updateDeviceCaptureFormat:format fps:fps];
|
RTCLogError(
|
||||||
} else {
|
@"Failed to lock device %@. Error: %@", _currentDevice, error.userInfo);
|
||||||
RTCLogError(@"Failed to lock device %@. Error: %@", _currentDevice,
|
|
||||||
error.userInfo);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[self reconfigureCaptureSessionInput];
|
[self reconfigureCaptureSessionInput];
|
||||||
[self updateOrientation];
|
[self updateOrientation];
|
||||||
[_captureSession startRunning];
|
[_captureSession startRunning];
|
||||||
|
[self updateDeviceCaptureFormat:format fps:fps];
|
||||||
[_currentDevice unlockForConfiguration];
|
[_currentDevice unlockForConfiguration];
|
||||||
_isRunning = true;
|
_isRunning = true;
|
||||||
}];
|
}];
|
||||||
@ -366,6 +364,7 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
|
|||||||
@try {
|
@try {
|
||||||
_currentDevice.activeFormat = format;
|
_currentDevice.activeFormat = format;
|
||||||
_currentDevice.activeVideoMinFrameDuration = CMTimeMake(1, fps);
|
_currentDevice.activeVideoMinFrameDuration = CMTimeMake(1, fps);
|
||||||
|
_currentDevice.activeVideoMaxFrameDuration = CMTimeMake(1, fps);
|
||||||
} @catch (NSException *exception) {
|
} @catch (NSException *exception) {
|
||||||
RTCLogError(@"Failed to set active format!\n User info:%@", exception.userInfo);
|
RTCLogError(@"Failed to set active format!\n User info:%@", exception.userInfo);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user