Make fps NSInteger in startCaptureWithDevice.
This is better in line with Obj-C design guidelines. BUG=None Review-Url: https://codereview.webrtc.org/2862493003 Cr-Commit-Position: refs/heads/master@{#18023}
This commit is contained in:
parent
5825288a98
commit
ea12f4c5e8
@ -34,7 +34,7 @@
|
||||
_usingFrontCamera ? AVCaptureDevicePositionFront : AVCaptureDevicePositionBack;
|
||||
AVCaptureDevice *device = [self findDeviceForPosition:position];
|
||||
AVCaptureDeviceFormat *format = [self selectFormatForDevice:device];
|
||||
int fps = [self selectFpsForFormat:format];
|
||||
NSInteger fps = [self selectFpsForFormat:format];
|
||||
|
||||
[_capturer startCaptureWithDevice:device format:format fps:fps];
|
||||
}
|
||||
@ -81,7 +81,7 @@
|
||||
return selectedFormat;
|
||||
}
|
||||
|
||||
- (int)selectFpsForFormat:(AVCaptureDeviceFormat *)format {
|
||||
- (NSInteger)selectFpsForFormat:(AVCaptureDeviceFormat *)format {
|
||||
Float64 maxFramerate = 0;
|
||||
for (AVFrameRateRange *fpsRange in format.videoSupportedFrameRateRanges) {
|
||||
maxFramerate = fmax(maxFramerate, fpsRange.maxFrameRate);
|
||||
|
||||
@ -115,12 +115,12 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
|
||||
|
||||
- (void)startCaptureWithDevice:(AVCaptureDevice *)device
|
||||
format:(AVCaptureDeviceFormat *)format
|
||||
fps:(int)fps {
|
||||
fps:(NSInteger)fps {
|
||||
_willBeRunning = true;
|
||||
[RTCDispatcher
|
||||
dispatchAsyncOnType:RTCDispatcherTypeCaptureSession
|
||||
block:^{
|
||||
RTCLogInfo("startCaptureWithDevice %@ @ %d fps", format, fps);
|
||||
RTCLogInfo("startCaptureWithDevice %@ @ %zd fps", format, fps);
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
|
||||
@ -360,7 +360,7 @@ static inline BOOL IsMediaSubTypeSupported(FourCharCode mediaSubType) {
|
||||
|
||||
#pragma mark - Private, called inside capture queue
|
||||
|
||||
- (void)updateDeviceCaptureFormat:(AVCaptureDeviceFormat *)format fps:(int)fps {
|
||||
- (void)updateDeviceCaptureFormat:(AVCaptureDeviceFormat *)format fps:(NSInteger)fps {
|
||||
NSAssert([RTCDispatcher isOnQueueForType:RTCDispatcherTypeCaptureSession],
|
||||
@"updateDeviceCaptureFormat must be called on the capture queue.");
|
||||
@try {
|
||||
|
||||
@ -31,7 +31,7 @@ RTC_EXPORT
|
||||
// Starts and stops the capture session asynchronously.
|
||||
- (void)startCaptureWithDevice:(AVCaptureDevice *)device
|
||||
format:(AVCaptureDeviceFormat *)format
|
||||
fps:(int)fps;
|
||||
fps:(NSInteger)fps;
|
||||
// Stops the capture session asynchronously.
|
||||
- (void)stopCapture;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user