Wasabi ExpressPlay SDK for Desktop Systems  1.23.0
Macros | Functions
WSB_Player Class

A high level Marlin media playback module. More...

Macros

#define WSB_PROPERTY_NAME_PLAYER_EXTRA_CONTENT_ACCESS_HTTP_HEADERS   "Wasabi.Player.ExtraContentAccessHttpHeaders"
 Wasabi Player property. More...
 

Functions

WSB_EXPORT WSB_Result WSB_Player_Create (WSB_Player_EventListener listener, WSB_Player_MsgThreadModel msg_model, WSB_Player **playback)
 Creates an instance of a WSB_Player object, and registers the passed-in listener to be notified of player events. More...
 
WSB_EXPORT WSB_Result WSB_Player_PumpMessage (WSB_Player *playback, WSB_Int32 timeout)
 Asks the WSB_Player instance to send a message in its queue to the listener registered in the call to WSB_Player_Create. More...
 
WSB_EXPORT WSB_Result WSB_Player_SetInput (WSB_Player *playback, const char *name, const char *mime_type)
 Opens a named media file. More...
 
WSB_EXPORT WSB_Result WSB_Player_SetInputEx (WSB_Player *playback, const char *name, const char *mime_type, WSB_Int32 flags, const void *license_data, WSB_Size license_data_size, WSB_Int32 audio_track, WSB_Int32 video_track)
 Opens a named media file, and optionally specifies the particular audio and/or video track to be played. More...
 
WSB_EXPORT WSB_Result WSB_Player_SetVideoOutput (WSB_Player *playback, const char *output_name)
 Sets the destination for the video output, such as a pointer to a window encoded as hex in the string. More...
 
WSB_EXPORT WSB_Result WSB_Player_SetAudioOutput (WSB_Player *playback, const char *output_name)
 Sets the destination for the audio output. More...
 
WSB_EXPORT WSB_Result WSB_Player_SetVolume (WSB_Player *playback, float volume)
 Sets the volume on the audio output. More...
 
WSB_EXPORT WSB_Result WSB_Player_SetProperty (WSB_Player *playback, WSB_Player_PropertyScope scope, const char *target, const char *name, SHI_DataType type, const SHI_DataValue *value)
 Sets a property. More...
 
WSB_EXPORT WSB_Result WSB_Player_Play (WSB_Player *playback)
 Commences play. More...
 
WSB_EXPORT WSB_Result WSB_Player_Pause (WSB_Player *playback)
 Pauses output (playback). More...
 
WSB_EXPORT WSB_Result WSB_Player_Stop (WSB_Player *playback)
 Stops output. More...
 
WSB_EXPORT WSB_Result WSB_Player_SetFullscreen (WSB_Player *playback, WSB_Boolean fullscreen)
 Enters or exits fullscreen mode. More...
 
WSB_EXPORT WSB_Result WSB_Player_Seek (WSB_Player *playback, WSB_Int32 offset, WSB_Int32 range)
 Attempts to move the stream to the specified position. More...
 
WSB_EXPORT WSB_Result WSB_Player_Destroy (WSB_Player *playback)
 Destroys the specified WSB_Player object. More...
 

Detailed Description

A high level Marlin media playback module.

Macro Definition Documentation

◆ WSB_PROPERTY_NAME_PLAYER_EXTRA_CONTENT_ACCESS_HTTP_HEADERS

#define WSB_PROPERTY_NAME_PLAYER_EXTRA_CONTENT_ACCESS_HTTP_HEADERS   "Wasabi.Player.ExtraContentAccessHttpHeaders"

Wasabi Player property.

Extra content access HTTP headers. This property contains a list of header names and values like this: name:value,name:value,... where name and value must be percent encoded against "," ":" "%". When this property is set, extra HTTP headers are added in the HTTP request based on the name value pairs for HLS or DASH content acquisition. Scope: WSB_PLAYER_PROPERTY_SCOPE_CORE Target: NULL Name: WSB_PROPERTY_NAME_PLAYER_EXTRA_CONTENT_ACCESS_HTTP_HEADERS Type: SHI_DATA_TYPE_STRING

