Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLStreamingMediaManager Class Reference

Section Contents

Overview

Undocumented

touchManager

Touch Manager responsible for providing touch event notifications.

Objective-C

@property (readonly, strong, nonatomic) SDLTouchManager *_Nonnull touchManager;

Swift

var touchManager: SDLTouchManager { get }

audioManager

Audio Manager responsible for managing streaming audio.

Objective-C

@property (readonly, strong, nonatomic)
    SDLAudioStreamManager *_Nonnull audioManager;

Swift

var audioManager: SDLAudioStreamManager { get }

rootViewController

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.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    UIViewController *rootViewController;

Swift

var rootViewController: UIViewController? { get set }

focusableItemManager

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.

Objective-C

@property (readonly, strong, nonatomic, nullable) id<SDLFocusableItemLocatorType>
    focusableItemManager;

streamingSupported

Whether or not video streaming is supported

See

SDLRegisterAppInterface SDLDisplayCapabilities

Objective-C

@property (readonly, getter=isStreamingSupported, assign, nonatomic)
    BOOL streamingSupported;

Swift

var isStreamingSupported: Bool { get }

videoConnected

Whether or not the video session is connected.

Objective-C

@property (readonly, getter=isVideoConnected, assign, nonatomic)
    BOOL videoConnected;

Swift

var isVideoConnected: Bool { get }

videoEncrypted

Whether or not the video session is encrypted. This may be different than the requestedEncryptionType.

Objective-C

@property (readonly, getter=isVideoEncrypted, assign, nonatomic)
    BOOL videoEncrypted;

Swift

var isVideoEncrypted: Bool { get }

audioConnected

Whether or not the audio session is connected.

Objective-C

@property (readonly, getter=isAudioConnected, assign, nonatomic)
    BOOL audioConnected;

Swift

var isAudioConnected: Bool { get }

audioEncrypted

Whether or not the audio session is encrypted. This may be different than the requestedEncryptionType.

Objective-C

@property (readonly, getter=isAudioEncrypted, assign, nonatomic)
    BOOL audioEncrypted;

Swift

var isAudioEncrypted: Bool { get }

videoStreamingPaused

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.

Objective-C

@property (readonly, getter=isVideoStreamingPaused, assign, nonatomic)
    BOOL videoStreamingPaused;

Swift

var isVideoStreamingPaused: Bool { get }

screenSize

This is the current screen size of a connected display. This will be the size the video encoder uses to encode the raw image data.

Objective-C

@property (readonly, assign, nonatomic) CGSize screenSize;

Swift

var screenSize: CGSize { get }

videoFormat

This is the agreed upon format of video encoder that is in use, or nil if not currently connected.

Objective-C

@property (readonly, strong, nonatomic, nullable)
    SDLVideoStreamingFormat *videoFormat;

Swift

var videoFormat: SDLVideoStreamingFormat? { get }

supportedFormats

A list of all supported video formats by this manager

Objective-C

@property (readonly, strong, nonatomic)
    NSArray<SDLVideoStreamingFormat *> *_Nonnull supportedFormats;

Swift

var supportedFormats: [SDLVideoStreamingFormat] { get }

pixelBufferPool

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.

Objective-C

@property (readonly, assign, nonatomic, nullable)
    CVPixelBufferPoolRef pixelBufferPool;

Swift

unowned(unsafe) var pixelBufferPool: CVPixelBufferPool? { get }

requestedEncryptionType

The requested encryption type when a session attempts to connect. This setting applies to both video and audio sessions.

DEFAULT: SDLStreamingEncryptionFlagAuthenticateAndEncrypt

Objective-C

@property (assign, readwrite, nonatomic)
    SDLStreamingEncryptionFlag requestedEncryptionType;

Swift

var requestedEncryptionType: SDLStreamingEncryptionFlag { get set }

-init

Undocumented

Objective-C

- (instancetype)init NS_UNAVAILABLE;

-initWithConnectionManager:configuration:

Create a new streaming media manager for navigation and VPM apps with a specified configuration

Objective-C

- (nonnull instancetype)
initWithConnectionManager:
    (nonnull id<SDLConnectionManagerType>)connectionManager
            configuration:
                (nonnull SDLStreamingMediaConfiguration *)configuration;

Parameters

connectionManager

The pass-through for RPCs

configuration

The configuration of this streaming media session

Return Value

A new streaming manager

-startWithProtocol:

Start the manager with a completion block that will be called when startup completes. This is used internally. To use an SDLStreamingMediaManager, you should use the manager found on SDLManager.

Objective-C

- (void)startWithProtocol:(nonnull SDLProtocol *)protocol;

Swift

func start(with protocol: SDLProtocol)

-startAudioWithProtocol:

Start the audio feature of the manager. This is used internally. To use an SDLStreamingMediaManager, you should use the manager found on SDLManager.

Objective-C

- (void)startAudioWithProtocol:(nonnull SDLProtocol *)protocol;

Swift

func startAudio(with protocol: SDLProtocol)

-startVideoWithProtocol:

Start the video feature of the manager. This is used internally. To use an SDLStreamingMediaManager, you should use the manager found on SDLManager.

Objective-C

- (void)startVideoWithProtocol:(nonnull SDLProtocol *)protocol;

Swift

func startVideo(with protocol: SDLProtocol)

-stop

Stop the manager. This method is used internally.

Objective-C

- (void)stop;

Swift

func stop()

-stopAudio

Stop the audio feature of the manager. This method is used internally.

Objective-C

- (void)stopAudio;

Swift

func stopAudio()

-stopVideo

Stop the video feature of the manager. This method is used internally.

Objective-C

- (void)stopVideo;

Swift

func stopVideo()

-sendVideoData:

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.

Objective-C

- (BOOL)sendVideoData:(nonnull CVImageBufferRef)imageBuffer;

Swift

func sendVideoData(_ imageBuffer: CVImageBuffer) -> Bool

Parameters

imageBuffer

A CVImageBufferRef to be encoded by Video Toolbox

Return Value

Whether or not the data was successfully encoded and sent.

-sendVideoData:presentationTimestamp:

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.

Objective-C

- (BOOL)sendVideoData:(nonnull CVImageBufferRef)imageBuffer
    presentationTimestamp:(CMTime)presentationTimestamp;

Swift

func sendVideoData(_ imageBuffer: CVImageBuffer, presentationTimestamp: CMTime) -> Bool

Parameters

imageBuffer

A CVImageBufferRef to be encoded by Video Toolbox

presentationTimestamp

A presentation timestamp for the frame, or kCMTimeInvalid if timestamp is unknown. If it’s valid, it must be greater than the previous one.

Return Value

Whether or not the data was successfully encoded and sent.

-sendAudioData:

This method receives PCM audio data and will attempt to send that data across to the head unit for immediate playback

Objective-C

- (BOOL)sendAudioData:(nonnull NSData *)audioData;

Swift

func sendAudioData(_ audioData: Data) -> Bool

Parameters

audioData

The data in PCM audio format, to be played

Return Value

Whether or not the data was successfully sent.

View on GitHub.com
Previous Section Next Section