Wasabi ExpressPlay SDK for Desktop Systems  1.23.0
Data Structures | Macros | Typedefs | Enumerations | Functions
WsbMediaPlayback.h File Reference

Wasabi Media Playback API. More...

#include "WsbTypes.h"
#include "ShiData.h"

Go to the source code of this file.

Data Structures

struct  WSB_Player_Event
 Structure used as the base for all event structures. More...
 
struct  WSB_Player_AckEvent
 Event data for reporting a successful command execution. More...
 
struct  WSB_Player_NackEvent
 Event data for reporting failure of a requested command. More...
 
struct  WSB_Player_PongNotificationEvent
 Event data for reporting that the decoder sent a pong reply in response to a ping. More...
 
struct  WSB_Player_DecoderStateNotificationEvent
 Event data for reporting a new decoder state. More...
 
struct  WSB_Player_DecodingErrorDetails
 Error code and message for a decoder event notification. More...
 
struct  WSB_Player_DecoderEventNotificationEvent
 Event data for reporting a decoder event type and error details. More...
 
struct  WSB_Player_VolumeNotificationEvent
 Event data for reporting a volume change. More...
 
struct  WSB_Player_StreamTimeCodeNotificationEvent
 Event data for reporting a seek to a particular time in a media presentation. More...
 
struct  WSB_Player_StreamPositionNotificationEvent
 Event data for reporting a seek to a particular position. More...
 
struct  WSB_Player_StreamInfoNotificationEvent
 Event data for reporting information about a stream, and the update mask. More...
 
struct  WSB_Player_DRMStateNotificationEvent
 Event data for reporting the DRM state. More...
 
struct  WSB_Player_BufferingNotificationEvent
 Event data for reporting the number of buffer bytes available versus the number needed. More...
 
struct  WSB_Player_GotoUrlNotificationEvent
 Event data for reporting a URL to which the player was directed. More...
 
struct  WSB_Player_PropertyNotificationEvent
 Event data for reporting information about a property. More...
 
struct  WSB_Player_EventListener
 This structure pairs a listener instance value with a function pointer for receiving events. More...
 

Macros

#define WSB_PLAYER_STREAM_INFO_MASK_ALL   0x1FFF
 Stream information mask identifiers. More...
 
#define WSB_PLAYER_STREAM_INFO_MASK_TYPE   0x0001
 
#define WSB_PLAYER_STREAM_INFO_MASK_ID   0x0002
 
#define WSB_PLAYER_STREAM_INFO_MASK_NOMINAL_BITRATE   0x0004
 
#define WSB_PLAYER_STREAM_INFO_MASK_AVERAGE_BITRATE   0x0008
 
#define WSB_PLAYER_STREAM_INFO_MASK_INSTANT_BITRATE   0x0010
 
#define WSB_PLAYER_STREAM_INFO_MASK_SIZE   0x0020
 
#define WSB_PLAYER_STREAM_INFO_MASK_DURATION   0x0040
 
#define WSB_PLAYER_STREAM_INFO_MASK_SAMPLE_RATE   0x0080
 
#define WSB_PLAYER_STREAM_INFO_MASK_CHANNEL_COUNT   0x0100
 
#define WSB_PLAYER_STREAM_INFO_MASK_WIDTH   0x0200
 
#define WSB_PLAYER_STREAM_INFO_MASK_HEIGHT   0x0400
 
#define WSB_PLAYER_STREAM_INFO_MASK_FLAGS   0x0800
 
#define WSB_PLAYER_STREAM_INFO_MASK_DATA_TYPE   0x1000
 
#define WSB_PLAYER_INPUT_FLAG_AUDIO_TRACK   0x0001
 Flags that determine behavior of SetInputEx function. More...
 
#define WSB_PLAYER_INPUT_FLAG_VIDEO_TRACK   0x0002
 
#define WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX   0x0004
 