Since
1.15

Function Documentation

◆ WSB_Player_Create()

WSB_EXPORT WSB_Result WSB_Player_Create ( WSB_Player_EventListener  listener,
WSB_Player_MsgThreadModel  msg_model,
WSB_Player **  playback 
)

Creates an instance of a WSB_Player object, and registers the passed-in listener to be notified of player events.

The WSB_Player object must be destroyed when it is no longer needed, by calling WSB_Player_Destroy.

Parameters
listenerAn object that will receive various notification events.
msg_modelThe thread model determining the way in which notification messages will be sent to the listener.
See also
WSB_Player_MsgThreadModel
Parameters
[out]playbackAddress of a WSB_Player pointer that will be set to refer to the WSB_Player object that is created.

◆ WSB_Player_Destroy()

WSB_EXPORT WSB_Result WSB_Player_Destroy ( WSB_Player playback)

Destroys the specified WSB_Player object.

A WSB_Player object must be destroyed by calling this method once it is no longer needed.

Parameters
playbackThe WSB_Player to be destroyed.

◆ WSB_Player_Pause()

WSB_EXPORT WSB_Result WSB_Player_Pause ( WSB_Player playback)

Pauses output (playback).

Parameters
playbackThe WSB_Player that will pause output.

◆ WSB_Player_Play()

WSB_EXPORT WSB_Result WSB_Player_Play ( WSB_Player playback)

Commences play.

The WSB_Player_SetInput method must have successfully executed before this method is called.

Parameters
playbackThe WSB_Player that will commence playback.

◆ WSB_Player_PumpMessage()

WSB_EXPORT WSB_Result WSB_Player_PumpMessage ( WSB_Player playback,
WSB_Int32  timeout 
)

Asks the WSB_Player instance to send a message in its queue to the listener registered in the call to WSB_Player_Create.

This method is only relevant when the thread model specified when creating the player is WSB_PLAYER_MSG_MODEL_RAW.

Parameters
playbackThe WSB_Player object being asked to send the event notifications.
timeoutThe maximum amount of time in milliseconds in which to block waiting for another event to occur. A timeout value of -1 indicates that the method should not return until another event has occurred and has been reported, while a value of 0 indicates that this method should simply return if there is no message in the queue when it is called.
Returns
WSB_SUCCESS if a message was popped. NPT_ERROR_LIST_EMPTY if the list was empty.

◆ WSB_Player_Seek()

WSB_EXPORT WSB_Result WSB_Player_Seek ( WSB_Player playback,
WSB_Int32  offset,
WSB_Int32  range 
)

Attempts to move the stream to the specified position.

The range is considered to indicate the total number of "marks" in the content, and the offset is a particular number of marks, where the definition of a mark is up to the application. It could be seconds, for example. Dividing the offset by the range indicates at what percentage position the seek is being requested.

Seeking is not supported in the following file based content: transport stream based file (.ts, .bbts) and fragmented MPEG-4 based file (.m4f, .uvu).

Parameters
playbackThe WSB_Player being asked to do a seek.
offsetThe offset (in "marks") to which the seek should be done.
rangeThe total number of "marks" in the content.

◆ WSB_Player_SetAudioOutput()

WSB_EXPORT WSB_Result WSB_Player_SetAudioOutput ( WSB_Player playback,
const char *  output_name 
)

Sets the destination for the audio output.

Please see the BlueTune decoder documentation for more help on this.

Parameters
playbackThe WSB_Player whose audio output destination is set.
output_nameThe audio output destination.

◆ WSB_Player_SetFullscreen()

WSB_EXPORT WSB_Result WSB_Player_SetFullscreen ( WSB_Player playback,
WSB_Boolean  fullscreen 
)

Enters or exits fullscreen mode.

Support of this is system-dependent.

