Wasabi ExpressPlay SDK for iOS  1.23.0
Functions
WSB_MediaDownload Class

Media content downloader module. More...

Functions

WSB_EXPORT WSB_Result WSB_MediaDownload_Get (WSB_MediaDownload **download)
 Obtain a Media Download singleton reference. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_Release (WSB_MediaDownload *download)
 Release a Media Download singleton reference. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_SetListener (WSB_MediaDownload *download, void *client_context, const WSB_MediaDownload_Listener *listener)
 Set the listener. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_RemoveListener (WSB_MediaDownload *download)
 Remove the listener, if any. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_Pause (WSB_MediaDownload *download)
 Pause the Media Download. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_Resume (WSB_MediaDownload *download)
 Resume the Media Download. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_SetConstraints (WSB_MediaDownload *download, const WSB_MediaDownload_Constraints *constraints)
 Assign the Media Download constraints. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_QueryStatus (WSB_MediaDownload *download, WSB_MediaDownload_Status **status)
 Query the Media Download status. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_ReleaseStatus (WSB_MediaDownload *download, WSB_MediaDownload_Status *status)
 Release a Media Download status object earlier obtained through WSB_MediaDownload_QueryStatus. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_AddContent (WSB_MediaDownload *download, const char *path, const WSB_MediaDownload_Content *content)
 Register a new content for download. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_CancelContent (WSB_MediaDownload *download, const char *path)
 Cancel the content from download. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_QueryContentStatus (WSB_MediaDownload *download, const char *path, WSB_MediaDownload_ContentStatus **content_status)
 Query the status of the content being downloaded. More...
 
WSB_EXPORT WSB_Result WSB_MediaDownload_ReleaseContentStatus (WSB_MediaDownload *download, WSB_MediaDownload_ContentStatus *content_status)
 Release content status object earlier obtained through WSB_MediaDownload_QueryContentStatus. More...
 

Detailed Description

Media content downloader module.

Provides basic content download, conversion and storage into the local file system.

Since
1.21

Function Documentation

◆ WSB_MediaDownload_AddContent()

WSB_EXPORT WSB_Result WSB_MediaDownload_AddContent ( WSB_MediaDownload download,
const char *  path,
const WSB_MediaDownload_Content content 
)

Register a new content for download.

Parameters
downloadreference to the Media Download object
paththe unique directory path to where the newly downloaded content will be stored. The directory may or may not exist, but the parent directory must exist. If the directory at path does not exist, it is created.
contentdescription of the content to be downloaded.
Since
1.21

◆ WSB_MediaDownload_CancelContent()

WSB_EXPORT WSB_Result WSB_MediaDownload_CancelContent ( WSB_MediaDownload download,
const char *  path 
)

Cancel the content from download.

Parameters
downloadreference to the Media Download object
paththe unique directory path that identifies the content being downloaded.
Since
1.21

◆ WSB_MediaDownload_Get()

WSB_EXPORT WSB_Result WSB_MediaDownload_Get ( WSB_MediaDownload **  download)

Obtain a Media Download singleton reference.

The first call to WSB_MediaDownload_Get() in an application will instantiate the Media Download object. The object is in the WSB_MDS_PAUSED state initially.

The returned reference must be released through the WSB_MediaDownload_Release() once no longer needed. References are counted and the Media Download object continues to exist until the last reference has been released.

Parameters
downloadpointer to where the new reference is returned.
Since
1.21

◆ WSB_MediaDownload_Pause()

WSB_EXPORT WSB_Result WSB_MediaDownload_Pause ( WSB_MediaDownload download)

Pause the Media Download.

Put the Media Download singleton object into the WSB_MDS_PAUSED state.

Parameters
downloadreference to the Media Download object
Since
1.21

◆ WSB_MediaDownload_QueryContentStatus()

WSB_EXPORT WSB_Result WSB_MediaDownload_QueryContentStatus ( WSB_MediaDownload download,
const char *  path,
WSB_MediaDownload_ContentStatus **  content_status 
)

