132 #define NUM_OPEN_DSM_OBJECTS_MAX 128 134 #define DSMCC_MINIMUM_CACHE_SIZE (1024 * 1024 * 1) 135 #define DSMCC_DEFAULT_CACHE_SIZE (1024 * 1024 * 6) 138 #define CACHE_RULES_DEFAULT 0x3F 139 #define CACHE_RULES_FROM_STREAM 0x00 140 #define CACHE_RULES_STATIC 0x80 143 #define CLDSM_PROG_CURR_SERVICE_CACHE_FULL 0 152 typedef U8BIT E_CacheRules;
180 STREAM_OBJ_WITH_EVENTS,
181 LINK_TO_ALTERNATE_OC_OBJ
190 OBJ_LOAD_UNINITIATED = 0,
191 OBJ_LOAD_IN_PROGRESS,
193 OBJ_LOAD_ABORTED_TIMEOUT,
194 OBJ_LOAD_ABORTED_PATH_ERROR,
195 OBJ_LOAD_ABORTED_ERROR,
196 #ifdef DSM_MHP_PROFILE 197 OBJ_LOAD_ABORTED_UNLOAD,
199 OBJ_LOAD_PARENT_DIR_LOADED
201 OBJ_LOAD_ABORTED_UNLOAD
215 SEN_ABORTED_OBJ_LOAD_FAILED,
216 SEN_ABORTED_SUBSCRIBE_FAILED,
218 SEN_ACKNOWLEDGE_UNSUBSCRIBE
263 typedef void (*F_Error) ( E_DscError err,
void *args );
270 typedef void (*F_Progress) ( U32BIT prog,
void *args );
291 typedef E_DscError (*F_StartTimer) (
H_DsmControl dsmControl,
293 void *clDsmTmrUserData,
294 void **pTimerHandle );
348 typedef E_DscError (*F_StartSIQuery) (
H_SiqInstance siqInstance,
350 void* clDsmSIUserData,
371 void *queryHandle, H_SIQueryRef clDsmSIQueryRef );
398 typedef E_DscError (*F_SubscribeSIChanged) (
H_SiqInstance siqInstance,
412 typedef void (*F_UnsubscribeSIChanged) (
H_SiqInstance siqInstance,
494 void *filterHandle, H_DscSFRef clDsmFilterRef );
502 void *filterHandle, H_DscSFRef clDsmFilterRef,
503 E_SFPriority priority );
528 typedef void (*F_NotifyCarouselLoadEvent) (
529 H_DsmCarousel clDsmCarouselHandle, E_OCLoadStatus status,
554 typedef void (*F_NotifyObjectLoadEvent) (
555 H_DsmObject clDsmObjectHandle, E_ObjLoadStatus status,
556 H_ObjUserData pCopyOfObjLoadUserData );
595 H_DsmEvent eventHandle, E_SENotifyStatus status,
596 void *userData1,
void *userData2,
597 U8BIT *namePtr, U8BIT *dataPtr, U8BIT namelen, U8BIT dataLen );
616 void *userData1,
void *userData2,
637 F_MemAlloc allocFunc;
643 F_Progress progressFunc;
645 F_AddSectionFilter addSectionFilterFunc;
646 F_DelSectionFilter delSectionFilterFunc;
648 F_SFPriorityChanged sfPriorityChangeFunc;
650 F_StartTimer startTimerFunc;
651 F_StopTimer stopTimerFunc;
653 F_StartSIQuery startSIQueryFunc;
654 F_StopSIQuery stopSIQueryFunc;
656 F_SubscribeSIChanged subscribeSIChangeFunc;
657 F_UnsubscribeSIChanged unsubscribeSIChangeFunc;
660 F_NotifyCarouselLoadEvent notifyCarouselLoadEventFunc;
662 F_NotifyObjectLoadEvent notifyObjectLoadEventFunc;
702 U32BIT timeUnitResolution;
717 U32BIT maxMemorySize;
739 U16BIT maxAvailableSectionFilters;
747 BOOLEAN storeSIQueryResults;
764 BOOLEAN turboCaching;
768 BOOLEAN multipleSsuDownloads;
840 E_DscError CDSM_SysCreate(
966 U16BIT original_network_id, U16BIT transport_stream_id,
998 void *clDsmTmrUserData, E_TimerStatus status,
void *timerHandle );
1043 H_SIQueryRef clDsmSIQueryRef,
void *clDsmSIUserData,
1084 E_SIChangeEvent evnt, U16BIT service_id, U32BIT carousel_id );
1130 E_DscError CDSM_SysProcessPrivateSection(
H_DsmCoreInst instance,
1131 U8BIT *pSection, H_DscSFRef dsmFilterRef );
1138 E_DscError CDSM_SectionFilterPriority(
H_DsmCoreInst instance,
1139 H_DscSFRef dsmFilterRef,
1140 E_SFPriority *pPriority );
1219 U16BIT service_id, U32BIT carousel_id, E_SIQueryKind kind,
1220 H_DsmCarousel *pclDsmCarouselHandle );
1266 H_DsmCarousel clDsmCarouselHandle, E_DsmRstMode mode );
1289 H_DsmCarousel carouselHandle,
1290 U32BIT *pCarouselId );
1308 H_DsmCarousel carouselHandle );
1322 H_DsmCarousel clDsmCarouselHandle,
1338 H_DsmCarousel clDsmCarouselHandle,
1466 U8BIT *pathname, U32BIT timeout, E_CacheRules cachingRules,
1467 H_ObjUserData pUserData, U32BIT sizeOfUserData,
1468 E_ObjLoadStatus *pStatus, H_DsmObject *pclDsmObjectHandle );
1531 H_DsmObject clDsmObjectHandle, E_DsmRstMode mode );
1562 H_DsmObject clDsmObjectHandle,
1563 E_DsmObjectKind *pKind );
1589 H_DsmObject clDsmObjectHandle );
1656 E_DscError CDSM_SetObjectCachingRules(
H_DsmCoreInst instance,
1657 U8BIT *pathname, E_CacheRules cachingRules );
1710 U8BIT *pathname, U32BIT timeout );
1761 H_DsmObject streamObject,
1765 H_DsmEvent *pEventHandle );
1785 H_DsmEvent eventHandle );
1826 U16BIT associationTag,
1830 H_DsmEvent *pEventHandle );
1847 H_DsmEvent eventHandle );
1877 E_DscError CDSM_ObjectGetKind(
1878 H_DsmObject clDsmObjectHandle,
1879 E_DsmObjectKind *pKind );
1897 E_DscError CDSM_ObjectGetCarouselHandle(
1898 H_DsmObject clDsmObjectHandle,
1899 void **hCarouselHandle );
1941 H_DsmObject clDsmObjectHandle,
1943 U8BIT **pSrvCtxtData,
1944 U32BIT *pSrvCtxtLen);
1963 E_DscError CDSM_FileGetSize(
1964 H_DsmObject clDsmFileObjectHandle,
1992 E_DscError CDSM_FileRead(
1993 H_DsmObject clDsmFileObjectHandle, U32BIT numBytes,
1994 U8BIT *pDest, U32BIT *pNumBytesActual );
2010 E_DscError CDSM_FileDirect(
2011 H_DsmObject clDsmFileObjectHandle,
2012 U8BIT **ppDest, U32BIT *pNumBytesActual );
2034 E_DscError CDSM_FileReadByte(
2035 H_DsmObject clDsmFileObjectHandle,
2059 E_DscError CDSM_FileSetPosAbs(
2060 H_DsmObject clDsmFileObjectHandle, U32BIT absPosition );
2083 E_DscError CDSM_FileSetPosRel(
2084 H_DsmObject clDsmFileObjectHandle, S32BIT relPosition );
2109 E_DscError CDSM_FileGetPos(
2110 H_DsmObject clDsmFileObjectHandle,
2111 U32BIT *pPosition );
2131 E_DscError CDSM_DirEntrySizes(
2134 U16BIT *totalNameLength );
2151 E_DscError CDSM_DirEntryFirst(
2153 void **pFirstEntry );
2167 E_DscError CDSM_DirEntryNext(
2169 void **pNextEntry );
2182 U16BIT CDSM_DirEntryNameLength(
2183 void *entryHandle );
2197 U16BIT CDSM_DirEntryNameCopy(
2209 E_DsmObjectKind CDSM_DirEntryKind(
void *entryHandle );
2245 H_DsmObject streamObject,
void *userData1,
void *userData2,
2278 H_DsmObject streamObject,
2279 U8BIT **pNamesPtr, U16BIT *pNamesLen );
2298 H_DsmObject streamObject,
2299 U8BIT **ppXmlData, U16BIT *pXmlLen);
2301 U32BIT CDSM_UtilCalculateCRC(U8BIT *msg, U32BIT len);
E_DscError CDSM_StreamEventNameList(H_DsmCoreInst dsmccInstance, H_DsmObject streamObject, U8BIT **pNamesPtr, U16BIT *pNamesLen)
The Client uses this function to request list of event names for stream object Before calling this fu...
Definition: streamEvent.c:1282
E_DscError CDSM_StreamGetDeferredService(H_DsmCoreInst instance, H_DsmObject streamObject, void *userData1, void *userData2, S_DvbLocator **ppDeferredService)
The Client calls this function to obtain the Association Tag which can be used to determine the PID o...
Definition: streamObject.c:141
E_DscError CDSM_SpecialEventUnsubscribe(H_DsmCoreInst dsmccInstance, H_DsmEvent eventHandle)
Same as clDsmStreamEventUnsubscribe - used in conjuction with clDsmSpecialEventSubscribe.
Definition: streamEvent.c:703
E_DscError CDSM_GetCarouselId(H_DsmCoreInst instance, H_DsmCarousel carouselHandle, U32BIT *pCarouselId)
Retrieve Carousel Id for the loaded DSM-CC Object Carousel.
Definition: clDsmClientMain.c:215
E_DscError CDSM_CarouselUnloadFileGroups(H_DsmCoreInst instance, H_DsmCarousel clDsmCarouselHandle, S_CarouselInfoFileGroup *groups)
Release "File Group Info" data allocated by used by CDSM_CarouselLoadFileGroups() ...
Definition: clDsmClientMain.c:328
H_DsmCoreInst CDSM_ObjectGetInstance(H_DsmObject clDsmObjectHandle)
Get DSM instance to which the object belongs.
Definition: clDsmClientMain.c:1075
Definition: cldsmcc.h:628
H_DsmCarousel CDSM_CurrentCarousel(H_DsmCoreInst instance)
Retrieve handle to the current carousel for DSM-CC Instance.
Definition: clDsmClientMain.c:247
Definition: clDsmSystem.h:535
Definition: dvblocator.h:30
E_DscError CDSM_StreamEventXmlData(H_DsmCoreInst dsmccInstance, H_DsmObject streamObject, U8BIT **ppXmlData, U16BIT *pXmlLen)
The Client uses this function to request data in XML format for stream object and associated events...
Definition: streamEvent.c:1313
E_DscError CDSM_CarouselLoadFileGroups(H_DsmCoreInst instance, H_DsmCarousel clDsmCarouselHandle, U16BIT *total, S_CarouselInfoFileGroup **pGroups)
Retrieve from Object Carousel's User Info, the "File Group Info" used by Australia and South Africa M...
Definition: clDsmClientMain.c:282
E_DscError CDSM_SetCurrentCarousel(H_DsmCoreInst instance, H_DsmCarousel carouselHandle)
Sets current carousel for DSM-CC Instance.
Definition: clDsmClientMain.c:252
H_DsmControl CDSM_SysGetControl(H_DsmCoreInst instance)
Get control handle from DSM instance .
Definition: clDsmMain.c:545
void(* F_NotifyStreamEvent)(H_DsmEvent eventHandle, E_SENotifyStatus status, void *userData1, void *userData2, U8BIT *namePtr, U8BIT *dataPtr, U8BIT namelen, U8BIT dataLen)
The Client defines this function to enable the DSMCC to communicate to the Client when any subscribed...
Definition: cldsmcc.h:594
E_DscError CDSM_SysProcessTimerEvent(H_DsmCoreInst instance, void *clDsmTmrUserData, E_TimerStatus status, void *timerHandle)
Definition: clDsmMain.c:929
E_DscError CDSM_UnloadModule(H_DsmCoreInst idp, H_DsmCarousel hCarousel, U32BIT moduleRef)
Unload SSU module. To be called once the client has finished saving this module data.
Definition: clDsmClientMain.c:511
DSM-CC global types header Used by SI Query and Section Filter code.
Definition: cldsmtypes.h:155
E_DscError CDSM_SysProcessSIQueryEvent(H_DsmCoreInst instance, H_SIQueryRef clDsmSIQueryRef, void *clDsmSIUserData, P_SIQueryResult pResult)
Notifies the result of the specified SI query (ie. a callback to startSIQueryFunc that returned SIQUE...
Definition: clDsmMain.c:1047
E_DscError CDSM_LoadCarousel(H_DsmCoreInst instance, U16BIT service_id, U32BIT carousel_id, E_SIQueryKind kind, H_DsmCarousel *pclDsmCarouselHandle)
Request load of a DSM-CC Object Carousel (service domain).
Definition: clDsmClientMain.c:75
Definition: dsm_client.c:54
E_DscError CDSM_UnloadObject(H_DsmCoreInst instance, H_DsmObject clDsmObjectHandle, E_DsmRstMode mode)
Unload (or cancel the requested load of) a DSM-CC object The client MUST first close and/or unsubscri...
Definition: clDsmClientMain.c:742
Definition: siq_main.h:33
void(* F_NotifyDeferredService)(void *userData1, void *userData2, S_DvbLocator *pDeferredService)
Called when request for deferred service of stream object has completed after clDsmStreamGetDeferredS...
Definition: cldsmcc.h:615
Definition: cldsmtypes.h:193
void CDSM_SysSetMemoryMax(H_DsmCoreInst instance, U32BIT maxMemory)
Set maximum memory usage.
Definition: clDsmMain.c:785
E_DscError CDSM_UnloadCarousel(H_DsmCoreInst instance, H_DsmCarousel clDsmCarouselHandle, E_DsmRstMode mode)
Unload (or cancel the requested load of) a DSM-CC Object Carousel (service domain). The client MUST first unload all objects before calling this function (which implies it must also have previously closed and/or unsubscribed any events on any loaded objects). If there are any active object loads in the carousel when clDsmUnloadCarousel is called then the unload will not be executed and an error returned. If the carousel is in the process of loading and/or booting the load operation will be aborted (and the notifyCarouselLoadEventFunc callback made with status OC_LOAD_ABORTED_UNLOAD). Any carousel load request that returned a valid CDSM_CarouselHandle(ie. did not generate an error at clDsmLoadCarousel call time), must be explicitly unloaded via clDsmUnloadCarousel. This is necessary, whether the carousel was successfully loaded or the load was aborted due to timeout or error. Once unload is called for a carousel, the clDsmCarouselHandle is no longer valid and must not be used by the client/calling env. If it needs to access the carousel subsequently it must re-load it and get a new clDsmCarouselHandle value. To forcefully destroy loaded objects and/or carousels (eg. where the handles may be unknown/lost) then clDsmReset can be used with force switches. Note that this physically deletes them from the cache whereas unloading (objects or carousels) does not. CALLBACKS THAT MAY BE INITIATED DURING THIS CALL: delSectionFilterFunc stopTimerFunc stopSIQueryFunc unsubscribeSIChange notifyCarouselLoadEventFunc.
Definition: clDsmClientMain.c:371
E_DscError CDSM_OpenObject(H_DsmCoreInst instance, H_DsmObject clDsmObjectHandle, E_DsmObjectKind *pKind)
Open object data for subsequent access via API functions for given object kind. The object must have ...
Definition: clDsmClientMain.c:893
Definition: dsm_types.h:102
E_DscError CDSM_StreamEventUnsubscribe(H_DsmCoreInst dsmccInstance, H_DsmEvent eventHandle)
This function is called by the Client to let DSMCC know when a previously subscribed stream event is ...
Definition: streamEvent.c:641
E_DscError CDSM_SysSetCurrService(H_DsmCoreInst instance, U16BIT original_network_id, U16BIT transport_stream_id, U16BIT service_id)
Set/notify the current service (initially and when changing it). This MUST be called initially (ie...
Definition: clDsmMain.c:832
Definition: cldsmtypes.h:212
Definition: dsm_types.h:202
E_DscError CDSM_StreamEventSubscribe(H_DsmCoreInst dsmccInstance, H_DsmObject streamObject, U8BIT *eventName, void *userData1, void *userData2, H_DsmEvent *pEventHandle)
The Client uses this function to request that the DSMCC notifies it when a named stream event occurs...
Definition: streamEvent.c:332
E_DscError CDSM_SysReset(H_DsmCoreInst instance, E_DsmRstMode mode)
Reset DSM-CC Core Layer instance. Resets conditions to the same state as after CDSM_SysCreate(ie. keeps setup parameters). In normal operation the client MUST first unsubscribe all events, close and and unload all objects and unload all carousels before calling this function. This will have also stopped/deleted all associated system resources (ie. SI queries, timers, SI change monitors, section filters). If any client transactions or system transactions are still active when clDsmReset is called the reset will not be executed and an error returned. NB. The calling environment (system side) must acknowledge stop commands for SI Queries and timers (via processSIQueryEvent, processTimerEvent) and that these may occur asynchronously (ie. after a delay). This means that there may still be some active system transactions for some time after all objects and carousels are unloaded. FORCING RESET IN ERROR CONDITIONS: If all client and system transactions are apparently completed but still returns an error (eg. because handles are unknown/lost or system resource stop requests are not acknowledged) then clDsmReset can be called with appropriate force switches to clear the error condition. Any client transaction errors must first be cleared before system transaction errors can be cleared and both force switches cannot be set at the same time. NB. Only use force switches in known error conditions. It is potentially fatal (may cause illegal memory access) to call the functions: streamEventUnsubscribe, unloadObject, unloadCarousel, processSIQueryEvent, processTimerEvent with old/stale handles after clDsmReset has been forced. CALLBACKS THAT MAY BE INITIATED DURING THIS CALL: deleteSectionFilter stopTimer stopSIQuery unsubscribeSIChange.
Definition: clDsmMain.c:682
E_DscError CDSM_SysDestroy(H_DsmCoreInst instance, H_SiqInstance *pSiqInst, H_SfmInstance *pSfmInst)
Destroy DSM-CC Core Layer instance. De-allocates all 'static' memory used by the instance (via freeFu...
Definition: clDsmMain.c:478
Definition: sfm_main.h:36
E_DscError CDSM_SysProcessSIChangeEvent(H_DsmCoreInst instance, E_SIChangeEvent evnt, U16BIT service_id, U32BIT carousel_id)
Notify that the SI for the indicated service has changed Changes should be notified in the following ...
Definition: clDsmMain.c:1126
Define standard function types.
E_DscError CDSM_ObjectGetServiceContext(H_DsmObject clDsmObjectHandle, U32BIT serviceId, U8BIT **pSrvCtxtData, U32BIT *pSrvCtxtLen)
This function gets service context of DSM object (if available) Need by MHEG5 for specified service g...
Definition: clDsmClientMain.c:1347
Definition: dsmObject.h:58
E_DscError CDSM_SpecialEventSubscribe(H_DsmCoreInst dsmccInstance, U16BIT associationTag, U16BIT eventId, void *userData1, void *userData2, H_DsmEvent *pEventHandle)
Like clDsmStreamEventSubscribe, except that no stream object is required. This function subscribes to...
Definition: streamEvent.c:507
Definition: dsm_client.c:41