MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5streamer.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 _MH5STREAMER_H_
26 #define _MH5STREAMER_H_
27 
28 /*---includes for this file--------------------------------------------------*/
29 #include "mh5base.h"
30 #include "mh5stream.h"
31 #include "mh5program.h"
32 #include "mherrors.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 {
42  MHEG5_STREAMER_EVENT_HTTP_HEADERS_DONE,
43  MHEG5_STREAMER_EVENT_HTTP_DOWNLOAD_DONE,
44  MHEG5_STREAMER_EVENT_MSP_DOWNLOAD_DONE,
45  MHEG5_STREAMER_EVENT_TASK_STREAM_UNDERFLOW,
46  MHEG5_STREAMER_EVENT_TASK_STREAM_UNDERFLOW_RESUME,
47  MHEG5_STREAMER_EVENT_TASK_STREAM_PLAYING,
48  MHEG5_STREAMER_EVENT_TASK_STREAM_STOPPED,
49  MHEG5_STREAMER_EVENT_CONTENT_AVAILABLE,
50  MHEG5_STREAMER_EVENT_COUNTER_TRIGGER
51 } MHEG5StreamerEventType;
52 
53 /*---Global variable declarations for public use-----------------------------*/
54 
55 /*---Global Function prototypes for public use-------------------------------*/
56 
64 E_MhegErr MHEG5StreamerOpen(void *buffer, U32BIT size, U32BIT taskPriority);
65 
70 void MHEG5StreamerReset(void);
71 
72 
78 void MHEG5StreamerPrepare(MHEG5Stream *stream);
79 
80 
87 
88 
96 
97 
105 
106 
114 
115 
126 void MHEG5StreamerSetCounterTrigger(MHEG5Stream *stream, S32BIT triggerId,
127  S32BIT newValue);
128 
129 
137 
138 
144 void MHEG5StreamerRun(MHEG5Stream *stream);
145 
146 
152 void MHEG5StreamerStop(MHEG5Stream *stream);
153 
154 
160 void MHEG5StreamerPause(MHEG5Stream *stream);
161 
162 
168 void MHEG5StreamerResume(MHEG5Stream *stream);
169 
170 
177 BOOLEAN MHEG5StreamerIsRunable(MHEG5Stream *stream);
178 
179 
185 void MHEG5StreamerRemove(MHEG5Stream *stream);
186 
187 
195 
196 
204 
213 void MHEG5StreamerMeasurePerformance(MHEG5String *url, MHEG5Int maxBytes,
214  MHEG5Program *program);
215 
216 
223 
224 
231 void MHEG5StreamerSetActiveState(BOOLEAN activeState);
232 
233 
238 void MHEG5StreamerClose(void);
239 
246 
251 void MHEG5StreamerRefresh(void);
252 
253 #endif /*_MH5STREAMER_H*/
void MHEG5StreamerResume(MHEG5Stream *stream)
Resume IP content streaming after it was paused by MHEG5StreamerPause.
Basis MHEG5 data types.
void MHEG5StreamerSetCounterPosition(MHEG5Stream *stream)
Set the counter position of a stream in the streamer. This function uses the counter position as set ...
void MHEG5StreamerNotifyStreamStopped(MHEG5Stream *stream)
Notify that a stream has stopped. This notification comes from the audio/video deocder.
void MHEG5StreamerPrepare(MHEG5Stream *stream)
Prepare for retrieval of a stream from the IP connection.
Definition: mh5base.h:82
void MHEG5StreamerSetCounterEndPosition(MHEG5Stream *stream)
Set the counter end position of a stream in the streamer. This function uses the counter end position...
Implement the MHEG5 Stream Class Stream Class Defines the behaviour of a composition of continuous me...
Implement the MHEG5 Program Class Defines means to handle execution of external pieces of procedural ...
void MHEG5StreamerAbortMeasurement(MHEG5Program *program)
Abort streaming performance measurement.
void MHEG5StreamerSetActiveState(BOOLEAN activeState)
Set the active state of the streamer. When it is not active, it is allowed to buffer data but not to ...
MHEG5 engine interface error codes.
S32BIT MHEG5StreamerGetCounterPosition(MHEG5Stream *stream)
Return the current counter position (in units of 188 bytes).
void MHEG5StreamerMeasurePerformance(MHEG5String *url, MHEG5Int maxBytes, MHEG5Program *program)
Measure streaming performance (bytes per second). The result is returned to the resident program...
void MHEG5StreamerStop(MHEG5Stream *stream)
Stop streaming IP content.
void MHEG5streamerNotifyStreamingReady(void)
Handle notification that the external application is ready to handle IP stream data.
S32BIT MHEG5StreamerGetCounterMaxPosition(MHEG5Stream *stream)
Return the counter maximum position (content length in units of 188 bytes).
Definition: mh5stream.h:62
BOOLEAN MHEG5StreamerIsRunable(MHEG5Stream *stream)
Check that stream is runable (i.e. MHEG5StreamerPrepare has been called for it)
void MHEG5StreamerNotifyStreamStarted(MHEG5Stream *stream)
Notify that a stream has started. This notification comes from the audio/video deocder.
void MHEG5StreamerRefresh(void)
Refresh any running IC streams - called when user preferences have changed.
void MHEG5StreamerClose(void)
Close the IC streaming module.
Definition: mh5program.h:44
void MHEG5StreamerRemove(MHEG5Stream *stream)
Remove streaming IP request.
void MHEG5StreamerRun(MHEG5Stream *stream)
Start streaming IP content for a prepared request.
void MHEG5StreamerSetCounterTrigger(MHEG5Stream *stream, S32BIT triggerId, S32BIT newValue)
Add, remove or update a counter trigger for the stream. If the trigger does not exist, it will be added. If it already exists it will be updated if the new value is non-negative, otherwise it will be removed.
void MHEG5StreamerPause(MHEG5Stream *stream)
Pause IP content streaming.
void MHEG5StreamerReset(void)
Reset the IC streaming module.
E_MhegErr MHEG5StreamerOpen(void *buffer, U32BIT size, U32BIT taskPriority)
Open the IC streaming module.