Wasabi ExpressPlay SDK for Embedded Systems
1.23.0
|
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... | |
Media content downloader module.
Provides basic content download, conversion and storage into the local file system.
WSB_EXPORT WSB_Result WSB_MediaDownload_AddContent | ( | WSB_MediaDownload * | download, |
const char * | path, | ||
const WSB_MediaDownload_Content * | content | ||
) |
Register a new content for download.
download | reference to the Media Download object |
path | the 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. |
content | description of the content to be downloaded. |
WSB_EXPORT WSB_Result WSB_MediaDownload_CancelContent | ( | WSB_MediaDownload * | download, |
const char * | path | ||
) |
Cancel the content from download.
download | reference to the Media Download object |
path | the unique directory path that identifies the content being downloaded. |
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.
download | pointer to where the new reference is returned. |
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.
download | reference to the Media Download object |
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.
download | reference to the Media Download object |
path | the unique directory path that identifies the content being queried |
content_status | pointer 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. |
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().
download | reference to the Media Download object |
status | pointer 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. |
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.
download | the reference to be released. |
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.
download | reference to the Media Download object |
content_status | pointer to the content status object to be released. |
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.
download | reference to the Media Download object |
status | the object to be released. |
WSB_EXPORT WSB_Result WSB_MediaDownload_RemoveListener | ( | WSB_MediaDownload * | download | ) |
Remove the listener, if any.
download | reference to the Media Download object |
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.
download | reference to the Media Download object |
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.
download | reference to the Media Download object |
constraints | the new constraints |
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().
download | reference to the Media Download object |
client_context | any pointer that is passed back to the client on any listener callback invocations |
listener | pointer to the listener object that will be copied by the WSB_MediaDownload_SetListener() function |