![]() |
DSMCC
22.11.0
|
API functions for DSM-CC client requests. More...
#include <string.h>
#include "stb_os.h"
#include "cldsmcc.h"
#include "fs_types.h"
#include "dsm_client.h"
#include "dm_debug.h"
#include "dsm_main.h"
Classes | |
struct | s_DsmControl |
struct | s_DsmRefs |
struct | s_ObjUserData |
Macros | |
#define | LOAD_FLAGS_REQUEST_OBJECT_TYPE 0x00100000 |
#define | LOAD_FLAGS_REQUEST_STREAM_OBJ 0x01000000 |
#define | STREAM_EVENT_VERSION_1 0 |
#define | STREAM_EVENT_VERSION_2 1 |
Typedefs | |
typedef struct s_DsmControl | S_DsmControl |
typedef struct s_DsmRefs | S_DsmRefs |
typedef struct s_ObjUserData | S_ObjUserData |
Functions | |
void | DsmccObjectLoadEventFunc (H_DsmObject objectHandle, E_ObjLoadStatus status, H_ObjUserData pUserData) |
Callback function provided to DSM-CC library. Object load events are passed to this callback by the DSM-CC library. More... | |
void | DsmccStreamEventFunc (H_DsmEvent eventHandle, E_StreamEventStatus status, S_UserInfo userInfo, U8BIT *namePtr, U8BIT *dataPtr, U8BIT nameLen, U8BIT dataLen) |
E_FsStatus | DSMCC_ClientLoadObject (H_DsmControl dsmctrl, U8BIT *path, U32BIT flags, F_DSM_CBLOAD cb_func, S_CONTENT *pContent) |
Perform a file load request which is executed synchronously or asynchronously. See load flags above for modifying requests. More... | |
E_FsStatus | DSMCC_ClientObjectType (H_DsmControl dsmctrl, U8BIT *path, F_DSM_TYPE cbfunc, void *userData, E_DsmObjectType *pType) |
Request object type for given path. This may be executed synchronously or asynchronously - see comment for DSMCC_ClientLoadObject() More... | |
void | DSMCC_ClientPreloadHint (H_DsmControl dsmctrl, U8BIT *path) |
Provide a hint that the specified file may be required in the future. If possible this should be loaded into the DSM-CC cache. More... | |
E_FsStatus | DSMCC_ClientEventSubscribeName (H_DsmControl dsmctrl, FS_HANDLE streamObject, U8BIT *eventName, F_DSM_EVENT cb_func, void *userData, H_DsmEvent *pEventHandle) |
Client request to subscribe to DSMCC Stream Event, specified by name. DSMCC notifies when the named stream event occurs, by calling cb_func (a callback function defined by the Client). Before calling this function the Client must request that the stream object of interest be loaded using DSMCC_ClientLoadObject() function. This action will deliver a handle to the object stream - this is passed as the streamObject argument to this function. Do not have to wait until load is completed before subscribing. More... | |
E_FsStatus | DSMCC_ClientEventSubscribeId (H_DsmControl dsmctrl, U16BIT associationTag, U16BIT eventId, F_DSM_EVENT cb_func, void *userData, H_DsmEvent *pEventHandle) |
Client request to subscribe to DSMCC Stream Event, specified by event ID and association tag of stream object. DSMCC notifies when the stream event occurs, by calling cb_func (a callback function defined by the Client). More... | |
void | DSMCC_ClientEventUnsubscribe (H_DsmControl dsmctrl, H_DsmEvent eventHandle) |
Client request to UN-subscribe to DSMCC Stream Event. More... | |
E_FsStatus | DSMCC_ClientSubscribeEvents (H_DsmControl dsmctrl, U8BIT *path, U8BIT *eventName, F_DSM_SE cb_func, U_PARAM userData) |
Client request to subscribe to DSMCC Stream Event, specified by stream object given by 'path' and searches the object for the stream event given by eventName. DSMCC notifies when the stream object has been resolved (or not) using the client callback function with which the event handle is returned. This handle should be given to DSMCC_ClientEventUnsubscribe when un-subscribing to this stream event. It also notifies with same callback when named stream event occurs. More... | |
E_FsStatus | DSMCC_ClientSubscribeEventId (H_DsmControl dsmctrl, U8BIT *name, U16BIT associationTag, U16BIT eventId, F_DSM_SE cb_func, U_PARAM userData) |
Client request to subscribe to DSMCC Stream Event, specified by event ID and association tag. The supplied event name is simply held and returned by DSM-CC in the callback function 'cf_func'. DSMCC notifies when the stream event occurs, by calling cb_func (a callback function defined by the Client). More... | |
void | DSMCC_ClientUnsubscribeEvent (H_DsmControl dsmctrl, F_DSM_SE cb_func, U_PARAM userData) |
Client request to UN-subscribe to DSMCC Stream Event. More... | |
void | DSMCC_StreamEventUnload (H_DsmControl dsmctrl, U32BIT carouselId) |
Unload any stream event that was loaded with a stream object on given carousel Any Client Callback will notified and unsubscribe. More... | |
BOOLEAN | DSMCC_ClientLoadFileGroups (H_DsmControl dsmctrl, H_ObjCarousel hOC, U16BIT *total, S_CarouselInfoFileGroup **pGroups) |
Client request to retrieve MHEG5 File system acceleration file groups The client must release the array of group data, by calling DSMCC_ClientUnloadFileGroups, when finished with the data. More... | |
void | DSMCC_ClientUnloadFileGroups (H_DsmControl dsmctrl, H_ObjCarousel hOC, S_CarouselInfoFileGroup *groups) |
Client request to release file group data returned from DSMCC_ClientLoadFileGroups. More... | |
API functions for DSM-CC client requests.
E_FsStatus DSMCC_ClientEventSubscribeId | ( | H_DsmControl | dsmctrl, |
U16BIT | associationTag, | ||
U16BIT | eventId, | ||
F_DSM_EVENT | cb_func, | ||
void * | userData, | ||
H_DsmEvent * | pEventHandle | ||
) |
Client request to subscribe to DSMCC Stream Event, specified by event ID and association tag of stream object. DSMCC notifies when the stream event occurs, by calling cb_func (a callback function defined by the Client).
dsmctrl | DSMCC Instance |
associationTag | association tag. |
evemntId | Id of stream event. |
cb_func | Callback function for client. |
userData | Optional data to be passed back to client. It is stored and returned unchanged. |
pEventHandle | Handle to the stream event returned by subscribe. The caller may use this handle when calling DSMCC_ClientEventUnsubscribe |
E_FsStatus DSMCC_ClientEventSubscribeName | ( | H_DsmControl | dsmctrl, |
FS_HANDLE | streamObject, | ||
U8BIT * | eventName, | ||
F_DSM_EVENT | cb_func, | ||
void * | userData, | ||
H_DsmEvent * | pEventHandle | ||
) |
Client request to subscribe to DSMCC Stream Event, specified by name. DSMCC notifies when the named stream event occurs, by calling cb_func (a callback function defined by the Client). Before calling this function the Client must request that the stream object of interest be loaded using DSMCC_ClientLoadObject() function. This action will deliver a handle to the object stream - this is passed as the streamObject argument to this function. Do not have to wait until load is completed before subscribing.
dsmctrl | DSMCC Instance |
streamObject | DSMCCs file system handle |
eventName | Name of required stream event. When NULL, any event on stream object |
cb_func | Callback function for client. |
userData | Optional data to be passed back to client. It is stored and returned unchanged. |
pEventHandle | Handle to the stream event returned by subscribe. The caller may use this handle when calling DSMCC_ClientEventUnsubscribe |
void DSMCC_ClientEventUnsubscribe | ( | H_DsmControl | dsmctrl, |
H_DsmEvent | eventHandle | ||
) |
Client request to UN-subscribe to DSMCC Stream Event.
dsmctrl | DSMCC Instance |
event | Handle to previously subscribed event |
BOOLEAN DSMCC_ClientLoadFileGroups | ( | H_DsmControl | dsmctrl, |
H_ObjCarousel | hOC, | ||
U16BIT * | total, | ||
S_CarouselInfoFileGroup ** | pGroups | ||
) |
Client request to retrieve MHEG5 File system acceleration file groups The client must release the array of group data, by calling DSMCC_ClientUnloadFileGroups, when finished with the data.
dsmctrl | DSMCC Instance |
hOC | Handle to carousel |
total | Pointer to return number of file groups in the carousel info |
pGroups | Pointer to return an array of file group data. |
E_FsStatus DSMCC_ClientLoadObject | ( | H_DsmControl | dsmctrl, |
U8BIT * | path, | ||
U32BIT | flags, | ||
F_DSM_CBLOAD | cb_func, | ||
S_CONTENT * | pContent | ||
) |
Perform a file load request which is executed synchronously or asynchronously. See load flags above for modifying requests.
Synchronous behaviour: If DSM-CC is able to determine that the file does not exist, the function returns with the FS_STATUS_ERROR.
If DSM-CC has the requested file in cache, it can read the file contents and pass a pointer to it in the pFileData return parameter, along with the file length in the pFileSize returned parameter. Once the contents of the file has been used, resource allocated to it must be released by calling the dsmFDataAck function. The function return value will be set to FS_STATUS_OK.
Asynchronous behaviour: If DSM-CC does not have the file in cache it will perform an asynchronous load. This is indicated by returning FS_STATUS_PENDING. When the load is completed, the 'cb_func' is called
If the path parameter points to a stream object within the DSM-CC carousel this will be loaded. The referenced multiplex will be located and a reference to this will be passed back to the MHEG-5 engine.
dsmctrl | DSMCC controling Instance |
path | Path of Object (directory, file or stream) |
flags | Load flags containing cache priority, and other control bits |
cb_func | Call-back Function |
pContent | Pointer to the file content details. Note: When content data for object is no longer required, the destroy function in S_CONTENT must be called to free any allocated resource. |
E_FsStatus DSMCC_ClientObjectType | ( | H_DsmControl | dsmctrl, |
U8BIT * | path, | ||
F_DSM_TYPE | cbfunc, | ||
void * | userData, | ||
E_DsmObjectType * | pType | ||
) |
Request object type for given path. This may be executed synchronously or asynchronously - see comment for DSMCC_ClientLoadObject()
dsmctrl | DSMCC controling Instance |
path | Path of Object (directory, file or stream) |
cbfunc | Call-back Function |
userData | User data to be passed back to client in callback function. |
pType | Pointer to object type - return value is valid when FS_STATUS_OK. |
void DSMCC_ClientPreloadHint | ( | H_DsmControl | dsmctrl, |
U8BIT * | path | ||
) |
Provide a hint that the specified file may be required in the future. If possible this should be loaded into the DSM-CC cache.
dsmctrl | DSMCC Instance |
path | Path of Object (directory, file or stream) |
E_FsStatus DSMCC_ClientSubscribeEventId | ( | H_DsmControl | dsmctrl, |
U8BIT * | name, | ||
U16BIT | associationTag, | ||
U16BIT | eventId, | ||
F_DSM_SE | cb_func, | ||
U_PARAM | userData | ||
) |
Client request to subscribe to DSMCC Stream Event, specified by event ID and association tag. The supplied event name is simply held and returned by DSM-CC in the callback function 'cf_func'. DSMCC notifies when the stream event occurs, by calling cb_func (a callback function defined by the Client).
dsmctrl | DSMCC Instance |
name | Name of stream event (returned to 'cb_func'). |
associationTag | association tag. |
eventId | Id of stream event. |
cb_func | Callback function for client. |
userData | Optional data to be passed back to client. It is stored and returned unchanged. |
E_FsStatus DSMCC_ClientSubscribeEvents | ( | H_DsmControl | dsmctrl, |
U8BIT * | path, | ||
U8BIT * | eventName, | ||
F_DSM_SE | cb_func, | ||
U_PARAM | userData | ||
) |
Client request to subscribe to DSMCC Stream Event, specified by stream object given by 'path' and searches the object for the stream event given by eventName. DSMCC notifies when the stream object has been resolved (or not) using the client callback function with which the event handle is returned. This handle should be given to DSMCC_ClientEventUnsubscribe when un-subscribing to this stream event. It also notifies with same callback when named stream event occurs.
Client request to subscribe to DSMCC Stream Event, specified by stream object given by 'path' and the event given by eventName. DSMCC notifies when the stream object has been resolved (or not) using the client callback function with which the event handle is returned. This handle should be given to DSMCC_ClientEventUnsubscribe when un-subscribing to this stream event. It also notifies with same callback when named stream event occurs.
dsmctrl | DSMCC Instance |
path | Path of stream object describing stream events |
eventName | Name of required stream event. When NULL, any event on stream object |
cb_func | Client callback function to notify status events |
userData | Optional data to be passed back to client. It is stored and returned unchanged. |
void DSMCC_ClientUnloadFileGroups | ( | H_DsmControl | dsmctrl, |
H_ObjCarousel | hOC, | ||
S_CarouselInfoFileGroup * | groups | ||
) |
Client request to release file group data returned from DSMCC_ClientLoadFileGroups.
dsmctrl | DSMCC Instance |
hOC | Handle to carousel |
groups | Array of file group data. |
void DSMCC_ClientUnsubscribeEvent | ( | H_DsmControl | dsmctrl, |
F_DSM_SE | cb_func, | ||
U_PARAM | userData | ||
) |
Client request to UN-subscribe to DSMCC Stream Event.
dsmctrl | DSMCC Instance |
event | Handle to previously subscribed event |
void DSMCC_StreamEventUnload | ( | H_DsmControl | dsmctrl, |
U32BIT | carouselId | ||
) |
Unload any stream event that was loaded with a stream object on given carousel Any Client Callback will notified and unsubscribe.
dsmctrl | DSMCC Instance |
carouselId |
void DsmccObjectLoadEventFunc | ( | H_DsmObject | objectHandle, |
E_ObjLoadStatus | status, | ||
H_ObjUserData | pUserData | ||
) |
Callback function provided to DSM-CC library. Object load events are passed to this callback by the DSM-CC library.
objectHandle | Handle to the object (returned by clDsmLoadObject) |
status | Status of the load request for the specified object. |
engineLoadRef | Reference from MHEG5 engine |
objLoadUserData2 | DsmCmd_t cammand value (passing in as void*) |