#define WSB_PLAYER_STREAM_INFO_FLAG_VBR   0x01
 Flag that indicates that the stream has a variable bitrate. More...
 
#define WSB_PLAYER_STREAM_INFO_FLAG_CONTINUOUS   0x02
 Flag that indicates that the stream is a continuous stream. More...
 
#define WSB_PROPERTY_NAME_PLAYER_EXTRA_CONTENT_ACCESS_HTTP_HEADERS   "Wasabi.Player.ExtraContentAccessHttpHeaders"
 Wasabi Player property. More...
 

Typedefs

typedef struct WSB_Player WSB_Player
 A WSB_Player object can be used to play audio and video content, and to control such playback, by issuing commands to it to commence play, pause, stop, set the volume, seek to a particular position, etc. More...
 

Enumerations

enum  WSB_Player_MsgThreadModel {
  WSB_PLAYER_MSG_MODEL_NATIVE,
  WSB_PLAYER_MSG_MODEL_RAW
}
 Thread model identifiers. More...
 
enum  WSB_Player_EventType {
  WSB_PLAYER_EVENT_TYPE_ACK,
  WSB_PLAYER_EVENT_TYPE_NACK,
  WSB_PLAYER_EVENT_TYPE_PONG_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_DECODER_STATE_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_VOLUME_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_STREAM_TIMECODE_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_STREAM_POSITION_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_STREAM_INFO_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_DRM_STATE_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_PROPERTY_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_DECODER_EVENT_NOTIFICATION,
  WSB_PLAYER_EVENT_TYPE_BUFFERING,
  WSB_PLAYER_EVENT_TYPE_GOTO_URL_NOTIFICATION
}
 Event type identifiers. More...
 
enum  WSB_Player_CommandId {
  WSB_PLAYER_COMMAND_ID_SET_INPUT,
  WSB_PLAYER_COMMAND_ID_SET_INPUT_EX,
  WSB_PLAYER_COMMAND_ID_SET_VIDEO_OUTPUT,
  WSB_PLAYER_COMMAND_ID_SET_AUDIO_OUTPUT,
  WSB_PLAYER_COMMAND_ID_SET_VOLUME,
  WSB_PLAYER_COMMAND_ID_PLAY,
  WSB_PLAYER_COMMAND_ID_PAUSE,
  WSB_PLAYER_COMMAND_ID_STOP,
  WSB_PLAYER_COMMAND_ID_PING,
  WSB_PLAYER_COMMAND_ID_SEEK_TO_TIME,
  WSB_PLAYER_COMMAND_ID_SEEK_TO_POSITION,
  WSB_PLAYER_COMMAND_ID_REGISTER_MODULE,
  WSB_PLAYER_COMMAND_ID_ADD_NODE,
  WSB_PLAYER_COMMAND_ID_SET_PROPERTY
}
 Command identifiers. More...
 
enum  WSB_Player_DecoderState {
  WSB_PLAYER_DECODER_STATE_STOPPED,
  WSB_PLAYER_DECODER_STATE_PLAYING,
  WSB_PLAYER_DECODER_STATE_PAUSED,
  WSB_PLAYER_DECODER_STATE_EOS
}
 Decoder state identifiers. More...
 
enum  WSB_Player_DecoderEventType {
  WSB_PLAYER_DECODER_EVENT_TYPE_DECODING_ERROR,
  WSB_PLAYER_DECODER_EVENT_TYPE_INIT_ERROR
}
 Decoder event type identifiers. More...
 
enum  WSB_Player_DRMState {
  WSB_PLAYER_DRM_STATE_INACTIVE,
  WSB_PLAYER_DRM_STATE_GETTING_LICENSE,
  WSB_PLAYER_DRM_STATE_REGISTERING
}
 DRM state identifiers. More...
 
