MHEG5  15.3.0
source/ics/inc/mh5streamer.h File Reference

API for IC streamer. More...

#include "mh5base.h"
#include "mh5stream.h"
#include "mh5program.h"
#include "mherrors.h"

Go to the source code of this file.

Enumerations

enum  MHEG5StreamerEventType {
  MHEG5_STREAMER_EVENT_HTTP_HEADERS_DONE, MHEG5_STREAMER_EVENT_HTTP_DOWNLOAD_DONE, MHEG5_STREAMER_EVENT_MSP_DOWNLOAD_DONE, MHEG5_STREAMER_EVENT_TASK_STREAM_UNDERFLOW,
  MHEG5_STREAMER_EVENT_TASK_STREAM_UNDERFLOW_RESUME, MHEG5_STREAMER_EVENT_TASK_STREAM_PLAYING, MHEG5_STREAMER_EVENT_TASK_STREAM_STOPPED, MHEG5_STREAMER_EVENT_CONTENT_AVAILABLE,
  MHEG5_STREAMER_EVENT_COUNTER_TRIGGER
}

Functions

E_MhegErr MHEG5StreamerOpen (void *buffer, U32BIT size, U32BIT taskPriority)
 Open the IC streaming module.
void MHEG5StreamerReset (void)
 Reset the IC streaming module.
void MHEG5StreamerPrepare (MHEG5Stream *stream)
 Prepare for retrieval of a stream from the IP connection.
S32BIT MHEG5StreamerGetCounterPosition (MHEG5Stream *stream)
 Return the current counter position (in units of 188 bytes).
void MHEG5StreamerSetCounterPosition (MHEG5Stream *stream)
 Set the counter position of a stream in the streamer. This function uses the counter position as set in the stream object.
void MHEG5StreamerSetCounterEndPosition (MHEG5Stream *stream)
 Set the counter end position of a stream in the streamer. This function uses the counter end position as set in the stream object.
S32BIT MHEG5StreamerGetCounterMaxPosition (MHEG5Stream *stream)
 Return the counter maximum position (content length in units of 188 bytes).
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 MHEG5StreamerRun (MHEG5Stream *stream)
 Start streaming IP content for a prepared request.
void MHEG5StreamerStop (MHEG5Stream *stream)
 Stop streaming IP content.
void MHEG5StreamerPause (MHEG5Stream *stream)
 Pause IP content streaming.
void MHEG5StreamerResume (MHEG5Stream *stream)
 Resume IP content streaming after it was paused by MHEG5StreamerPause.
BOOLEAN MHEG5StreamerIsRunable (MHEG5Stream *stream)
 Check that stream is runable (i.e. MHEG5StreamerPrepare has been called for it)
void MHEG5StreamerRemove (MHEG5Stream *stream)
 Remove streaming IP request.
void MHEG5StreamerNotifyStreamStarted (MHEG5Stream *stream)
 Notify that a stream has started. This notification comes from the audio/video deocder.
void MHEG5StreamerNotifyStreamStopped (MHEG5Stream *stream)
 Notify that a stream has stopped. This notification comes from the audio/video deocder.
void MHEG5StreamerMeasurePerformance (MHEG5String *url, MHEG5Int maxBytes, MHEG5Program *program)
 Measure streaming performance (bytes per second). The result is returned to the resident program.
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 send it to the external application.
void MHEG5StreamerClose (void)
 Close the IC streaming module.
void MHEG5streamerNotifyStreamingReady (void)
 Handle notification that the external application is ready to handle IP stream data.

Detailed Description

API for IC streamer.

Date:
21/10/2010
Author:
Omri Barel

Function Documentation

Abort streaming performance measurement.

Parameters:
programRunning program object
Returns:
Nothing
void MHEG5StreamerClose ( void  )

Close the IC streaming module.

Returns:
void

Return the counter maximum position (content length in units of 188 bytes).

Parameters:
streamStream object to use
Returns:
Counter max position, -1 if unknown

Return the current counter position (in units of 188 bytes).

Parameters:
streamStream object to use
Returns:
Current counter position
BOOLEAN MHEG5StreamerIsRunable ( MHEG5Stream stream)

Check that stream is runable (i.e. MHEG5StreamerPrepare has been called for it)

Parameters:
streamStream object to use
Returns:
TRUE if stream is known to Streamer module
void MHEG5StreamerMeasurePerformance ( MHEG5String url,
MHEG5Int  maxBytes,
MHEG5Program program 
)

Measure streaming performance (bytes per second). The result is returned to the resident program.

Parameters:
urlURL to use for performance estimates
maxBytesMaximum number of bytes to fetch
programProgram object to receive the measured speed
Returns:
Nothing

Handle notification that the external application is ready to handle IP stream data.

Returns:
Nothing

Notify that a stream has started. This notification comes from the audio/video deocder.

Parameters:
streamStream object
Returns:
void

Notify that a stream has stopped. This notification comes from the audio/video deocder.

Parameters:
streamStream object
Returns:
void
E_MhegErr MHEG5StreamerOpen ( void *  buffer,
U32BIT  size,
U32BIT  taskPriority 
)

Open the IC streaming module.

Parameters:
bufferBuffer to use for content buffering
sizeSize of buffer in bytes
taskPriorityStreamer task priority
Returns:
void
void MHEG5StreamerPause ( MHEG5Stream stream)

Pause IP content streaming.

Parameters:
streamStream object to pause
Returns:
void
void MHEG5StreamerPrepare ( MHEG5Stream stream)

Prepare for retrieval of a stream from the IP connection.

Parameters:
streamStream object to prepare
Returns:
Nothing
void MHEG5StreamerRemove ( MHEG5Stream stream)

Remove streaming IP request.

Parameters:
streamStream object to remove
Returns:
void
void MHEG5StreamerReset ( void  )

Reset the IC streaming module.

Returns:
None.
void MHEG5StreamerResume ( MHEG5Stream stream)

Resume IP content streaming after it was paused by MHEG5StreamerPause.

Parameters:
streamStream object to resume
Returns:
void
void MHEG5StreamerRun ( MHEG5Stream stream)

Start streaming IP content for a prepared request.

Parameters:
streamStream object to run
Returns:
void
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 send it to the external application.

Parameters:
activeStateActive state (TRUE=active, FALSE=inactive)
Returns:
void

Set the counter end position of a stream in the streamer. This function uses the counter end position as set in the stream object.

Parameters:
streamStream object to use
Returns:
Nothing

Set the counter position of a stream in the streamer. This function uses the counter position as set in the stream object.

Parameters:
streamStream object to use
Returns:
Nothing
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.

Parameters:
streamStream object to use
triggerIdCounter trigger identifier
newValueNew trigger value, negative to remove the trigger
Returns:
Nothing
void MHEG5StreamerStop ( MHEG5Stream stream)

Stop streaming IP content.

Parameters:
streamStream object to stop
Returns:
void
 All Data Structures Files Functions Variables Typedefs Defines