diff options
author | leonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com> | 2021-02-05 20:59:11 +0200 |
---|---|---|
committer | leonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com> | 2021-02-05 20:59:11 +0200 |
commit | c8977a9bc589002bead9b2e007ae1223e3f05b25 (patch) | |
tree | aa2920989df114853006116ee92901877a975ced /SmartDeviceLink/public/SDLVideoStreamingCapability.m | |
parent | 0f8a7c474299727a8b57577520bf42bc1fdcac26 (diff) | |
parent | c5b58ee9c3491fbb289aeffa8f3abfc39a5254d3 (diff) | |
download | sdl_ios-c8977a9bc589002bead9b2e007ae1223e3f05b25.tar.gz |
[0269] 'New vehicle data climateData': Merge branch 'develop' into this. Resolve many conflicts.
Diffstat (limited to 'SmartDeviceLink/public/SDLVideoStreamingCapability.m')
-rw-r--r-- | SmartDeviceLink/public/SDLVideoStreamingCapability.m | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/SmartDeviceLink/public/SDLVideoStreamingCapability.m b/SmartDeviceLink/public/SDLVideoStreamingCapability.m index ec4f2c591..392b102a9 100644 --- a/SmartDeviceLink/public/SDLVideoStreamingCapability.m +++ b/SmartDeviceLink/public/SDLVideoStreamingCapability.m @@ -17,20 +17,24 @@ NS_ASSUME_NONNULL_BEGIN @implementation SDLVideoStreamingCapability +// deprecated method, and will be removed in the future - (instancetype)initWithPreferredResolution:(nullable SDLImageResolution *)preferredResolution maxBitrate:(int32_t)maxBitrate supportedFormats:(nullable NSArray<SDLVideoStreamingFormat *> *)supportedFormats hapticDataSupported:(BOOL)hapticDataSupported diagonalScreenSize:(float)diagonalScreenSize pixelPerInch:(float)pixelPerInch scale:(float)scale { + return [self initWithPreferredResolution:preferredResolution maxBitrate:@(maxBitrate) supportedFormats:supportedFormats hapticSpatialDataSupported:@(hapticDataSupported) diagonalScreenSize:@(diagonalScreenSize) pixelPerInch:@(pixelPerInch) scale:@(scale) preferredFPS:nil]; +} + +- (instancetype)initWithPreferredResolution:(nullable SDLImageResolution *)preferredResolution maxBitrate:(nullable NSNumber<SDLUInt> *)maxBitrate supportedFormats:(nullable NSArray<SDLVideoStreamingFormat *> *)supportedFormats hapticSpatialDataSupported:(nullable NSNumber<SDLBool> *)hapticSpatialDataSupported diagonalScreenSize:(nullable NSNumber<SDLFloat> *)diagonalScreenSize pixelPerInch:(nullable NSNumber<SDLFloat> *)pixelPerInch scale:(nullable NSNumber<SDLFloat> *)scale preferredFPS:(nullable NSNumber<SDLUInt> *)preferredFPS { self = [self init]; if (!self) { - return self; + return nil; } - - self.maxBitrate = @(maxBitrate); self.preferredResolution = preferredResolution; + self.maxBitrate = maxBitrate; self.supportedFormats = supportedFormats; - self.hapticSpatialDataSupported = @(hapticDataSupported); - self.diagonalScreenSize = @(diagonalScreenSize); - self.pixelPerInch = @(pixelPerInch); - self.scale = @(scale); - + self.hapticSpatialDataSupported = hapticSpatialDataSupported; + self.diagonalScreenSize = diagonalScreenSize; + self.pixelPerInch = pixelPerInch; + self.scale = scale; + self.preferredFPS = preferredFPS; return self; } @@ -90,6 +94,14 @@ NS_ASSUME_NONNULL_BEGIN return [self.store sdl_objectForName:SDLRPCParameterNameScale ofClass:NSNumber.class error:nil]; } +- (void)setPreferredFPS:(nullable NSNumber<SDLUInt> *)preferredFPS { + [self.store sdl_setObject:preferredFPS forName:SDLRPCParameterNamePreferredFPS]; +} + +- (nullable NSNumber<SDLUInt> *)preferredFPS { + return [self.store sdl_objectForName:SDLRPCParameterNamePreferredFPS ofClass:NSNumber.class error:nil]; +} + @end NS_ASSUME_NONNULL_END |