MHEG5  22.11.0
glue_queue.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2011 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 #ifndef _GLUE_QUEUE_H
26 #define _GLUE_QUEUE_H
27 
28 #include "mherrors.h"
29 #include "dvb_misc.h"
30 #include "mheg5_control.h"
31 #include "mheg5_keypress.h"
32 #include "dvbevents.h"
33 #include "dmxtype.h"
34 #include "dvblocator.h"
35 #include "fs_types.h"
36 #include "dtvstring.h"
37 #ifndef CI_PLUS_ONLY
38 #include "dsm_types.h"
39 #endif
40 #include "mh5queue.h"
41 
42 typedef void (*F_QueueNotify)( void );
43 
44 typedef enum
45 {
46  PRTY_CRITICAL,
47  PRTY_HIGH,
48  PRTY_NORMAL,
49  PRTY_LOW,
50  PRTY_INVALID
51 } E_PRIORITY;
52 
53 typedef enum
54 {
55  DT_NONE,
56  DT_VALUE,
57  DT_ALLOC,
58  DT_CONTENT,
59  DT_D_CONTENT,
60  DT_F_CONTENT,
61  DT_S_CONTENT
62 } E_DATA_TYPE;
63 
69 typedef void (*F_MSG_PROCESS)( void *data );
70 
71 /* MHEG5StartEvent parameters. */
72 typedef struct s_StartDsmApp
73 {
74  S32BIT serviceIndex;
76 
77 typedef struct s_keypressevent
78 {
79  E_MHEG5_KEY key;
81 
82 #ifndef CI_PLUS_ONLY
83 typedef struct s_DsmccEvent
84 {
85  U32BIT id;
86  H_ObjCarousel hCarousel;
87 } S_DsmccEvent;
88 
89 typedef struct s_StreamEvent
90 {
91  U_PARAM unique;
92  U8BIT *name;
94 #endif
96 typedef struct s_CiStart
97 {
98  S_STRING name;
99  U32BIT module_id;
100 } S_CiStart;
101 
102 typedef struct s_CiStop
103 {
104  U32BIT module_id;
105  U8BIT code;
106 } S_CiStop;
107 
108 /* MHEG5StopEvent parameters. */
110 {
111  U8BIT action;
113 
114 /* MHEG5ResetScreenEvent params */
116 {
117  U16BIT screenWidth;
118  U16BIT screenHeight;
119  E_MhegErr *pResult;
121 
122 /* MHEG5TimerEvent parameters. */
124 {
125  BOOLEAN triggered;
126  void *callerRef;
127  void *timerHandle;
129 
130 typedef struct s_fileAck
131 {
132  S_CONTENT content;
133  E_FsStatus status;
135 
136 /* MHEG5CiFileAcknowledgeEvent parameters. */
138 {
139  /* structure is same format as S_CONTENT */
140  U32BIT fileSize;
141  U8BIT *pFileData;
142  F_DESTROY clr_func;
143  FS_HANDLE clr_hdl;
144  BOOLEAN fileOK;
146 
147 #ifdef INCLUDE_IC
148 /* MHEG5HttpResponseEvent parameters. */
149 typedef struct MHEG5HttpResponseEventParams_tag
150 {
151  U32BIT len;
152  U8BIT *data;
153  U32BIT requestId;
154  U32BIT status;
155  U32BIT code;
156  U8BIT requestType;
157 } MHEG5HttpResponseEventParams_t;
158 
159 #ifdef INCLUDE_ICS
160 /* MHEG5StreamerEvent parameters. */
161 typedef struct MHEG5StreamerEventParams_tag
162 {
163  U32BIT requestId;
164  U32BIT eventType;
165  U32BIT status;
166  U32BIT code;
167  S32BIT triggerId;
168 } MHEG5StreamerEventParams_t;
169 #endif /* INCLUDE_ICS */
170 
171 #endif /* INCLUDE_IC */
172 
174 {
175  U8BIT blockSize;
176  U8BIT blocks;
177  BOOLEAN group;
178  U16BIT identifier;
180 
181 typedef struct s_dvpeventtype
182 {
183  E_DvbEvent eType;
184  U32BIT eData;
186 
187 #ifdef SURFACE_THRESHOLD
188 typedef struct MHEG5SurfaceThresholdEventParams_tag
189 {
190  S32BIT pixels;
191 } MHEG5SurfaceThresholdEventParams_t;
192 #endif
193 
194 /* Event parameters. */
195 typedef struct s_mhg_message
196 {
197  F_MSG_PROCESS proc_msg_func;
198  E_DATA_TYPE data_type;
199  union
200  {
201  S_CONTENT content;
202  S_STRING string;
203  S_CiStart ciStart;
204  S_CiStop ciStop;
205  S_DvpEventType dvpEvent;
206  S_KeyPressEvent keypress;
207  S_FileSystemAck fsAck;
208  S_StartDsmApp start;
209  E_ENGINE_EVENT engineEvent;
212  MHEG5CiFileAcknowledgeEventParams_t ciFileAcknowledge;
213  #ifndef CI_PLUS_ONLY
214  S_DsmccEvent dsmEvent;
215  S_StreamEvent streamEvent;
216  #endif
217  #ifdef INCLUDE_IC
218  MHEG5HttpResponseEventParams_t httpResponse;
219  #ifdef INCLUDE_ICS
220  MHEG5StreamerEventParams_t streamer;
221  #endif /* INCLUDE_ICS */
222  #endif /* INCLUDE_IC */
224  #ifdef INCLUDE_FREESAT
225  MHEG5FsStorageParams_t fsStorage;
226  #endif
227  #ifdef SURFACE_THRESHOLD
228  MHEG5SurfaceThresholdEventParams_t surfaceThreshold;
229  #endif
230  } data;
232 
242 E_MhegErr VQ_Open( S_MhegConfig *cfg_params );
243 
244 
250 void VQ_Close(void);
251 
262 E_MhegErr VQ_PutMsg( S_MhegMessage *pMsg, E_PRIORITY priority );
263 
264 
273 E_MhegErr VQ_GetMsg( S_MhegMessage *pElem );
274 
281 U16BIT VQ_GetSizeFree( E_PRIORITY priority );
282 
287 BOOLEAN VQ_EventNeedsProcessing( void );
288 
294 void* VQ_RegisterNotify( F_QueueNotify normal_rcvd, F_QueueNotify critical_rcvd,
295  F_QueueNotify critical_done );
296 
301 void VQ_UnRegisterNotify( void *qn );
302 
303 #endif /*_GLUE_QUEUE_H*/
E_MhegErr VQ_PutMsg(S_MhegMessage *pMsg, E_PRIORITY priority)
Post event or section message on queue. Copies data into queue.
Definition: glue_queue.c:251
Definition: glue_queue.h:137
Define MHEG5 String type.
U16BIT VQ_GetSizeFree(E_PRIORITY priority)
Get size available on a queue.
Definition: glue_queue.c:437
Definition: glue_queue.h:130
Define Demux type.
Definition: dtvstring.h:28
void(* F_QueueNotify)(void)
Definition: glue_queue.h:42
BOOLEAN VQ_EventNeedsProcessing(void)
Check whether any events on component queues needs processing.
Definition: glue_queue.c:460
Definition: fs_types.h:62
Definition: glue_queue.h:181
Definition: glue_queue.h:115
Definition: glue_queue.h:77
MHEG5 engine interface error codes.
void(* F_MSG_PROCESS)(void *data)
Function to Process voyager message.
Definition: glue_queue.h:69
Definition: glue_queue.h:96
File System types.
void VQ_Close(void)
Close component control and section queue component. Destroys all allocated memory and resources for ...
Definition: glue_queue.c:143
Definition: glue_queue.h:89
This file provides the control interface for MHEG5 engine. The use of this component MUST comply with...
void * VQ_RegisterNotify(F_QueueNotify normal_rcvd, F_QueueNotify critical_rcvd, F_QueueNotify critical_done)
Definition: glue_queue.c:510
struct s_CiStart S_CiStart
Definition: glue_queue.h:102
MHEG5ResetResolutionParams_t resetRes
Definition: glue_queue.h:223
Definition: glue_queue.h:123
E_MhegErr VQ_GetMsg(S_MhegMessage *pElem)
Get an event or section from the component queues. This is a blocking function.
Definition: glue_queue.c:344
E_MhegErr VQ_Open(S_MhegConfig *cfg_params)
Initialise component control and section queues. Allocates memory for, sets up and creates event (com...
Definition: glue_queue.c:96
Definition: mheg5_control.h:152
Definition: fs_types.h:46
Key press interface with MHEG5 engine.
Definition of DVB locator and DVB component types.
Definition: glue_queue.h:173
void VQ_UnRegisterNotify(void *qn)
Definition: glue_queue.c:533
Definition of events sent to MHEG5 engine.
Definition: glue_queue.h:109
References: [1] UK1 Profile - Digital Terrestrial Television - Requirements for interoperability (The...
Definition: glue_queue.h:83
Definition: glue_queue.h:72
Definition: glue_queue.h:195