summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/public/SDLVideoStreamingCapability.h
blob: c80363c5c02bfa449dd83e4dd39a181e4fa479d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//
//  SDLVideoStreamingCapability.h
//  SmartDeviceLink-iOS
//
//  Created by Brett McIsaac on 7/31/17.
//  Copyright © 2017 smartdevicelink. All rights reserved.
//

#import "SDLRPCMessage.h"

@class SDLImageResolution;
@class SDLVideoStreamingFormat;

NS_ASSUME_NONNULL_BEGIN

/**
 Contains information about this system's video streaming capabilities
 */
@interface SDLVideoStreamingCapability : SDLRPCStruct

/**
 Convenience init for creating a video streaming capability with all parameters.

 @param preferredResolution The preferred resolution of a video stream for decoding and rendering on HMI
 @param maxBitrate The maximum bitrate of video stream that is supported, in kbps
 @param supportedFormats Detailed information on each format supported by this system, in its preferred order
 @param hapticDataSupported True if the system can utilize the haptic spatial data from the source being streamed
 @param diagonalScreenSize The diagonal screen size in inches
 @param pixelPerInch The diagonal resolution in pixels divided by the diagonal screen size in inches
 @param scale The scaling factor the app should use to change the size of the projecting view
 @return A SDLVideoStreamingCapability object
 */
- (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 __deprecated_msg("Use initWithPreferredResolution:maxBitrate:supportedFormats:hapticDataSupported:diagonalScreenSize:pixelPerInch:scale:preferredFPS instead");

/**
 * Convenience init for creating a video streaming capability with all parameters.
 * @param preferredResolution - preferredResolution
 * @param maxBitrate - maxBitrate
 * @param supportedFormats - supportedFormats
 * @param hapticSpatialDataSupported - hapticSpatialDataSupported
 * @param diagonalScreenSize - diagonalScreenSize
 * @param pixelPerInch - pixelPerInch
 * @param scale - scale
 * @param preferredFPS - preferredFPS
 * @return A SDLVideoStreamingCapability object
 */
- (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;

/**
 The preferred resolution of a video stream for decoding and rendering on HMI

 Optional
 */
@property (nullable, strong, nonatomic) SDLImageResolution *preferredResolution;

/**
 The maximum bitrate of video stream that is supported, in kbps, optional

 Optional, minvalue= 0, maxvalue= 2147483647
 */
@property (nullable, strong, nonatomic) NSNumber<SDLInt> *maxBitrate;

/**
 Detailed information on each format supported by this system, in its preferred order

 Optional
 */
@property (nullable, strong, nonatomic) NSArray<SDLVideoStreamingFormat *> *supportedFormats;

/**
 True if the system can utilize the haptic spatial data from the source being streamed.

 Optional
 */
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *hapticSpatialDataSupported;

/**
 The diagonal screen size in inches.

 Float, Optional, minvalue="0"
 @since SDL 6.0
 */
@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *diagonalScreenSize;

/**
 The diagonal resolution in pixels divided by the diagonal screen size in inches.
 
 Float, Optional, minvalue="0"
 @since SDL 6.0
 */
@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *pixelPerInch;

/**
 The scaling factor the app should use to change the size of the projecting view.

 Float, Optional, minvalue="1" maxvalue="10"
 @since SDL 6.0
 */
@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *scale;

/**
 * The preferred frame rate per second of the head unit. The mobile application / app library may take other factors into account that constrain the frame rate lower than this value, but it should not perform streaming at a higher frame rate than this value.
 * {"num_min_value": 0, "num_max_value": 2147483647}
 *
 * @added in SmartDeviceLink 7.1.0
 */
@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *preferredFPS;

@end

NS_ASSUME_NONNULL_END