Parameters
playbackThe WSB_Player whose fullscreen mode should be modified.
fullscreenIf WSB_TRUE, specifies fullscreen mode; if WSB_FALSE, specifies an exit out of fullscreen mode.

◆ WSB_Player_SetInput()

WSB_EXPORT WSB_Result WSB_Player_SetInput ( WSB_Player playback,
const char *  name,
const char *  mime_type 
)

Opens a named media file.

Parameters
playbackThe WSB_Player being supplied the media file.
nameA legal media file name, which may be a file on disk, an HTTP remote file URL, an MS3 compound URL or MS3 SAD URL, or an HLS URL for adaptive streaming.
mime_typeOptional MIME type. If specified, it may help the decoder parse the content.

◆ WSB_Player_SetInputEx()

WSB_EXPORT WSB_Result WSB_Player_SetInputEx ( WSB_Player playback,
const char *  name,
const char *  mime_type,
WSB_Int32  flags,
const void *  license_data,
WSB_Size  license_data_size,
WSB_Int32  audio_track,
WSB_Int32  video_track 
)

Opens a named media file, and optionally specifies the particular audio and/or video track to be played.

Currently track selection is only supported for audio track selection on PDCF protected MP4 content. Also optionally specifies a license to be evaluated prior to playback.

Parameters
playbackThe WSB_Player being supplied the media file.
nameA legal media file name, which may be a file on disk, an HTTP remote file URL, an MS3 compound URL or MS3 SAD URL, or an HLS URL for adaptive streaming.
mime_typeOptional MIME type. If specified, it may help the decoder parse the content.
flagsA bitset that provides additional information to this function. See WSB_PLAYER_INPUT_FLAG_*.
license_dataBytes of a license. May be NULL. If provided, evaluation will be attempted during playback.
license_data_sizeSize of license_data.
audio_trackIf flag WSB_PLAYER_INPUT_FLAG_AUDIO_TRACK is set, this contains the global track index or ID of the audio intended for playback. It contains the global track index if WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX is set, otherwise it contains the track ID.
video_trackIf flag WSB_PLAYER_INPUT_FLAG_VIDEO_TRACK is set, this contains the global track index or ID of the video intended for playback. It contains the global track index if WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX is set, otherwise it contains the track ID.

◆ WSB_Player_SetProperty()

WSB_EXPORT WSB_Result WSB_Player_SetProperty ( WSB_Player playback,
WSB_Player_PropertyScope  scope,
const char *  target,
const char *  name,
SHI_DataType  type,
const SHI_DataValue value 
)

Sets a property.

Parameters
playbackThe WSB_Player whose property will be set.
scopeScope enum specifying what type of property is being set.
targetName of the target to which this property applies. For Core (WSB_PLAYER_PROPERTY_SCOPE_CORE) and Stream (WSB_PLAYER_PROPERTY_SCOPE_STREAM) scopes this parameter must be NULL.
nameName of the property to set.
typeIndicates the data type of the property value being set.
valuePointer to the property's value. If this parameter is NULL, the property will be deleted.

◆ WSB_Player_SetVideoOutput()

WSB_EXPORT WSB_Result WSB_Player_SetVideoOutput ( WSB_Player playback,
const char *  output_name 
)

Sets the destination for the video output, such as a pointer to a window encoded as hex in the string.

Please see the BlueTune decoder documentation for more help on this.

Parameters
playbackThe WSB_Player whose video output destination is set.
output_nameThe video output destination.

◆ WSB_Player_SetVolume()

WSB_EXPORT WSB_Result WSB_Player_SetVolume ( WSB_Player playback,
float  volume 
)

Sets the volume on the audio output.

Parameters
playbackThe WSB_Player whose audio output volume is set.
volumeA fraction of the system's volume, between 0 (no volume) and 1 (full volume).

◆ WSB_Player_Stop()

WSB_EXPORT WSB_Result WSB_Player_Stop ( WSB_Player playback)

Stops output.

Parameters
playbackThe WSB_Player that will stop output.