enum  WSB_Player_PropertyScope {
  WSB_PLAYER_PROPERTY_SCOPE_CORE,
  WSB_PLAYER_PROPERTY_SCOPE_STREAM,
  WSB_PLAYER_PROPERTY_SCOPE_MODULE
}
 Scope identifiers for specifying the scope of a 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

Wasabi Media Playback API.

Macro Definition Documentation

◆ WSB_PLAYER_INPUT_FLAG_AUDIO_TRACK

#define WSB_PLAYER_INPUT_FLAG_AUDIO_TRACK   0x0001

Flags that determine behavior of SetInputEx function.

◆ WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX

#define WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX   0x0004

◆ WSB_PLAYER_INPUT_FLAG_VIDEO_TRACK

#define WSB_PLAYER_INPUT_FLAG_VIDEO_TRACK   0x0002

◆ WSB_PLAYER_STREAM_INFO_FLAG_CONTINUOUS

#define WSB_PLAYER_STREAM_INFO_FLAG_CONTINUOUS   0x02

Flag that indicates that the stream is a continuous stream.

◆ WSB_PLAYER_STREAM_INFO_FLAG_VBR

#define WSB_PLAYER_STREAM_INFO_FLAG_VBR   0x01

Flag that indicates that the stream has a variable bitrate.

◆ WSB_PLAYER_STREAM_INFO_MASK_ALL

#define WSB_PLAYER_STREAM_INFO_MASK_ALL   0x1FFF

Stream information mask identifiers.

◆ WSB_PLAYER_STREAM_INFO_MASK_AVERAGE_BITRATE

#define WSB_PLAYER_STREAM_INFO_MASK_AVERAGE_BITRATE   0x0008

◆ WSB_PLAYER_STREAM_INFO_MASK_CHANNEL_COUNT

#define WSB_PLAYER_STREAM_INFO_MASK_CHANNEL_COUNT   0x0100

◆ WSB_PLAYER_STREAM_INFO_MASK_DATA_TYPE

#define WSB_PLAYER_STREAM_INFO_MASK_DATA_TYPE   0x1000

◆ WSB_PLAYER_STREAM_INFO_MASK_DURATION

#define WSB_PLAYER_STREAM_INFO_MASK_DURATION   0x0040

◆ WSB_PLAYER_STREAM_INFO_MASK_FLAGS

#define WSB_PLAYER_STREAM_INFO_MASK_FLAGS   0x0800

◆ WSB_PLAYER_STREAM_INFO_MASK_HEIGHT

#define WSB_PLAYER_STREAM_INFO_MASK_HEIGHT   0x0400

◆ WSB_PLAYER_STREAM_INFO_MASK_ID

#define WSB_PLAYER_STREAM_INFO_MASK_ID   0x0002

◆ WSB_PLAYER_STREAM_INFO_MASK_INSTANT_BITRATE

#define WSB_PLAYER_STREAM_INFO_MASK_INSTANT_BITRATE   0x0010

◆ WSB_PLAYER_STREAM_INFO_MASK_NOMINAL_BITRATE

#define WSB_PLAYER_STREAM_INFO_MASK_NOMINAL_BITRATE   0x0004

◆ WSB_PLAYER_STREAM_INFO_MASK_SAMPLE_RATE

#define WSB_PLAYER_STREAM_INFO_MASK_SAMPLE_RATE   0x0080

◆ WSB_PLAYER_STREAM_INFO_MASK_SIZE

#define WSB_PLAYER_STREAM_INFO_MASK_SIZE   0x0020

◆ WSB_PLAYER_STREAM_INFO_MASK_TYPE

#define WSB_PLAYER_STREAM_INFO_MASK_TYPE   0x0001

◆ WSB_PLAYER_STREAM_INFO_MASK_WIDTH

#define WSB_PLAYER_STREAM_INFO_MASK_WIDTH   0x0200

Typedef Documentation

◆ WSB_Player

typedef struct WSB_Player WSB_Player

