DSMCC  15.3.1
source/dscore/inc/cldsmtypes.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  * Copyright © 2002 Koninklijke Philips Electronics N.V
00005  *
00006  * This file is part of a DTVKit Software Component
00007  * You are permitted to copy, modify or distribute this file subject to the terms
00008  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00009  *
00010  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00011  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00012  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00013  *
00014  * If you or your organisation is not a member of DTVKit then you have access
00015  * to this source code outside of the terms of the licence agreement
00016  * and you are expected to delete this and any associated files immediately.
00017  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00018  *******************************************************************************/
00026 #ifndef _CLDSMTYPES_H_
00027 #define _CLDSMTYPES_H_
00028 
00029 /*---includes for this file--------------------------------------------------*/
00030 #include "dsm_types.h"
00031 
00032 /*---Constant and macro definitions for public use---------------------------*/
00033 
00034 /* Minimum and Maximum number of section filters required by this DSM-CC module.
00035  * This is NOT number of PID filters - as there can be many DSM-CC section
00036  * filters on a single PID.
00037  * For example, UK DTG MHEG main test suite requires at least 46 section
00038  * filters, but needs only 2 PID filters for this.
00039  * Note that to pass MHEG tests, more that 46 is a must!
00040  */
00041 #define NUM_SECTION_FILTERS_MINIMUM    8
00042 #define NUM_SECTION_FILTERS_DEFAULT    512
00043 #define NUM_SECTION_FILTERS_MAXIMUM    1024
00044 
00045 
00046 /* ----------- Section Filter Priorities --------- */
00047 
00048 /* For DSM-CC sections currently with LOW priority */
00049 #define SF_PRIORITY_LOW    ((clDsmSFPriority_t)0)
00050 
00051 /* For DSM-CC sections currently with HIGH priority
00052  * Must be given in preference to any low priority */
00053 #define SF_PRIORITY_HIGH   ((clDsmSFPriority_t)1)
00054 
00055 /* For DSM-CC sections currently with DIRECT priority
00056  * This is where DSM-CC requires that the section should
00057  * come direct from transport stream and NOT from any cache
00058  * It should be treated as high priority, but not
00059  * necessarily in preference to normal high priority filter */
00060 #define SF_PRIORITY_DIRECT ((clDsmSFPriority_t)3)
00061 
00062 /*--------------------------------------------------*/
00063 
00064 /*---Enumerations for public use---------------------------------------------*/
00065 
00066 /*---Global type defs for public use-----------------------------------------*/
00067 
00068 /* -- DSM-CC ERROR CODES -- */
00069 
00070 typedef enum {
00071 /* 0*/  CLDSM_OK = 0,
00072 /* 1*/  CLDSM_PENDING,
00073 /* 2*/  CLDSM_DUPLICATE_REQUEST,
00074 /* 3*/  CLDSM_ERR_END_OF_DATA,
00075 /* 4*/  CLDSM_ERR_INTERNAL,
00076 /* 5*/  CLDSM_ERR_ABORTED,
00077 /* 6*/  CLDSM_ERR_MEM_HEAP_FULL,
00078 /* 7*/  CLDSM_ERR_ALLOC_FAILED,
00079 /* 8*/  CLDSM_ERR_ILLEGAL_SETUP,
00080 /* 9*/  CLDSM_ERR_ILLEGAL_PARAMETER,
00081 /*10*/  CLDSM_ERR_INVALID_INSTANCE,
00082 /*11*/  CLDSM_ERR_INVALID_CAROUSEL_HANDLE,
00083 /*12*/  CLDSM_ERR_CAROUSEL_LOAD_FAILED,
00084 /*13*/  CLDSM_ERR_CAROUSEL_NOT_BOOTED,
00085 /*14*/  CLDSM_ERR_CAROUSELS_STILL_LOADED,
00086 /*15*/  CLDSM_ERR_INVALID_OBJECT_HANDLE,
00087 /*16*/  CLDSM_ERR_INVALID_OBJECT_TYPE,
00088 /*17*/  CLDSM_ERR_INVALID_PATHNAME,
00089 /*18*/  CLDSM_ERR_INVALID_CACHING_RULES,
00090 /*19*/  CLDSM_ERR_LOAD_FAILED,
00091 /*20*/  CLDSM_ERR_OPEN_OBJECT_LIMIT,
00092 /*21*/  CLDSM_ERR_OBJECT_NOT_LOADED,
00093 /*22*/  CLDSM_ERR_OBJECT_OPEN,
00094 /*23*/  CLDSM_ERR_OBJECT_NOT_OPEN,
00095 /*24*/  CLDSM_ERR_OBJECTS_STILL_LOADED,
00096 /*25*/  CLDSM_ERR_INVALID_STREAM_EVENT_NAME,
00097 /*26*/  CLDSM_ERR_INVALID_STREAM_EVENT_HANDLE,
00098 /*27*/  CLDSM_ERR_STREAM_EVENTS_STILL_SUBSCRIBED,
00099 /*28*/  CLDSM_ERR_NO_STREAM_EVENT_NOTIFY_CALLBACK,
00100 /*29*/  CLDSM_ERR_SI_QUERY_FAILED,
00101 /*30*/  CLDSM_ERR_INVALID_SI_INFO,
00102 /*31*/  CLDSM_ERR_INVALID_SIQUERY_STATUS,
00103 /*32*/  CLDSM_ERR_INVALID_SI_QUERY_REF,
00104 /*33*/  CLDSM_ERR_SYSTEM_ADD_SECTION_FILTER,
00105 /*34*/  CLDSM_ERR_SECTION_FILTER_HEAP_FULL,
00106 /*35*/  CLDSM_ERR_MODULE_TOO_LARGE,
00107 /*36*/  CLDSM_ERR_MODULE_ACQUISITION_FAILURE,
00108 /*37*/  CLDSM_ERR_UNABLE_TO_GET_PROGRAM_ASSOC_TAG,
00109 /*38*/  CLDSM_ERR_NO_CURRENT_SERVICE_SET,
00110 /*39*/  CLDSM_ERR_MEMMGR_START_PROBLEM,
00111 /*40*/  CLDSM_ERR_MEMMGR_STOP_PROBLEM,
00112 /*41*/  CLDSM_ERR_INSTANCE_NOT_RESET,
00113 /*42*/  CLDSM_ERR_RECURSION_LIMIT_REACHED,
00114 /*43*/  CLDSM_ERR_TIMER_FAILURE,
00115 /*44*/  CLDSM_ERR_SI_SUBSCRIBE_FAILURE,
00116 /*45*/  CLDSM_ERR_CAROUSEL_UNAVAILABLE,
00117 
00118 } clDsmErr_t, *pclDsmErr_t;
00119 
00120 /* -- DSM-CC INSTANCE HANDLE -- */
00121 
00122 typedef struct _clDsmInstanceHandle_struct*     clDsmInstHandle_t;
00123 
00124 
00125 /* -- SECTION FILTER TYPES -- */
00126 
00127 typedef U32BIT clDsmSFRef_t;
00128 typedef U8BIT  clDsmSFPriority_t;
00129 
00130 /*
00131 -- Structure definition for Section Filter data
00132 --
00133 -- PID            ->  MPEG2 PID
00134 --
00135 -- filterPriority ->  direct, high or low
00136 --
00137 -- tableId        ->  DSM-CC tableId filter value for sections (byte 0).
00138 --                    NB. Only the tableId values of 0x3B, 0x3C, 0x3D will
00139 --                    be used for DSM-CC section filters.
00140 --
00141 -- tableIdExt     ->  DSM-CC tableIdExtension filter value (bytes 3&4)
00142 --
00143 -- tableIdExtMask ->  DSM-CC active filter bits.
00144 --                    NB.'Wildcard' bitmasks will only be set on contiguous
00145 --                    bits starting at LSBit.
00146 --
00147 */
00148 typedef struct {
00149     U16BIT              pid;
00150     clDsmSFPriority_t   priority;
00151     U8BIT               tableId;
00152     U16BIT              tableIdExt;
00153     U16BIT              tableIdExtMask;
00154 } clDsmSFilter_t, *pclDsmSFilter_t;
00155 
00156 typedef struct s_SfmInstance *H_SfmInstance;
00157 
00158 /* -- SI QUERY TYPES -- */
00159 
00160 typedef struct _clDsmSIQueryRef_struct* clDsmSIQueryRef_t;
00161 
00162 typedef enum {
00163    /* Following are supplied to startSIQueryFunc() and
00164     * returned in successful query result */
00165    SIQUERY_PID,
00166    SIQUERY_BOOT_CAROUSEL,
00167    SIQUERY_CAROUSEL,
00168    SIQUERY_PIDLIST,
00169    SIQUERY_DEFERRED_SERVICE,
00170    SIQUERY_CAROUSEL_INFO,
00171    SIQUERY_FIND_CAROUSEL,
00172 
00173    /* Below are used in query result when not success - used in
00174     * return from startSIQueryFunc() or
00175     * asynchronous callback to clDsmSysProcessSIQueryEvent()
00176     */
00177    SIRESULT_PENDING,
00178    SIRESULT_FAILURE
00179 
00180 } clDsmSIQueryKind_t, *pclDsmSIQueryKind_t;
00181 
00182 
00183 typedef struct {
00184 
00185     clDsmSIQueryKind_t kind;
00186 
00187     U16BIT  serviceId;
00188 
00189     union {
00190        U8BIT   componentTag;
00191        U16BIT  associationTag;
00192        U32BIT  carouselId;
00193     } data;
00194 
00195 } clDsmSIQuery_t, *pclDsmSIQuery_t;
00196 
00197 
00198 typedef struct {
00199     U16BIT  pid;
00200     U16BIT  associationTag;
00201     U32BIT  carouselId;
00202     /*TODO: ?Format Id?*/
00203 } clDsmCarouselInfo_t, *pclDsmCarouselInfo_t;
00204 
00205 
00206 typedef struct {
00207 
00208    clDsmSIQueryKind_t kind;
00209 
00210    union {
00211       U16BIT               pid;
00212       clDsmCarouselInfo_t  carouselInfo;
00213       S_DvbLocator         deferredService;
00214       /* For when query start returns CLDSM_PENDING */
00215       void*                queryHandle;
00216    } data;
00217 
00218 } clDsmSIQueryResult_t, *pclDsmSIQueryResult_t;
00219 
00220 
00221 /* -- SI change event -- */
00222 typedef enum {
00223     SICHANGE_SERVICE_DELETED,
00224     SICHANGE_SERVICE_UPDATED,
00225     SICHANGE_CAROUSEL_DELETED
00226 } clDsmSIChangeEvent_t, *pclDsmSIChangeEvent_t;
00227 
00228 typedef struct s_SiqInstance *H_SiqInstance;
00229 
00230 
00231 #endif /* _CLDSMTYPES_H_ */
 All Data Structures Files Functions Typedefs