summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/public/SDLVideoStreamingCapability.m
diff options
context:
space:
mode:
authorleonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com>2021-02-05 20:59:11 +0200
committerleonid lokhmatov, Luxoft <zaqqqqqqqq@gmail.com>2021-02-05 20:59:11 +0200
commitc8977a9bc589002bead9b2e007ae1223e3f05b25 (patch)
treeaa2920989df114853006116ee92901877a975ced /SmartDeviceLink/public/SDLVideoStreamingCapability.m
parent0f8a7c474299727a8b57577520bf42bc1fdcac26 (diff)
parentc5b58ee9c3491fbb289aeffa8f3abfc39a5254d3 (diff)
downloadsdl_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.m28
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