A WSB_Player object can be used to play audio and video content, and to control such playback, by issuing commands to it to commence play, pause, stop, set the volume, seek to a particular position, etc.

Enumeration Type Documentation

◆ WSB_Player_CommandId

Command identifiers.

Enumerator
WSB_PLAYER_COMMAND_ID_SET_INPUT 
WSB_PLAYER_COMMAND_ID_SET_INPUT_EX 
WSB_PLAYER_COMMAND_ID_SET_VIDEO_OUTPUT 
WSB_PLAYER_COMMAND_ID_SET_AUDIO_OUTPUT 
WSB_PLAYER_COMMAND_ID_SET_VOLUME 
WSB_PLAYER_COMMAND_ID_PLAY 
WSB_PLAYER_COMMAND_ID_PAUSE 
WSB_PLAYER_COMMAND_ID_STOP 
WSB_PLAYER_COMMAND_ID_PING 
WSB_PLAYER_COMMAND_ID_SEEK_TO_TIME 
WSB_PLAYER_COMMAND_ID_SEEK_TO_POSITION 
WSB_PLAYER_COMMAND_ID_REGISTER_MODULE 
WSB_PLAYER_COMMAND_ID_ADD_NODE 
WSB_PLAYER_COMMAND_ID_SET_PROPERTY 

◆ WSB_Player_DecoderEventType

Decoder event type identifiers.

Enumerator
WSB_PLAYER_DECODER_EVENT_TYPE_DECODING_ERROR 
WSB_PLAYER_DECODER_EVENT_TYPE_INIT_ERROR 

◆ WSB_Player_DecoderState

Decoder state identifiers.

Enumerator
WSB_PLAYER_DECODER_STATE_STOPPED 
WSB_PLAYER_DECODER_STATE_PLAYING 
WSB_PLAYER_DECODER_STATE_PAUSED 
WSB_PLAYER_DECODER_STATE_EOS 

◆ WSB_Player_DRMState

DRM state identifiers.

Enumerator
WSB_PLAYER_DRM_STATE_INACTIVE 
WSB_PLAYER_DRM_STATE_GETTING_LICENSE 
WSB_PLAYER_DRM_STATE_REGISTERING 

◆ WSB_Player_EventType

Event type identifiers.

Enumerator
WSB_PLAYER_EVENT_TYPE_ACK 
WSB_PLAYER_EVENT_TYPE_NACK 
WSB_PLAYER_EVENT_TYPE_PONG_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_DECODER_STATE_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_VOLUME_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_STREAM_TIMECODE_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_STREAM_POSITION_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_STREAM_INFO_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_DRM_STATE_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_PROPERTY_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_DECODER_EVENT_NOTIFICATION 
WSB_PLAYER_EVENT_TYPE_BUFFERING 
WSB_PLAYER_EVENT_TYPE_GOTO_URL_NOTIFICATION 

◆ WSB_Player_MsgThreadModel

Thread model identifiers.

If the model specified on WSB_Player creation (WSB_Player_Create) is WSB_PLAYER_MSG_MODEL_NATIVE, then the event listener callback that is registered in the call to WSB_Player_Create will be called in the UI native thread (e.g., Cocoa for the Mac and Windows message loop for Windows). If the model specified is WSB_PLAYER_MSG_MODEL_RAW, then the WSB_Player_PumpMessage method must be called in order to have the listener called, once per event that has not yet been reported.

Enumerator
WSB_PLAYER_MSG_MODEL_NATIVE 
WSB_PLAYER_MSG_MODEL_RAW 

◆ WSB_Player_PropertyScope

Scope identifiers for specifying the scope of a property.

The scope indicates to what part of the system the property applies.

Enumerator
WSB_PLAYER_PROPERTY_SCOPE_CORE 
WSB_PLAYER_PROPERTY_SCOPE_STREAM 
WSB_PLAYER_PROPERTY_SCOPE_MODULE