Query the status of the content being downloaded.

The content is identified by the unique download directory in the path parameter.

Ownership of the returned status object is transferred to the caller. The caller must invoke WSB_MediaDownload_ReleaseContentStatus() to release the status object once no longer needed.

Parameters
downloadreference to the Media Download object
paththe unique directory path that identifies the content being queried
content_statuspointer to where the newly allocated content status reference is returned. Ownership of the object is with the caller. The caller must invoke WSB_MediaDownload_ReleaseContentStatus() to release the status object once no longer needed.
Since
1.21

◆ WSB_MediaDownload_QueryStatus()

WSB_EXPORT WSB_Result WSB_MediaDownload_QueryStatus ( WSB_MediaDownload download,
WSB_MediaDownload_Status **  status 
)

Query the Media Download status.

The returned status object must be released through a call to WSB_MediaDownload_ReleaseStatus().

Parameters
downloadreference to the Media Download object
statuspointer to where the reference to a newly allocated status object is returned. The ownership is transferred to the caller, and the caller must invoke WSB_MediaDownload_ReleaseStatus() once the status object is no longer needed.
Since
1.21

◆ WSB_MediaDownload_Release()

WSB_EXPORT WSB_Result WSB_MediaDownload_Release ( WSB_MediaDownload download)

Release a Media Download singleton reference.

When the last reference to the Media Download singleton is released, the singleton object gets destroyed.

Parameters
downloadthe reference to be released.
Since
1.21

◆ WSB_MediaDownload_ReleaseContentStatus()

WSB_EXPORT WSB_Result WSB_MediaDownload_ReleaseContentStatus ( WSB_MediaDownload download,
WSB_MediaDownload_ContentStatus content_status 
)

Release content status object earlier obtained through WSB_MediaDownload_QueryContentStatus.

Parameters
downloadreference to the Media Download object
content_statuspointer to the content status object to be released.
Since
1.21

◆ WSB_MediaDownload_ReleaseStatus()

WSB_EXPORT WSB_Result WSB_MediaDownload_ReleaseStatus ( WSB_MediaDownload download,
WSB_MediaDownload_Status status 
)

Release a Media Download status object earlier obtained through WSB_MediaDownload_QueryStatus.

Parameters
downloadreference to the Media Download object
statusthe object to be released.
Since
1.21

◆ WSB_MediaDownload_RemoveListener()

WSB_EXPORT WSB_Result WSB_MediaDownload_RemoveListener ( WSB_MediaDownload download)

Remove the listener, if any.

Parameters
downloadreference to the Media Download object

◆ WSB_MediaDownload_Resume()

WSB_EXPORT WSB_Result WSB_MediaDownload_Resume ( WSB_MediaDownload download)

Resume the Media Download.

Put the Media Download singleton object into the WSB_MDS_RUNNING state.

Parameters
downloadreference to the Media Download object
Since
1.21

◆ WSB_MediaDownload_SetConstraints()

WSB_EXPORT WSB_Result WSB_MediaDownload_SetConstraints ( WSB_MediaDownload download,
const WSB_MediaDownload_Constraints constraints 
)

Assign the Media Download constraints.

The effects on the module may not be immediate. For example, the number of connection may exceed the constraints until the currently active downloads have been completed or cancelled.

If constraints is NULL, the constraints are reset to no constraints.

Parameters
downloadreference to the Media Download object
constraintsthe new constraints
Since
1.21

◆ WSB_MediaDownload_SetListener()

WSB_EXPORT WSB_Result WSB_MediaDownload_SetListener ( WSB_MediaDownload download,
void *  client_context,
const WSB_MediaDownload_Listener listener 
)

Set the listener.

There can be only one listener associated with the Media Download object. Any previous listener will be removed in the call to WSB_MediaDownload_SetListener().

Parameters
downloadreference to the Media Download object
client_contextany pointer that is passed back to the client on any listener callback invocations
listenerpointer to the listener object that will be copied by the WSB_MediaDownload_SetListener() function
Since
1.21