MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Data Structures | Typedefs | Enumerations | Functions
dvb_ics.h File Reference

Interaction Channel Streaming functions required by MHEG5 engine References: [1] UK1 Profile - Digital Terrestrial Television - Requirements for interoperability (The D-Book), Issue 6.1, March 2009. More...

#include "techtype.h"
#include "mherrors.h"

Go to the source code of this file.

Data Structures

struct  S_ICSPidKeys
 
struct  S_ICSSubtPage
 
struct  S_ICSLangInfo
 
struct  s_StreamPids
 

Typedefs

typedef struct s_StreamPids S_StreamPids
 

Enumerations

enum  E_VideoTermination { MHEG5_VIDEO_TERMINATION_FREEZE, MHEG5_VIDEO_TERMINATION_DISAPPEAR }
 
enum  E_ICSPinSupport { MHEG5_ICS_PIN_SUPPORT_NONE, MHEG5_ICS_PIN_SUPPORT_DISABLED, MHEG5_ICS_PIN_SUPPORT_ENABLED }
 
enum  E_ICSPinReq { MHEG5_ICS_PIN_REQ_NEVER, MHEG5_ICS_PIN_REQ_GUIDANCE_ONLY, MHEG5_ICS_PIN_REQ_ALWAYS }
 
enum  E_ICSPinStatus { MHEG5_ICS_PIN_STATUS_NOT_REQUIRED, MHEG5_ICS_PIN_STATUS_OK, MHEG5_ICS_PIN_STATUS_INVALID }
 
enum  E_ICSAudioCodec { ICS_AC_NONE, ICS_AC_AAC_ADTS, ICS_AC_HE_AAC_LATM, ICS_AC_EAC3 }
 
enum  E_ICSVideoCodec { ICS_VC_NONE, ICS_VC_H264 }
 

Functions

E_MhegErr DVB_MhegICStreamSetup (S_StreamPids pids, S_ICSPidKeys *audio_keys, S_ICSPidKeys *video_keys, E_VideoTermination video_termination, E_ICSAudioCodec audio_codec, E_ICSVideoCodec video_codec)
 This function tells the external application that an IC delivered stream is to be played using DVB_MhegHandleStreamData. The function provides the pids to be used in decoding the stream. Where a component is not active, the PID value will be zero. The function also provides optional encryption keys for audio and video components. The controlling application may return immediately with status MHERR_OK, indicating that streaming can start. If this cannot be done synchronously, the controlling application may return MHERR_PENDING, and when ready it can send DVB_EVENT_STREAMING_READY. More...
 
U32BIT DVB_MhegICStreamHandleData (U8BIT *data, U32BIT len, BOOLEAN last)
 Handle transport stream data. The data is part of a single-program transport stream, containing audio, video and/or subtitles (in one or more languages). The video is H.264 SD video and the audio is HE-AAC audio. The stream contains PAT and PMT (other SI data can be ignored). This function can block until the data has been processed / buffered. It may also return when part of the block has been processed. This would cause a subsequent call with the rest of the block. When the last block is presented (last=TRUE), the function should indicate that the block has been completely processed only when this is a true reflection of the presentation status. More...
 
E_MhegErr DVB_MhegICStreamRelease (void)
 This function tells the external application that the IC delivered stream is stopped. Presentation of all stream components (audio, video and/or subtitles) should cease. This function may be called while DVB_MhegHandleStreamData is in progress. In this case DVB_MhegHandleStreamData should return indicating that the entire block has been processed. More...
 
E_MhegErr DVB_MhegICStreamPause (void)
 Pause presentation of audio and/or video components of the currently playing IC delivered stream. Following this call, the video (if any) should be frozen and audio muted. Unused data delivered by DVB_MhegHandleStreamData may be returned to the MHEG-5 engine (using the return value). More...
 
E_MhegErr DVB_MhegICStreamResume (void)
 Resume presentation of audio and/or video components of the currently playing IC delivered stream. This function may be called by the MHEG-5 engine after DVB_MhegPauseICS (alternatively, DVB_MhegStopICS may be called). Following this call, available data is once again delivered through DVB_MhegHandleStreamData. More...
 
E_MhegErr DVB_MhegICStreamAudioSetVolume (S32BIT volumeAdjust)
 Set volume for audio component of the currently playing IC stream This function is equivalent to DVB_MhegAudioSetVolume. More...
 
E_MhegErr DVB_MhegPromptForGuidance (U8BIT *restriction, BOOLEAN show)
 This function asks the external application to obtain permission from the user to present IP-delivered content. The external application may use the "restriction" string to tell the user why access to the content is restricted. How permission is obtained is receiver specific. More...
 
E_MhegErr DVB_MhegGetPINSupport (E_ICSPinSupport *support)
 Returns the PIN support in the receiver. This MUST be a non-blocking function, returning results immediately. More...
 

Detailed Description

Interaction Channel Streaming functions required by MHEG5 engine References: [1] UK1 Profile - Digital Terrestrial Television - Requirements for interoperability (The D-Book), Issue 6.1, March 2009.

Date
20/12/2012
Author
Adam Sturtridge

