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

SDLStreamingMediaManagerDataSource Protocol Reference

Section Contents

Overview

Undocumented

-preferredVideoFormatOrderFromHeadUnitPreferredOrder:

Implement to return a different preferred order of attempted format usage than the head unit’s preferred order. In nearly all cases, it’s best to simply return the head unit’s preferred order, or not implement this method (which does the same thing).

Warning

If you return a format that is not supported by the StreamingMediaManager, that format will be skipped.

Note

If the head unit does not support the GetSystemCapabilities RPC, this method will not be called and H264 RAW will be used.

Objective-C

- (nonnull NSArray<SDLVideoStreamingFormat *> *)
preferredVideoFormatOrderFromHeadUnitPreferredOrder:
    (nonnull NSArray<SDLVideoStreamingFormat *> *)headUnitPreferredOrder;

Swift

func preferredVideoFormatOrder(fromHeadUnitPreferredOrder headUnitPreferredOrder: [SDLVideoStreamingFormat]) -> [SDLVideoStreamingFormat]

Parameters

headUnitPreferredOrder

The head unit’s preferred order of format usage. The first item is the one that will be used unless this proxy does not support it, then the next item, etc.

Return Value

Your preferred order of format usage.

-resolutionFromHeadUnitPreferredResolution:

Implement to return a different resolution to use for video streaming than the head unit’s requested resolution. If you return a resolution that the head unit does not like, the manager will fail to start up. In nearly all cases, it’s best to simply return the head unit’s preferred order, or not implement this method (which does the same thing), and adapt your UI to the head unit’s preferred resolution instead.

Objective-C

- (nonnull NSArray<SDLImageResolution *> *)
resolutionFromHeadUnitPreferredResolution:
    (nonnull SDLImageResolution *)headUnitPreferredResolution;

Swift

func resolution(fromHeadUnitPreferredResolution headUnitPreferredResolution: SDLImageResolution) -> [SDLImageResolution]

Parameters

headUnitPreferredResolution

The resolution the head unit requested to use.

Return Value

Your preferred order of image resolution usage. This system will not attempt more than 3 resolutions. It is strongly recommended that at least one resolution is the head unit’s preferred resolution.

View on GitHub.com
Previous Section Next Section