MHEG5  15.3.0
include/dvb_video.h File Reference

DVB Video functions are required by MHEG5 engine. All required functions should be non-blocking. Functions with a post condition (synchronously returned values) MUST perform quickly, otherwise should copy passed data and return asynchronously through a asynchronous return path, where available. Required functions may or may not use all of the allowed return values, depending on the error handling capabilities of the controlling application implementation. References: [1] DTG UK D-Book 7 part A. [2] ISO/IEC 13818-1:2000 - Information technology -- Generic coding of moving pictures and associated audio information: Systems [3] ISO/IEC 13818-6:1998 - Information technology -- Generic coding of moving pictures and associated audio information -- Part 6: Extensions for DSM-CC. More...

#include "techtype.h"
#include "dvblocator.h"
#include "osdtype.h"
#include "vtctype.h"
#include "mherrors.h"

Go to the source code of this file.

Enumerations

enum  E_VideoState { VIDEO_FREEZE, VIDEO_UNFREEZE }
enum  E_VideoAlignment { MHEG5_ALIGNMENT_NONE, MHEG5_ALIGNMENT_CENTRE_CUT_OUT, MHEG5_ALIGNMENT_LETTERBOX }
enum  E_DvbSubtitleShowState { MHEG5_DVB_SUBTITLE_HIDE, MHEG5_DVB_SUBTITLE_SHOW }
enum  E_DvbSubtitleFreezeState { MHEG5_DVB_SUBTITLE_FREEZE, MHEG5_DVB_SUBTITLE_UNFREEZE }
enum  E_VideoEncoding { VIDEO_ENC_MPEG2, VIDEO_ENC_H_264 }

Functions

E_MhegErr DVB_MhegVideoPlayDefault (void)
 MHEG5 engine gives control of Video to external application. Set decoding and presentation of Video according to the default user selection.
E_MhegErr DVB_MhegVideoPlayStream (S_DvbComponent *pDvbComponent)
 MHEG5 engine takes control of Video - and informs that Video must be switched to the specified Video stream. This setting takes effect regardless of whether or not an video stream is currently playing. If the currently playing stream is the same as the specified one, then the stream should continue playing without interruption. If the locator references a service component that is not currently being broadcast, the audio should be muted until the referenced component is being broadcast.
E_MhegErr DVB_MhegVideoStopStream (void)
 MHEG5 engine takes control of Video - and specifies that decoding and presentation of any Video stream must be stopped.
E_MhegErr DVB_MhegVideoPlayIFrame (U8BIT *pVideoData, U32BIT dataLength, E_VideoEncoding encoding)
 Instruct the controlling application to decode supplied video data. The I-Frame is displayed in the video decoder display buffer. Its scaling and position is affected by calls to DVB_MhegVideoPosition(). Decode and display of I-frames is mutually exclusive to the decoding of video streams. The display of I-frames is subject to decoder format conversion (DFC) and display signaling as specified in section 6.5.4.6 of reference [1]. The DFC and signaling applied is dependant on the Scene or Image aspect ratio, the TV aspect ratio and the I-Frame scaling mode (as derived from the content hook). The I-Frame data passed MUST be copied if it is required after this function returns, as the caller retains exclusive ownership. All other video/iframe functions (eg. DVB_MhegVideoIFrameStop) should apply to the current Iframe (regardless of the encoding specified)
E_MhegErr DVB_MhegVideoStopIFrame (void)
 Instruct the controlling application to stop displaying the previously supplied video data in DVB_MhegVideoPlayIFrame.
E_MhegErr DVB_MhegVideoSetUpdating (E_VideoState displayState)
 Switch between frozen or unfrozen video display (reacting on either the current or subsequent frame), and remain in force until set again. This setting takes effect regardless of whether a video stream is currently playing. This MUST be a non-blocking function.
E_MhegErr DVB_MhegSubtitleSetVisibility (E_DvbSubtitleShowState showState)
 Show or hide DVB subtitles. This operation remains in force until set again by another call to this function. This setting takes effect regardless of whether there is a subtitle stream currently playing. If a subtitle stream starts playing whilst in the hidden state, it will not have a visible effect until the show state is selected.
BOOLEAN DVB_MhegGetSubtitlePref (void)
 This function is used by the MHEG-5 engine to determine whether subtitles are currently enabled. This may be used to allow a content provider to make available streams with and without subtitles to avoid streaming unused data.
U8BIT DVB_MhegPrefSubtitleLangs (U32BIT *langs, U8BIT max)
 Get list of preferred subtitle languages. If there is no preference then zero is returned. This only writes into array up to 'max' items This MUST be a non-blocking function, returning results immediately.
void DVB_MhegSetScalingResolution (U16BIT width, U16BIT height)
 Set Mheg scaling resolution for video.
void DVB_MhegSetVideoScaling (S_RECTANGLE *scaling)
 Set Mheg video scaling.
void DVB_MhegSetAspectRatio (E_ASPECT_RATIO aspect)
 Set display aspect ratio.
E_ASPECT_RATIO DVB_MhegGetDisplayAspectRatio (void)
 Get display aspect ratio.
E_FORMAT_CONVERSION DVB_MhegGetDecoderFormatConversion (void)
void DVB_MhegSetVideoAlignment (E_VIDEO_ASPECT_MODE mode)

Detailed Description