Function Documentation

E_MhegErr DVB_MhegGetPINSupport ( E_ICSPinSupport *  support)

Returns the PIN support in the receiver. This MUST be a non-blocking function, returning results immediately.

Parameters
statusMHEG5_ICS_PIN_SUPPORT_NONE - PIN is not supported MHEG5_ICS_PIN_SUPPORT_DISABLED - PIN is supported and disabled MHEG5_ICS_PIN_SUPPORT_ENABLED - PIN is supported and enabled
Returns
The following return values are allowed from this function MHERR_OK - Success MHERR_BAD_PARAMETER - Invalid parameter MHERR_OTHER - Controlling application specific error
E_MhegErr DVB_MhegICStreamAudioSetVolume ( S32BIT  volumeAdjust)

Set volume for audio component of the currently playing IC stream This function is equivalent to DVB_MhegAudioSetVolume.

Parameters
volumeAdjustNew setting of the amount by which to adjust volume in dB
Returns
The following return values are allowed from this function MHERR_OK - Success MHERR_BAD_PARAMETER - Invalid parameter MHERR_OTHER - Controlling application specific error
U32BIT DVB_MhegICStreamHandleData ( U8BIT *  data,
U32BIT  len,
BOOLEAN  last 
)

Handle transport stream data. The data is part of a single-program transport stream, containing audio, video and/or subtitles (in one or more languages). The video is H.264 SD video and the audio is HE-AAC audio. The stream contains PAT and PMT (other SI data can be ignored). This function can block until the data has been processed / buffered. It may also return when part of the block has been processed. This would cause a subsequent call with the rest of the block. When the last block is presented (last=TRUE), the function should indicate that the block has been completely processed only when this is a true reflection of the presentation status.

Parameters
dataStream data (whole transport stream packets)
lenLength of data in bytes (multiple of 188)
lastWhether data block contains the end of the stream
Returns
Number of bytes handled. This must be a multiple of 188.
E_MhegErr DVB_MhegICStreamPause ( void  )

Pause presentation of audio and/or video components of the currently playing IC delivered stream. Following this call, the video (if any) should be frozen and audio muted. Unused data delivered by DVB_MhegHandleStreamData may be returned to the MHEG-5 engine (using the return value).

Returns
The following return values are allowed from this function MHERR_OK - Success MHERR_BAD_PARAMETER - Invalid parameter MHERR_OTHER - Controlling application specific error
E_MhegErr DVB_MhegICStreamRelease ( void  )

This function tells the external application that the IC delivered stream is stopped. Presentation of all stream components (audio, video and/or subtitles) should cease. This function may be called while DVB_MhegHandleStreamData is in progress. In this case DVB_MhegHandleStreamData should return indicating that the entire block has been processed.

Returns
The following return values are allowed from this function MHERR_OK - Success MHERR_OTHER - Controlling application specific error
E_MhegErr DVB_MhegICStreamResume ( void  )

Resume presentation of audio and/or video components of the currently playing IC delivered stream. This function may be called by the MHEG-5 engine after DVB_MhegPauseICS (alternatively, DVB_MhegStopICS may be called). Following this call, available data is once again delivered through DVB_MhegHandleStreamData.

Returns
The following return values are allowed from this function MHERR_OK - Success MHERR_OTHER - Controlling application specific error
E_MhegErr DVB_MhegICStreamSetup ( S_StreamPids  pids,
S_ICSPidKeys audio_keys,
S_ICSPidKeys video_keys,
E_VideoTermination  video_termination,
E_ICSAudioCodec  audio_codec,
E_ICSVideoCodec  video_codec 
)

This function tells the external application that an IC delivered stream is to be played using DVB_MhegHandleStreamData. The function provides the pids to be used in decoding the stream. Where a component is not active, the PID value will be zero. The function also provides optional encryption keys for audio and video components. The controlling application may return immediately with status MHERR_OK, indicating that streaming can start. If this cannot be done synchronously, the controlling application may return MHERR_PENDING, and when ready it can send DVB_EVENT_STREAMING_READY.

Parameters
pidsPids for audio, video, subtitle and PCR for IP service
audio_keysInformation about audio encryption keys (or NULL)
video_keysInformation about video encryption keys (or NULL)
video_terminationif video active, termination attribute to be applied to the last frame.
Returns
The following return values are allowed from this function: MHERR_OK - Success MHERR_PENDING - Start is pending MHERR_OTHER - Controlling application specific error
E_MhegErr DVB_MhegPromptForGuidance ( U8BIT *  restriction,
BOOLEAN  show 
)

This function asks the external application to obtain permission from the user to present IP-delivered content. The external application may use the "restriction" string to tell the user why access to the content is restricted. How permission is obtained is receiver specific.

Parameters
*restrictionA string that can be presented to the user to indicate why verification is required
showIndicates whether the prompt should be shown or not (TRUE=show, FALSE=hide/remove)
Returns
The following return values are allowed from this function MHERR_OK - Success MHERR_BAD_PARAMETER - Invalid parameter MHERR_OTHER - Controlling application specific error