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:
sakal 2017-05-05 00:45:30 -07:00 committed by Commit bot
parent 5825288a98
commit ea12f4c5e8
3 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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 {

View File

@ -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;