MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
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 #include "glue_type.h"
42 
43 typedef void (*F_QueueNotify)( void );
44 
45 typedef enum
46 {
47  PRTY_CRITICAL,
48  PRTY_HIGH,
49  PRTY_NORMAL,
50  PRTY_LOW,
51  PRTY_INVALID
52 } E_PRIORITY;
53 
54 typedef enum
55 {
56  DT_NONE,
57  DT_VALUE,
58  DT_ALLOC,
59  DT_CONTENT,
60  DT_D_CONTENT,
61  DT_F_CONTENT,
62  DT_S_CONTENT
63 } E_DATA_TYPE;
64 
70 typedef void (*F_MSG_PROCESS)( void *data );
71 
72 /* MHEG5StartEvent parameters. */
73 typedef struct s_StartDsmApp
74 {
75  S32BIT serviceIndex;
77 
78 typedef struct s_keypressevent
79 {
80  E_MHEG5_KEY key;
82 
83 #ifndef CI_PLUS_ONLY
84 typedef struct s_DsmccEvent
85 {
86  U32BIT id;
87  H_ObjCarousel hCarousel;
88 } S_DsmccEvent;
89 
90 typedef struct s_StreamEvent
91 {
92  U_PARAM unique;
93  U8BIT *name;
95 #endif
97 typedef struct s_CiStart
98 {
99  S_STRING name;
100  U32BIT module_id;
101 } S_CiStart;
102 
103 typedef struct s_CiStop
104 {
105  U32BIT module_id;
106  U8BIT code;
107 } S_CiStop;
108 
109 /* MHEG5StopEvent parameters. */
111 {
112  U8BIT action;
114 
115 /* MHEG5ResetScreenEvent params */
117 {
118  U16BIT screenWidth;
119  U16BIT screenHeight;
120  E_MhegErr *pResult;
122 
123 /* MHEG5TimerEvent parameters. */
125 {
126  BOOLEAN triggered;
127  void *callerRef;
128  void *timerHandle;
130 
131 typedef struct s_fileAck
132 {
133  S_CONTENT content;
134  E_FsStatus status;
136 
137 /* MHEG5CiFileAcknowledgeEvent parameters. */
139 {
140  /* structure is same format as S_CONTENT */
141  U32BIT fileSize;
142  U8BIT *pFileData;
143  F_DESTROY clr_func;
144  FS_HANDLE clr_hdl;
145  BOOLEAN fileOK;
147 
148 #ifdef INCLUDE_IC
149 /* MHEG5HttpResponseEvent parameters. */
150 typedef struct MHEG5HttpResponseEventParams_tag
151 {
152  U32BIT len;
153  U8BIT *data;
154  U32BIT requestId;
155  U32BIT status;
156  U32BIT code;
157  U8BIT requestType;
158 } MHEG5HttpResponseEventParams_t;
159 
160 #ifdef INCLUDE_ICS
161 /* MHEG5StreamerEvent parameters. */
162 typedef struct MHEG5StreamerEventParams_tag
163 {
164  U32BIT requestId;
165  U32BIT eventType;
166  U32BIT status;
167  U32BIT code;
168  S32BIT triggerId;
169 } MHEG5StreamerEventParams_t;
170 #endif /* INCLUDE_ICS */
171 
172 #endif /* INCLUDE_IC */
173 
175 {
176  U8BIT blockSize;
177  U8BIT blocks;
178  BOOLEAN group;
179  U16BIT identifier;
181 
182 typedef struct s_dvpeventtype
183 {
184  E_DvbEvent eType;
185  U32BIT eData;
187 
188 #ifdef SURFACE_THRESHOLD
189 typedef struct MHEG5SurfaceThresholdEventParams_tag
190 {
191  S32BIT pixels;
192 } MHEG5SurfaceThresholdEventParams_t;
193 #endif
194 
195 /* Event parameters. */
196 typedef struct s_mhg_message
197 {
198  F_MSG_PROCESS proc_msg_func;
199  E_DATA_TYPE data_type;
200  union
201  {
202  S_CONTENT content;
203  S_STRING string;
204  S_CiStart ciStart;
205  S_CiStop ciStop;
206  S_DvpEventType dvpEvent;
207  S_KeyPressEvent keypress;
208  S_FileSystemAck fsAck;
209  S_StartDsmApp start;
210  E_ENGINE_EVENT engineEvent;
213  MHEG5CiFileAcknowledgeEventParams_t ciFileAcknowledge;
214  #ifndef CI_PLUS_ONLY
215  S_DsmccEvent dsmEvent;
216  S_StreamEvent streamEvent;
217  #endif
218  #ifdef INCLUDE_IC
219  MHEG5HttpResponseEventParams_t httpResponse;
220  #ifdef INCLUDE_ICS
221  MHEG5StreamerEventParams_t streamer;
222  #endif /* INCLUDE_ICS */
223  #endif /* INCLUDE_IC */
225  #ifdef INCLUDE_FREESAT
226  MHEG5FsStorageParams_t fsStorage;
227  #endif
228  #ifdef SURFACE_THRESHOLD
229  MHEG5SurfaceThresholdEventParams_t surfaceThreshold;
230  #endif
231  } data;
233 
243 E_MhegErr VQ_Open( S_MhegConfig *cfg_params );
244 
245 
251 void VQ_Close(void);
252 
263 E_MhegErr VQ_PutMsg( S_MhegMessage *pMsg, E_PRIORITY priority );
264 
265 
274 E_MhegErr VQ_GetMsg( S_MhegMessage *pElem );
275 
282 U16BIT VQ_GetSizeFree( E_PRIORITY priority );
283 
288 BOOLEAN VQ_EventNeedsProcessing( void );
289 
295 void* VQ_RegisterNotify( F_QueueNotify normal_rcvd, F_QueueNotify critical_rcvd,
296  F_QueueNotify critical_done );
297 
302 void VQ_UnRegisterNotify( void *qn );
303 
304 #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:248
Definition: glue_queue.h:138
Define MHEG5 String type.
U16BIT VQ_GetSizeFree(E_PRIORITY priority)
Get size available on a queue.
Definition: glue_queue.c:434
Definition: glue_queue.h:131
Define Demux type.
Definition: dtvstring.h:28
BOOLEAN VQ_EventNeedsProcessing(void)
Check whether any events on component queues needs processing.
Definition: glue_queue.c:457
Definition: fs_types.h:52
Definition: glue_queue.h:182
Definition: glue_queue.h:116
Definition: glue_queue.h:78
MHEG5 engine interface error codes.
Definition: glue_queue.h:97
File System types.
Type definitions for glue module.
void VQ_Close(void)
Close component control and section queue component. Destroys all allocated memory and resources for ...
Definition: glue_queue.c:140
Definition: glue_queue.h:90
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:507
struct s_CiStart S_CiStart
Definition: glue_queue.h:103
Definition: glue_queue.h:124
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:341
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: glue_type.h:36
Key press interface with MHEG5 engine.
Definition of DVB locator and DVB component types.
MHEG5ResetResolutionParams_t resetRes
Definition: glue_queue.h:224
Definition: glue_queue.h:174
void VQ_UnRegisterNotify(void *qn)
Definition: glue_queue.c:530
Definition of events sent to MHEG5 engine.
Definition: glue_queue.h:110
References: [1] UK1 Profile - Digital Terrestrial Television - Requirements for interoperability (The...
Definition: glue_queue.h:84
void(* F_QueueNotify)(void)
Definition: glue_queue.h:43
Definition: glue_queue.h:73
Definition: glue_queue.h:196
void(* F_MSG_PROCESS)(void *data)
Function to Process voyager message.
Definition: glue_queue.h:70