Manager to help control streaming (video and audio) media services.
Touch Manager responsible for providing touch event notifications.
@property (nonatomic, strong, readonly) SDLTouchManager *_Nonnull touchManager;
var touchManager: SDLTouchManager { get }
Audio Manager responsible for managing streaming audio.
@property (nonatomic, strong, readonly) SDLAudioStreamManager *_Nonnull audioManager;
var audioManager: SDLAudioStreamManager { get }
This property is used for SDLCarWindow, the ability to stream any view controller. To start, you must set an initial view controller on SDLStreamingMediaConfiguration
rootViewController
. After streaming begins, you can replace that view controller with a new root by placing the new view controller into this property.
@property (nonatomic, strong, nullable) UIViewController *rootViewController;
var rootViewController: UIViewController? { get set }
A haptic interface that can be updated to reparse views within the window you’ve provided. Send a SDLDidUpdateProjectionView
notification or call the updateInterfaceLayout
method to reparse. The “output” of this haptic interface occurs in the touchManager
property where it will call the delegate.
@property (nonatomic, strong, readonly, nullable) id<SDLFocusableItemLocatorType> focusableItemManager;
Whether or not video streaming is supported
See
SDLRegisterAppInterface SDLDisplayCapabilities@property (nonatomic, assign, unsafe_unretained, readonly,
getter=isStreamingSupported) BOOL streamingSupported;
var isStreamingSupported: Bool { get }
Whether or not the video session is connected.
@property (nonatomic, assign, unsafe_unretained, readonly,
getter=isVideoConnected) BOOL videoConnected;
var isVideoConnected: Bool { get }
Whether or not the video session is encrypted. This may be different than the requestedEncryptionType.
@property (nonatomic, assign, unsafe_unretained, readonly,
getter=isVideoEncrypted) BOOL videoEncrypted;
var isVideoEncrypted: Bool { get }
Whether or not the audio session is connected.
@property (nonatomic, assign, unsafe_unretained, readonly,
getter=isAudioConnected) BOOL audioConnected;
var isAudioConnected: Bool { get }
Whether or not the audio session is encrypted. This may be different than the requestedEncryptionType.
@property (nonatomic, assign, unsafe_unretained, readonly,
getter=isAudioEncrypted) BOOL audioEncrypted;
var isAudioEncrypted: Bool { get }
Whether or not the video stream is paused due to either the application being backgrounded, the HMI state being either NONE or BACKGROUND, or the video stream not being ready.
@property (nonatomic, assign, unsafe_unretained, readonly,
getter=isVideoStreamingPaused) BOOL videoStreamingPaused;
var isVideoStreamingPaused: Bool { get }
The current screen resolution of the connected display in pixels.
@property (nonatomic, readonly) CGSize screenSize;
var screenSize: CGSize { get }
This is the agreed upon format of video encoder that is in use, or nil if not currently connected.
@property (nonatomic, strong, readonly, nullable) SDLVideoStreamingFormat *videoFormat;
var videoFormat: SDLVideoStreamingFormat? { get }
A list of all supported video formats by this manager
@property (nonatomic, strong, readonly) NSArray<SDLVideoStreamingFormat *> *_Nonnull supportedFormats;
var supportedFormats: [SDLVideoStreamingFormat] { get }
The pixel buffer pool reference returned back from an active VTCompressionSessionRef encoder.
Warning
This will only return a valid pixel buffer pool after the encoder has been initialized (when the video session has started). @discussion Clients may call this once and retain the resulting pool, this call is cheap enough that it’s OK to call it once per frame.@property (nonatomic, readonly, nullable) CVPixelBufferPoolRef pixelBufferPool;
unowned(unsafe) var pixelBufferPool: CVPixelBufferPool? { get }
The requested encryption type when a session attempts to connect. This setting applies to both video and audio sessions.
DEFAULT: SDLStreamingEncryptionFlagAuthenticateAndEncrypt
@property (nonatomic) SDLStreamingEncryptionFlag requestedEncryptionType;
var requestedEncryptionType: SDLStreamingEncryptionFlag { get set }
When YES, the StreamingMediaManager will send a black screen with “Video Backgrounded String”. Defaults to YES.
@property (nonatomic) BOOL showVideoBackgroundDisplay;
var showVideoBackgroundDisplay: Bool { get set }
Initializer unavailable
- (nonnull instancetype)init;
Create a new streaming media manager for navigation and projection apps with a specified configuration.
- (nonnull instancetype)
initWithConnectionManager:
(nonnull id<SDLConnectionManagerType>)connectionManager
configuration:(nonnull SDLConfiguration *)configuration
systemCapabilityManager:
(nullable SDLSystemCapabilityManager *)systemCapabilityManager;
The pass-through for RPCs
This session’s configuration
The system capability manager object for reading window capabilities
Start the manager. This is used internally. To use an SDLStreamingMediaManager, you should use the manager found on SDLManager
.
- (void)startWithProtocol:(nonnull SDLProtocol *)protocol;
func start(with protocol: SDLProtocol)
Stop the manager. This method is used internally.
- (void)stop;
func stop()
Stop the audio feature of the manager. This method is used internally.
- (void)stopAudio;
func stopAudio()
Stop the video feature of the manager. This method is used internally.
- (void)stopVideo;
func stopVideo()
This method receives raw image data and will run iOS8+‘s hardware video encoder to turn the data into a video stream, which will then be passed to the connected head unit.
- (BOOL)sendVideoData:(nonnull CVImageBufferRef)imageBuffer;
func sendVideoData(_ imageBuffer: CVImageBuffer) -> Bool
A CVImageBufferRef to be encoded by Video Toolbox
Whether or not the data was successfully encoded and sent.
This method receives raw image data and will run iOS8+‘s hardware video encoder to turn the data into a video stream, which will then be passed to the connected head unit.
- (BOOL)sendVideoData:(nonnull CVImageBufferRef)imageBuffer
presentationTimestamp:(CMTime)presentationTimestamp;
func sendVideoData(_ imageBuffer: CVImageBuffer, presentationTimestamp: CMTime) -> Bool
A CVImageBufferRef to be encoded by Video Toolbox
A presentation timestamp for the frame, or kCMTimeInvalid if timestamp is unknown. If it’s valid, it must be greater than the previous one.
Whether or not the data was successfully encoded and sent.
This method receives PCM audio data and will attempt to send that data across to the head unit for immediate playback.
NOTE: See the .audioManager
(SDLAudioStreamManager) pushWithData:
method for a more modern API.
- (BOOL)sendAudioData:(nonnull NSData *)audioData;
func sendAudioData(_ audioData: Data) -> Bool
The data in PCM audio format, to be played
Whether or not the data was successfully sent.