Wasabi ExpressPlay SDK for Desktop Systems
1.10
|
A high level Marlin media playback module. 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... | |
A high level Marlin media playback module.
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.
listener | An object that will receive various notification events. |
msg_model | The thread model determining the way in which notification messages will be sent to the listener. |
[out] | playback | Address of a WSB_Player pointer that will be set to refer to the WSB_Player object that is created. |
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.
playback | The WSB_Player to be destroyed. |
WSB_EXPORT WSB_Result WSB_Player_Pause | ( | WSB_Player * | playback | ) |
Pauses output (playback).
playback | The WSB_Player that will pause output. |
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.
playback | The WSB_Player that will commence playback. |
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.
playback | The WSB_Player object being asked to send the event notifications. |
timeout | The 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. |
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.
playback | The WSB_Player being asked to do a seek. |
offset | The offset (in "marks") to which the seek should be done. |
range | The total number of "marks" in the content. |
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.
playback | The WSB_Player whose audio output destination is set. |
output_name | The audio output destination. |
WSB_EXPORT WSB_Result WSB_Player_SetFullscreen | ( | WSB_Player * | playback, |
WSB_Boolean | fullscreen | ||
) |
Enters or exits fullscreen mode.
Support of this is system-dependent.
playback | The WSB_Player whose fullscreen mode should be modified. |
fullscreen | If WSB_TRUE, specifies fullscreen mode; if WSB_FALSE, specifies an exit out of fullscreen mode. |
WSB_EXPORT WSB_Result WSB_Player_SetInput | ( | WSB_Player * | playback, |
const char * | name, | ||
const char * | mime_type | ||
) |
Opens a named media file.
playback | The WSB_Player being supplied the media file. |
name | A 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_type | Optional MIME type. If specified, it may help the decoder parse the content. |
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.
Also optionally specifies a license to be evaluated prior to playback.
playback | The WSB_Player being supplied the media file. |
name | A 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_type | Optional MIME type. If specified, it may help the decoder parse the content. |
flags | A bitset that provides additional information to this function. See WSB_PLAYER_INPUT_FLAG_*. |
license_data | Bytes of a license. May be NULL. If provided, evaluation will be attempted during playback. |
license_data_size | Size of license_data. |
audio_track | If flag WSB_PLAYER_INPUT_FLAG_AUDIO_TRACK is set, this contains the track index or ID of the audio intended for playback. It contains the track index if WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX is set, otherwise it contains the track ID. |
video_track | If flag WSB_PLAYER_INPUT_FLAG_VIDEO_TRACK is set, this contains the track index or ID of the video intended for playback. It contains the track index if WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX is set, otherwise it contains the track ID. |
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.
playback | The WSB_Player whose property will be set. |
scope | Scope enum specifying what type of property is being set. |
target | Name 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. |
name | Name of the property to set. |
type | Indicates the data type of the property value being set. |
value | Pointer to the property's value. If this parameter is NULL, the property will be deleted. |
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.
playback | The WSB_Player whose video output destination is set. |
output_name | The video output destination. |
WSB_EXPORT WSB_Result WSB_Player_SetVolume | ( | WSB_Player * | playback, |
float | volume | ||
) |
Sets the volume on the audio output.
playback | The WSB_Player whose audio output volume is set. |
volume | A fraction of the system's volume, between 0 (no volume) and 1 (full volume). |
WSB_EXPORT WSB_Result WSB_Player_Stop | ( | WSB_Player * | playback | ) |
Stops output.
playback | The WSB_Player that will stop output. |