DVB Video functions are required by MHEG5 engine. All required functions should be non-blocking. Functions with a post condition (synchronously returned values) MUST perform quickly, otherwise should copy passed data and return asynchronously through a asynchronous return path, where available. Required functions may or may not use all of the allowed return values, depending on the error handling capabilities of the controlling application implementation. References: [1] DTG UK D-Book 7 part A. [2] ISO/IEC 13818-1:2000 - Information technology -- Generic coding of moving pictures and associated audio information: Systems [3] ISO/IEC 13818-6:1998 - Information technology -- Generic coding of moving pictures and associated audio information -- Part 6: Extensions for DSM-CC.

Date:
20/12/2012
Author:
Adam Sturtridge

Function Documentation

E_ASPECT_RATIO DVB_MhegGetDisplayAspectRatio ( void  )

Get display aspect ratio.

**************************************************************************

Returns:
display aspect ratio
BOOLEAN DVB_MhegGetSubtitlePref ( void  )

This function is used by the MHEG-5 engine to determine whether subtitles are currently enabled. This may be used to allow a content provider to make available streams with and without subtitles to avoid streaming unused data.

Returns:
BOOLEAN; TRUE if the user turned the subtitles on, FALSE otherwise.
U8BIT DVB_MhegPrefSubtitleLangs ( U32BIT *  langs,
U8BIT  max 
)

Get list of preferred subtitle languages. If there is no preference then zero is returned. This only writes into array up to 'max' items This MUST be a non-blocking function, returning results immediately.

Parameters:
langsArray of ISO 639 language codes to be returned
maxmaximum number of preferred languages required by caller
Returns:
U32BIT - number of actual language codes returned
void DVB_MhegSetAspectRatio ( E_ASPECT_RATIO  aspect)

Set display aspect ratio.

**************************************************************************

Parameters:
aspect- display aspect ratio
Returns:
None
void DVB_MhegSetScalingResolution ( U16BIT  width,
U16BIT  height 
)

Set Mheg scaling resolution for video.

**************************************************************************

Parameters:
width- width resolution
height- height resolution
Returns:
None
void DVB_MhegSetVideoScaling ( S_RECTANGLE scaling)

Set Mheg video scaling.

**************************************************************************

Parameters:
scaling- scaling transformation (offset, size)
Returns:
None
E_MhegErr DVB_MhegSubtitleSetVisibility ( E_DvbSubtitleShowState  showState)

Show or hide DVB subtitles. This operation remains in force until set again by another call to this function. This setting takes effect regardless of whether there is a subtitle stream currently playing. If a subtitle stream starts playing whilst in the hidden state, it will not have a visible effect until the show state is selected.

Parameters:
showStateMHEG5_DVB_SUBTITLE_SHOW if subtitles should be shown MHEG5_DVB_SUBTITLE_HIDE if subtitles should be hidden
Returns:
- MHERR_OK on success
  • MHERR_OTHER controlling application specific error.
E_MhegErr DVB_MhegVideoPlayDefault ( void  )

MHEG5 engine gives control of Video to external application. Set decoding and presentation of Video according to the default user selection.

Returns:
MHERR_OK - Success, MHERR_OTHER - failure
E_MhegErr DVB_MhegVideoPlayIFrame ( U8BIT *  pVideoData,
U32BIT  dataLength,
E_VideoEncoding  encoding 
)

Instruct the controlling application to decode supplied video data. The I-Frame is displayed in the video decoder display buffer. Its scaling and position is affected by calls to DVB_MhegVideoPosition(). Decode and display of I-frames is mutually exclusive to the decoding of video streams. The display of I-frames is subject to decoder format conversion (DFC) and display signaling as specified in section 6.5.4.6 of reference [1]. The DFC and signaling applied is dependant on the Scene or Image aspect ratio, the TV aspect ratio and the I-Frame scaling mode (as derived from the content hook). The I-Frame data passed MUST be copied if it is required after this function returns, as the caller retains exclusive ownership. All other video/iframe functions (eg. DVB_MhegVideoIFrameStop) should apply to the current Iframe (regardless of the encoding specified)

Parameters:
pVideoDataPointer to video data block
dataLengthLength of video data block.
encodingVideo encoding used in iframe
E_MhegErr DVB_MhegVideoPlayStream ( S_DvbComponent pDvbComponent)

MHEG5 engine takes control of Video - and informs that Video must be switched to the specified Video stream. This setting takes effect regardless of whether or not an video stream is currently playing. If the currently playing stream is the same as the specified one, then the stream should continue playing without interruption. If the locator references a service component that is not currently being broadcast, the audio should be muted until the referenced component is being broadcast.

Parameters:
pDvbComponentpointer to specified component
Returns:
MHERR_OK - Success, MHERR_OTHER - failure
E_MhegErr DVB_MhegVideoSetUpdating ( E_VideoState  displayState)

Switch between frozen or unfrozen video display (reacting on either the current or subsequent frame), and remain in force until set again. This setting takes effect regardless of whether a video stream is currently playing. This MUST be a non-blocking function.

Parameters:
displayStateVIDEO_FREEZE or VIDEO_UNFREEZE
Returns:
- MHERR_OK on success
  • MHERR_OTHER controlling application specific error.
E_MhegErr DVB_MhegVideoStopIFrame ( void  )

Instruct the controlling application to stop displaying the previously supplied video data in DVB_MhegVideoPlayIFrame.

Returns:
- MHERR_OK on success
  • MHERR_OTHER controlling application specific error.
E_MhegErr DVB_MhegVideoStopStream ( void  )

MHEG5 engine takes control of Video - and specifies that decoding and presentation of any Video stream must be stopped.

Returns:
MHERR_OK - Success, MHERR_OTHER - failure
 All Data Structures Files Functions Variables Typedefs Defines