Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Typedefs | Functions
WSB_MediaAdapter Class

A media adapter to adapt content for playback based on caller preference. More...

Typedefs

typedef struct WSB_MediaAdapter WSB_MediaAdapter
 

Functions

WSB_EXPORT WSB_Result WSB_MediaAdapter_Open (const WSB_MediaAdapterConfig *config, WSB_MediaAdapter **adapter)
 Open a Media Adapter based on the configuration. More...
 
WSB_EXPORT WSB_Result WSB_MediaAdapter_Adapt (WSB_MediaAdapter *self, const WSB_MediaAdapterParams *params, WSB_MediaAdapterPlaybackInfo *playback_info)
 Adapt the media source for content playback. More...
 
WSB_EXPORT WSB_Result WSB_MediaAdapter_Close (WSB_MediaAdapter *self)
 Close the Media Adapter. More...
 

Detailed Description

A media adapter to adapt content for playback based on caller preference.

Since
1.21

Typedef Documentation

◆ WSB_MediaAdapter

Function Documentation

◆ WSB_MediaAdapter_Adapt()

WSB_EXPORT WSB_Result WSB_MediaAdapter_Adapt ( WSB_MediaAdapter self,
const WSB_MediaAdapterParams params,
WSB_MediaAdapterPlaybackInfo playback_info 
)

Adapt the media source for content playback.

Upon successfully adaptation, the returned playback information contains all the parameters an application needs to play the content. A Playlist Proxy instance is returned among those parameters depending on the media adaptation.

If a Playlist Proxy is returned, it will be configured and started already to adapting content for playback. Application should use the token URL returned in the playback information to request a native DRM license to playback the adapted content URL. During playback, application can call all the Playlist Proxy methods except WSB_PlaylistProxy_MakeUrl and WSB_PlaylistProxy_Destroy. Media Adapter is responsible for managing the lifetime of Playlist Proxy object. When Media Adapter is closed, the Playlist Proxy is stop and destroyed.

If no Playlist Proxy is returned, application can playback content with native DRM without Playlist Proxy's involvement. Application should use the token URL returned in the playback information to request a native DRM license to playback the adapted content URL.

User should be aware when using Media Adapter with universal token, the IV should be set to 0 for Fairplay DRM when generating universal token in order to be consistent with Media Adapter's Marlin to Fairplay content transcryption.

Parameters
selfPointer to the WSB_MediaAdapter instance.
paramsPointer to the structure that contains the media source, and other relevant resources to perform media adaptation. If the Media Adapter was configured with WSB_MALT_STREAMING_LICENSE, the token_url member of this parameter should contain the value of the http-token field of the univeral token. If the Media Adapter was configured with WSB_MALT_PERSISTENT_LICENSE, the token_url member of this parameter should contain the value of the whole universal token.
playback_infoPointer to the structure where the playback information will be returned.
Returns
WSB_SUCCESS if the call succeeds, or a negative error code if it fails.
Since
1.21

◆ WSB_MediaAdapter_Close()

WSB_EXPORT WSB_Result WSB_MediaAdapter_Close ( WSB_MediaAdapter self)

Close the Media Adapter.

Release all the resources associated with the Media Adapter including the Playlist Proxy instance returned to the caller from WSB_MediaAdapter_Adapt. The Playlist Proxy is stopped before getting destroy.

Parameters
selfPointer to the WSB_MediaAdapter instance.
Returns
WSB_SUCCESS if the call succeeds, or a negative error code if it fails.
Since
1.21

◆ WSB_MediaAdapter_Open()

WSB_EXPORT WSB_Result WSB_MediaAdapter_Open ( const WSB_MediaAdapterConfig config,
WSB_MediaAdapter **  adapter 
)

Open a Media Adapter based on the configuration.

When using Media Adapter with universal token and request streaming license, and Media Adapter determines use of Marlin is required (either from configuration setting or most suitable content protection or necessity of content transformation), Media Adapter will acquire a Marlin MS3 license.

When using Media Adapter with universal token and request persistent license, and Media Adapter determines use of Marlin is required (either from configuration setting or most suitable content protection or necessity of content transformation), Media Adapter will acquire a Marlin Broadband license and save it to the License Store. The saved license can be used later on for playback with Playlist Proxy directly or for playback of downloaded content from Media Download. If there is already a suitable Marlin Broadband license in the License Store, caller should consider using Playlist Proxy directly since Media Adapter doesn't check for existence of Marlin Broadband license and will always aquire a license during adaptation.

Parameters
configPointer to the configuration parameters for the media adapter. If it is NULL, the default configuration is used which gives preference to using native DRM (WSB_MADT_PREFER_NATIVE_DRM) and streaming license (WSB_MALT_STREAMING_LICENSE).
adapterAddress of a WSB_MediaAdapter pointer that will be set to refer to the newly created WSB_MediaAdapter object.
Returns
WSB_SUCCESS if the call succeeds, or a negative error code if it fails.
Since
1.21