MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
dvb_video.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2012 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  *******************************************************************************/
39 #ifndef _DVB_VIDEO_H
40 #define _DVB_VIDEO_H
41 
42 #include "techtype.h"
43 #include "dvblocator.h"
44 #include "osdtype.h"
45 #include "vtctype.h"
46 #include "mherrors.h"
47 
48 /*---Constant and macro definitions for public use-----------------------------*/
49 
50 /*---Enumerations for public use-----------------------------------------------*/
51 
52 /* Video freeze options */
53 typedef enum
54 {
55  /* Freeze video display, continuously displaying the current or a subsequent
56  * video frame.
57  */
58  VIDEO_FREEZE,
59 
60  /* Unfreeze video display - resume normal video decoding and display */
61  VIDEO_UNFREEZE
62 } E_VideoState;
63 
64 /* Widescreen alignment (where 16:9 video is played within 4:3 scene) */
65 typedef enum
66 {
67  MHEG5_ALIGNMENT_NONE,
68  MHEG5_ALIGNMENT_CENTRE_CUT_OUT,
69  MHEG5_ALIGNMENT_LETTERBOX
70 } E_VideoAlignment;
71 
72 /* Subtitle hide / show options */
73 typedef enum
74 {
75  /* Hide subtitles */
76  MHEG5_DVB_SUBTITLE_HIDE,
77 
78  /* Show subtitles */
79  MHEG5_DVB_SUBTITLE_SHOW
80 } E_DvbSubtitleShowState;
81 
82 
83 /* Subtitle freeze / unfreeze enumeration */
84 typedef enum
85 {
86  /* Freeze subtitles */
87  MHEG5_DVB_SUBTITLE_FREEZE,
88 
89  /* Unfreeze subtitles */
90  MHEG5_DVB_SUBTITLE_UNFREEZE
91 } E_DvbSubtitleFreezeState;
92 
93 
94 /* Video encoding used in iframe/video */
95 typedef enum
96 {
97  VIDEO_ENC_MPEG2, /* see reference [1] - section 14.8.1 under "MPEG stills" */
98 
99  VIDEO_ENC_H_264 /* see reference [1] - section 14.14.1 under "H.264/AVC stills" */
100 } E_VideoEncoding;
101 
102 /*---Global type defs for public use-------------------------------------------*/
103 
104 /*---Global Function prototypes for public use---------------------------------*/
105 
112 E_MhegErr DVB_MhegVideoPlayDefault(void);
113 
114 
127 E_MhegErr DVB_MhegVideoPlayStream(S_DvbComponent *pDvbComponent);
128 
129 
135 E_MhegErr DVB_MhegVideoStopStream(void);
136 
137 
157 E_MhegErr DVB_MhegVideoPlayIFrame( U8BIT *pVideoData,
158  U32BIT dataLength,
159  E_VideoEncoding encoding );
160 
167 E_MhegErr DVB_MhegVideoStopIFrame(void);
168 
169 
180 E_MhegErr DVB_MhegVideoSetUpdating(E_VideoState displayState);
181 
182 
195 E_MhegErr DVB_MhegSubtitleSetVisibility(E_DvbSubtitleShowState showState);
196 
205 BOOLEAN DVB_MhegGetSubtitlePref(void);
206 
215 U8BIT DVB_MhegPrefSubtitleLangs(U32BIT *langs,U8BIT max);
216 
217 
218 #ifdef INCLUDE_FREESAT
219 
245 E_MhegErr DVB_MhegDecodeImagePlaneIFrame( U8BIT *pVideoData,
246  U32BIT dataLength,
247  E_VideoEncoding encoding );
248 
249 
261 E_MhegErr DVB_MhegImagePlaneIFrameStop(void);
262 
268 void DVB_MhegSetImageScaling(S_RECTANGLE *scaling);
269 
270 #endif /*INCLUDE_FREESAT*/
271 
272 /*!**************************************************************************
273  * @brief Set Mheg scaling resolution for video
274  * @param width - width resolution
275  * @param height - height resolution
276  * @return None
277  ****************************************************************************/
278 void DVB_MhegSetScalingResolution(U16BIT width, U16BIT height);
279 
280 /*!**************************************************************************
281  * @brief Set Mheg video scaling
282  * @param scaling - scaling transformation (offset, size)
283  * @return None
284  ****************************************************************************/
285 void DVB_MhegSetVideoScaling(S_RECTANGLE *scaling);
286 
287 /*!**************************************************************************
288  * @brief Set display aspect ratio
289  * @param aspect - display aspect ratio
290  * @return None
291  ****************************************************************************/
292 void DVB_MhegSetAspectRatio(E_ASPECT_RATIO aspect);
293 
294 /*!**************************************************************************
295  * @brief Get display aspect ratio
296  * @return display aspect ratio
297  ****************************************************************************/
298 E_ASPECT_RATIO DVB_MhegGetDisplayAspectRatio(void);
299 
300 E_FORMAT_CONVERSION DVB_MhegGetDecoderFormatConversion(void);
301 
302 void DVB_MhegSetVideoAlignment(E_VIDEO_ASPECT_MODE mode);
303 
304 #endif /* _DVB_VIDEO_H */
305 
definition of OSD types
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.
Definition: dvblocator.h:37
Definition: osdtype.h:54
void DVB_MhegSetVideoScaling(S_RECTANGLE *scaling)
Set Mheg video scaling.
Header file - Function prototypes for A/V control.
E_MhegErr DVB_MhegVideoStopStream(void)
MHEG5 engine takes control of Video - and specifies that decoding and presentation of any Video strea...
MHEG5 engine interface error codes.
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 f...
BOOLEAN DVB_MhegGetSubtitlePref(void)
This function is used by the MHEG-5 engine to determine whether subtitles are currently enabled...
E_MhegErr DVB_MhegVideoPlayStream(S_DvbComponent *pDvbComponent)
MHEG5 engine takes control of Video - and informs that Video must be switched to the specified Video ...
E_MhegErr DVB_MhegVideoSetUpdating(E_VideoState displayState)
Switch between frozen or unfrozen video display (reacting on either the current or subsequent frame)...
void DVB_MhegSetAspectRatio(E_ASPECT_RATIO aspect)
Set display aspect ratio.
System Wide Global Technical Data Type Definitions.
void DVB_MhegSetScalingResolution(U16BIT width, U16BIT height)
Set Mheg scaling resolution for video.
Definition of DVB locator and DVB component types.
E_ASPECT_RATIO DVB_MhegGetDisplayAspectRatio(void)
Get display aspect ratio.
E_MhegErr DVB_MhegVideoPlayDefault(void)
MHEG5 engine gives control of Video to external application. Set decoding and presentation of Video a...
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 v...
E_MhegErr DVB_MhegVideoStopIFrame(void)
Instruct the controlling application to stop displaying the previously supplied video data in DVB_Mhe...