133 #define NUM_OPEN_DSM_OBJECTS_MAX 128 135 #define DSMCC_MINIMUM_CACHE_SIZE (1024 * 1024 * 1) 136 #define DSMCC_DEFAULT_CACHE_SIZE (1024 * 1024 * 6) 139 #define CACHE_RULES_DEFAULT 0x3F 140 #define CACHE_RULES_FROM_STREAM 0x00 141 #define CACHE_RULES_STATIC 0x80 144 #define CLDSM_PROG_CURR_SERVICE_CACHE_FULL 0 151 typedef U8BIT E_CacheRules;
179 STREAM_OBJ_WITH_EVENTS,
180 LINK_TO_ALTERNATE_OC_OBJ
189 OBJ_LOAD_UNINITIATED = 0,
190 OBJ_LOAD_IN_PROGRESS,
192 OBJ_LOAD_ABORTED_TIMEOUT,
193 OBJ_LOAD_ABORTED_PATH_ERROR,
194 OBJ_LOAD_ABORTED_ERROR,
195 #ifdef DSM_MHP_PROFILE 196 OBJ_LOAD_ABORTED_UNLOAD,
198 OBJ_LOAD_PARENT_DIR_LOADED
200 OBJ_LOAD_ABORTED_UNLOAD
256 typedef void (*F_Error) ( E_DscError err,
void *args );
263 typedef void (*F_Progress) ( U32BIT prog,
void *args );
284 typedef E_DscError (*F_StartTimer) (
H_DsmControl dsmControl,
286 void *clDsmTmrUserData,
287 void **pTimerHandle );
341 typedef E_DscError (*F_StartSIQuery) (
H_SiqInstance siqInstance,
343 void* clDsmSIUserData,
364 void *queryHandle, H_SIQueryRef clDsmSIQueryRef );
391 typedef E_DscError (*F_SubscribeSIChanged) (
H_SiqInstance siqInstance,
405 typedef void (*F_UnsubscribeSIChanged) (
H_SiqInstance siqInstance,
487 void *filterHandle, H_DscSFRef clDsmFilterRef );
495 void *filterHandle, H_DscSFRef clDsmFilterRef,
496 E_SFPriority priority );
521 typedef void (*F_NotifyCarouselLoadEvent) (
522 H_DsmCarousel clDsmCarouselHandle, E_OCLoadStatus status,
547 typedef void (*F_NotifyObjectLoadEvent) (
548 H_DsmObject clDsmObjectHandle, E_ObjLoadStatus status,
549 H_ObjUserData pCopyOfObjLoadUserData );
585 H_DsmEvent eventHandle, E_StreamEventStatus status,
S_UserInfo userInfo,
586 U8BIT *namePtr, U8BIT *dataPtr, U8BIT namelen, U8BIT dataLen );
605 void *userData1,
void *userData2,
609 typedef BOOLEAN (*F_IsUserDataMatch) (H_ObjUserData pUserData1, H_ObjUserData pUserData2);
629 F_MemAlloc allocFunc;
635 F_Progress progressFunc;
637 F_AddSectionFilter addSectionFilterFunc;
638 F_DelSectionFilter delSectionFilterFunc;
640 F_SFPriorityChanged sfPriorityChangeFunc;
642 F_StartTimer startTimerFunc;
643 F_StopTimer stopTimerFunc;
645 F_StartSIQuery startSIQueryFunc;
646 F_StopSIQuery stopSIQueryFunc;
648 F_SubscribeSIChanged subscribeSIChangeFunc;
649 F_UnsubscribeSIChanged unsubscribeSIChangeFunc;
652 F_NotifyCarouselLoadEvent notifyCarouselLoadEventFunc;
654 F_NotifyObjectLoadEvent notifyObjectLoadEventFunc;
694 U32BIT timeUnitResolution;
709 U32BIT maxMemorySize;
731 U16BIT maxAvailableSectionFilters;
739 BOOLEAN storeSIQueryResults;
756 BOOLEAN turboCaching;
760 BOOLEAN multipleSsuDownloads;
832 E_DscError CDSM_SysCreate(
958 U16BIT original_network_id, U16BIT transport_stream_id,
990 void *clDsmTmrUserData, E_TimerStatus status,
void *timerHandle );
1035 H_SIQueryRef clDsmSIQueryRef,
void *clDsmSIUserData,
1076 E_SIChangeEvent evnt, U16BIT service_id, U32BIT carousel_id );
1122 E_DscError CDSM_SysProcessPrivateSection(
H_DsmCoreInst instance,
1123 U8BIT *pSection, H_DscSFRef dsmFilterRef );
1130 E_DscError CDSM_SectionFilterPriority(
H_DsmCoreInst instance,
1131 H_DscSFRef dsmFilterRef,
1132 E_SFPriority *pPriority );
1211 U16BIT service_id, U32BIT carousel_id, E_SIQueryKind kind,
1212 H_DsmCarousel *pclDsmCarouselHandle );
1258 H_DsmCarousel clDsmCarouselHandle, E_DsmRstMode mode );
1281 H_DsmCarousel carouselHandle,
1282 U32BIT *pCarouselId );
1300 H_DsmCarousel carouselHandle );
1314 H_DsmCarousel clDsmCarouselHandle,
1330 H_DsmCarousel clDsmCarouselHandle,
1458 U8BIT *pathname, U32BIT timeout, E_CacheRules cachingRules,
1459 H_ObjUserData pUserData, U32BIT sizeOfUserData,
1460 E_ObjLoadStatus *pStatus, H_DsmObject *pclDsmObjectHandle );
1523 H_DsmObject clDsmObjectHandle, E_DsmRstMode mode );
1525 E_DscError CDSM_UnloadMatchingObject(
H_DsmCoreInst instance,
1526 F_IsUserDataMatch matchFunc, H_ObjUserData pUserData, E_DsmRstMode mode );
1556 H_DsmObject clDsmObjectHandle,
1557 E_DsmObjectKind *pKind );
1583 H_DsmObject clDsmObjectHandle );
1650 E_DscError CDSM_SetObjectCachingRules(
H_DsmCoreInst instance,
1651 U8BIT *pathname, E_CacheRules cachingRules );
1704 U8BIT *pathname, U32BIT timeout );
1752 H_DsmObject streamObject,
1755 H_DsmEvent *pEventHandle );
1775 H_DsmEvent eventHandle );
1815 U16BIT associationTag,
1818 H_DsmEvent *pEventHandle );
1835 H_DsmEvent eventHandle );
1896 E_DscError CDSM_ObjectGetKind(
1897 H_DsmObject clDsmObjectHandle,
1898 E_DsmObjectKind *pKind );
1916 E_DscError CDSM_ObjectGetCarouselHandle(
1917 H_DsmObject clDsmObjectHandle,
1918 void **hCarouselHandle );
1960 H_DsmObject clDsmObjectHandle,
1962 U8BIT **pSrvCtxtData,
1963 U32BIT *pSrvCtxtLen);
1982 E_DscError CDSM_FileGetSize(
1983 H_DsmObject clDsmFileObjectHandle,
2011 E_DscError CDSM_FileRead(
2012 H_DsmObject clDsmFileObjectHandle, U32BIT numBytes,
2013 U8BIT *pDest, U32BIT *pNumBytesActual );
2029 E_DscError CDSM_FileDirect(
2030 H_DsmObject clDsmFileObjectHandle,
2031 U8BIT **ppDest, U32BIT *pNumBytesActual );
2053 E_DscError CDSM_FileReadByte(
2054 H_DsmObject clDsmFileObjectHandle,
2078 E_DscError CDSM_FileSetPosAbs(
2079 H_DsmObject clDsmFileObjectHandle, U32BIT absPosition );
2102 E_DscError CDSM_FileSetPosRel(
2103 H_DsmObject clDsmFileObjectHandle, S32BIT relPosition );
2128 E_DscError CDSM_FileGetPos(
2129 H_DsmObject clDsmFileObjectHandle,
2130 U32BIT *pPosition );
2150 E_DscError CDSM_DirEntrySizes(
2153 U16BIT *totalNameLength );
2170 E_DscError CDSM_DirEntryFirst(
2172 void **pFirstEntry );
2186 E_DscError CDSM_DirEntryNext(
2188 void **pNextEntry );
2201 U16BIT CDSM_DirEntryNameLength(
2202 void *entryHandle );
2216 U16BIT CDSM_DirEntryNameCopy(
2228 E_DsmObjectKind CDSM_DirEntryKind(
void *entryHandle );
2264 H_DsmObject streamObject,
void *userData1,
void *userData2,
2297 H_DsmObject streamObject,
2298 U8BIT **pNamesPtr, U16BIT *pNamesLen );
2317 H_DsmObject streamObject,
2318 U8BIT **ppXmlData, U16BIT *pXmlLen);
2320 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:1471
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:753
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:218
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:331
H_DsmCoreInst CDSM_ObjectGetInstance(H_DsmObject clDsmObjectHandle)
Get DSM instance to which the object belongs.
Definition: clDsmClientMain.c:1113
Definition: cldsmcc.h:620
H_DsmCarousel CDSM_CurrentCarousel(H_DsmCoreInst instance)
Retrieve handle to the current carousel for DSM-CC Instance.
Definition: clDsmClientMain.c:250
Definition: clDsmSystem.h:535
Definition: dvblocator.h:30
void(* F_NotifyStreamEvent)(H_DsmEvent eventHandle, E_StreamEventStatus status, S_UserInfo userInfo, 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:584
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:1502
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:285
E_DscError CDSM_SetCurrentCarousel(H_DsmCoreInst instance, H_DsmCarousel carouselHandle)
Sets current carousel for DSM-CC Instance.
Definition: clDsmClientMain.c:255
H_DsmControl CDSM_SysGetControl(H_DsmCoreInst instance)
Get control handle from DSM instance .
Definition: clDsmMain.c:547
E_DscError CDSM_SysProcessTimerEvent(H_DsmCoreInst instance, void *clDsmTmrUserData, E_TimerStatus status, void *timerHandle)
Definition: clDsmMain.c:931
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:514
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:1049
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:78
Definition: dsm_client.c:57
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:747
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:604
Definition: cldsmtypes.h:193
void CDSM_SysSetMemoryMax(H_DsmCoreInst instance, U32BIT maxMemory)
Set maximum memory usage.
Definition: clDsmMain.c:787
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:374
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:931
Definition: dsm_types.h:113
E_DscError CDSM_SpecialEventSubscribe(H_DsmCoreInst dsmccInstance, U8BIT *name, U16BIT associationTag, U16BIT eventId, S_UserInfo *pUserInfo, H_DsmEvent *pEventHandle)
Like clDsmStreamEventSubscribe, except that no stream object is required. This function subscribes to...
Definition: streamEvent.c:530
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:691
Definition: cldsmcc.h:208
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:834
Definition: fs_types.h:46
Definition: cldsmtypes.h:212
E_DscError CDSM_StreamUnsubscribeEvent(H_DsmCoreInst idp, S_UserInfo *pUserInfo)
This function is called by the Client to let DSMCC know when a previously subscribed stream event is ...
Definition: streamEvent.c:775
Definition: dsm_types.h:213
E_DscError CDSM_StreamEventSubscribe(H_DsmCoreInst dsmccInstance, H_DsmObject streamObject, U8BIT *eventName, S_UserInfo *pUserInfo, H_DsmEvent *pEventHandle)
The Client uses this function to request that the DSMCC notifies it when a named stream event occurs...
Definition: streamEvent.c:360
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:684
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:480
void CDSM_StreamEventUnload(H_DsmCoreInst idp, U32BIT carouselId)
This function is called by the Client to unload any stream event loaded from a stream object on the g...
Definition: streamEvent.c:810
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:1128
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:1387
Definition: dsmObject.h:58
Definition: dsm_client.c:44