MHEG5  18.9.0
MHEG5 Documentation
stmr_queue.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2010 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 _STMR_QUEUE_H_
26 #define _STMR_QUEUE_H_
27 
28 /*---includes for this file--------------------------------------------------*/
29 
30 #include "techtype.h"
31 #include "mherrors.h"
32 #include "stmr_util.h"
33 
34 /*---Constant and macro definitions for public use---------------------------*/
35 
36 /*---Enumerations for public use---------------------------------------------*/
37 
38 /*---Global type defs for public use-----------------------------------------*/
39 
40 typedef enum
41 {
45 
46 typedef struct sMHEG5QueueItem
47 {
60 
61 /*---Global variable declarations for public use-----------------------------*/
62 
63 /*---Global Function prototypes for public use-------------------------------*/
64 
65 
73 
74 
83 
84 
91 
92 
100 
101 
109 
110 
121 void MHEG5QueueUpdateItem(MHEG5QueueItem *item, U32BIT processed);
122 
123 
132 
133 
139 
140 
147 
148 
153 void MHEG5QueueDisableStreaming(void);
154 
155 
161 
162 
169 
170 
178 
179 
184 void MHEG5QueueReleaseAllItems(void);
185 
186 
194  U64BIT base,
196  U32BIT len,
197  BOOLEAN last));
198 
199 
207  U64BIT base,
209  U32BIT len,
210  BOOLEAN last));
211 
212 
217 void MHEG5QueueTerm(void);
218 
219 
220 #endif /*_STMR_QUEUE_H*/
void MHEG5QueueUpdateItem(MHEG5QueueItem *item, U32BIT processed)
Update the number of bytes processed in a queue item. The same item will be returned by the next call...
Definition: stmr_queue.c:406
BOOLEAN MHEG5QueueIsValidItem(MHEG5QueueItem *item)
Tell whether the item returned by MHEG5QueueGetHeadItem is valid. If the item is invalid, then streaming is disabled.
Definition: stmr_queue.c:384
Utilitiy functions for IC Streamer.
U32BIT MHEG5QueueGetBufferedBytes(void)
Return number of buffered bytes in the queue (regardless of request)
Definition: stmr_queue.c:570
MHEG5QueueItem * MHEG5QueueAllocItem(U32BIT requestId, U32BIT len)
Allocate a new queue item and initialise with request ID and block length.
Definition: stmr_queue.c:241
void MHEG5QueueRegisterReleaseCallback(void(*callback)(U32BIT requestId, U64BIT base, U64BIT position, U32BIT len, BOOLEAN last))
Register notification callback for item release events. If a callback is already registered for the e...
Definition: stmr_queue.c:786
void MHEG5QueueTerm(void)
Terminate queue manager.
Definition: stmr_queue.c:799
E_MhegErr
Definition: mherrors.h:28
struct sMHEG5QueueItem * next
Definition: stmr_queue.h:48
MHEG5 engine interface error codes.
U16BIT referenceCount
Definition: stmr_queue.h:58
U32BIT timestamp
Definition: stmr_queue.h:56
uint8_t U8BIT
Definition: techtype.h:82
U64BIT position
Definition: stmr_queue.h:54
void MHEG5QueueReleaseAllItems(void)
Release all queue items - clear the queue completely.
Definition: stmr_queue.c:749
void MHEG5QueueReleaseRequestItems(U32BIT requestId)
Release all queue items that are related to a given request.
Definition: stmr_queue.c:636
void MHEG5QueueEnableStreaming(U32BIT requestId)
Allow streaming data from the queue.
Definition: stmr_queue.c:584
uint16_t U16BIT
Definition: techtype.h:84
System Wide Global Technical Data Type Definitions.
BOOLEAN MHEG5QueueIsStreamingEnabled(void)
Tell whether streaming is enabled.
Definition: stmr_queue.c:626
BOOLEAN last
Definition: stmr_queue.h:57
U32BIT requestId
Definition: stmr_queue.h:49
struct sMHEG5QueueItem MHEG5QueueItem
void MHEG5QueueInsertItem(MHEG5QueueItem *item)
Insert a queue item into the queue.
Definition: stmr_queue.c:279
Definition: mg_png.c:52
void MHEG5QueueReleaseItems(U32BIT requestId, U64BIT marker)
Release queue items that are related to a given request up to a marker.
Definition: stmr_queue.c:680
MHEG5QueueItem * MHEG5QueueGetHeadItem(void)
Return the item at the head of the queue (the next item to consume). The function returns an "invalid...
Definition: stmr_queue.c:336
U8BIT BOOLEAN
Definition: techtype.h:99
U8BIT * data
Definition: stmr_queue.h:51
U32BIT downloadId
Definition: stmr_queue.h:50
MHEG5QueueEvent_t
Definition: stmr_queue.h:40
E_MhegErr MHEG5QueueInit(U8BIT *buffer, U32BIT bufferSize)
Initialise queue manager.
Definition: stmr_queue.c:128
void MHEG5QueueReleaseItem(MHEG5QueueItem *item)
Release an item from the queue. If the item is no longer in the queue (because the queue has been cle...
Definition: stmr_queue.c:477
uint32_t U32BIT
Definition: techtype.h:86
void MHEG5QueueDisableStreaming(void)
Do not allow streaming data from the queue.
Definition: stmr_queue.c:609
void MHEG5QueueRegisterInsertCallback(void(*callback)(U32BIT downloadId, U64BIT base, U64BIT position, U32BIT len, BOOLEAN last))
Register notification callback for item insertion event. If a callback is already registered for the ...
Definition: stmr_queue.c:771