DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbvtc.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  *******************************************************************************/
26 // pre-processor mechanism so multiple inclusions don't cause compilation error
27 
28 #ifndef _STBVTC_H
29 #define _STBVTC_H
30 
31 #include "techtype.h"
32 #include "osdtype.h"
33 #include "vtctype.h"
34 
35 //---Constant and macro definitions for public use-----------------------------
36 
37 //---Enumerations for public use-----------------------------------------------
38 
39 typedef void (*F_NOTIFY_VIDEO_AR)(E_ASPECT_RATIO ar);
40 
41 //---Global type defs for public use-------------------------------------------
42 
43 //---Global Function prototypes for public use---------------------------------
44 
45 /*!**************************************************************************
46  * @brief Initialise the VTC module
47  * @param None
48  * @return None
49  ****************************************************************************/
50 void STB_VTInitialise(void);
51 
52 /*!**************************************************************************
53  * @brief DVBCore application output window for entire video
54  * @param output - output video rectangle
55  * @return None
56  ****************************************************************************/
57 void STB_VTSetVideoOutput(S_RECTANGLE *output);
58 
59 /*!**************************************************************************
60  * @brief Get display aspect ratio
61  * @param aspect_ratio - display aspect ratio
62  * @return None
63  ****************************************************************************/
64 E_ASPECT_RATIO STB_VTGetDisplayAspectRatio(void);
65 
66 /*!**************************************************************************
67  * @brief Set display aspect ratio
68  * @param aspect_ratio - display aspect ratio
69  * @return None
70  ****************************************************************************/
71 void STB_VTSetDisplayAspectRatio(E_ASPECT_RATIO aspect_ratio);
72 
73 /*!**************************************************************************
74  * @brief Turn on or off MHEG5 scaling calculation
75  * @param enable TRUE - turn on MHEG5 calculations
76  * @return None
77  ****************************************************************************/
78 void STB_VTSetMhegEnable(BOOLEAN enable);
79 
80 /*!**************************************************************************
81  * @brief Set MHEG5 scaling resolution for video
82  * @param width - width resolution
83  * @param height - height resolution
84  * @return None
85  ****************************************************************************/
86 void STB_VTSetMhegScalingResolution(U16BIT width, U16BIT height);
87 
88 /*!**************************************************************************
89  * @brief Set video scaling by MHEG5
90  * @param scaling - scaling transformation (offset, size)
91  * @return None
92  ****************************************************************************/
94 
95 /*!**************************************************************************
96  * @brief Set scene aspect ratio (MHEG-5 specific)
97  * @param aspect_ratio - scene aspect ratio
98  * @return None
99  ****************************************************************************/
100 void STB_VTSetMhegAspectRatio(E_ASPECT_RATIO aspect_ratio);
101 
102 /*!**************************************************************************
103  * @brief Set MHEG5 widescreen alignment
104  * @param mode - widescreen alignment mode
105  * @return None
106  ****************************************************************************/
107 void STB_VTSetMhegVideoAlignment(E_VIDEO_ASPECT_MODE mode);
108 
109 /*!**************************************************************************
110  * @brief Turn on or off HBBTV scaling calculation
111  * @param enable TRUE - turn on HbbTV calculations
112  * @return None
113  ****************************************************************************/
114 void STB_VTSetHbbtvEnable(BOOLEAN enable);
115 
116 /*!**************************************************************************
117  * @brief Set video scaling by HBBTV
118  * @param rect output window rectangle
119  * @return None
120  ****************************************************************************/
122 
123 /*!**************************************************************************
124  * @brief Set video alignment preference
125  * @param pref - video alignment
126  * @return None
127  ****************************************************************************/
128 void STB_VTSetVideoAlignmentPref(E_VIDEO_ASPECT_MODE pref);
129 
137 
138 /*!**************************************************************************
139  * @brief Set video preferences change callback
140  *
141  * The callback function is called when video transformation is changed as a
142  * result of a user preference change (only).
143  *
144  * @param callback - callback for notification
145  * @param user_data - user data for the callback
146  * @return None
147  ****************************************************************************/
148 void STB_VTSetVideoPrefChangedCallback(void (*callback)(void *),
149  void *user_data);
150 
151 /*!**************************************************************************
152  * @brief Set video preferences change callback
153  *
154  * The callback function is called when video transformation is changed as a
155  * result of a user preference change (only).
156  *
157  * @param callback - callback for notification
158  * @param user_data - user data for the callback
159  * @return None
160  ****************************************************************************/
161 void STB_VTSetVideoRatioCallback(F_NOTIFY_VIDEO_AR ar);
162 
163 /*!**************************************************************************
164  * @brief Return the current decoder format conversion
165  * @return The current format conversion
166  ****************************************************************************/
167 E_FORMAT_CONVERSION STB_VTGetDecoderFormatConversion(void);
168 
169 /*!**************************************************************************
170  * @brief Return the current video resolution
171  * @param width - video width
172  * @param height - video height
173  * @return None
174  ****************************************************************************/
175 void STB_VTGetVideoResolution(U16BIT *width, U16BIT *height);
176 
177 /*!**************************************************************************
178  * @brief Return the current video aspect ratio
179  * @return E_ASPECT_RATIO aspect ratio
180  ****************************************************************************/
181 E_ASPECT_RATIO STB_VTGetVideoAspectRatio(void);
182 
183 #endif // _STBVTC_H
184 
185 //*****************************************************************************
186 // End of file
187 //*****************************************************************************
188 
Header file - Function prototypes for A/V control.
E_FORMAT_CONVERSION(* F_VT_CUSTOM_MODE_CALLBACK)(E_ASPECT_RATIO video_aspect_ratio, E_ASPECT_RATIO display_aspect_ratio)
Callback used by the VTC module to determine what format conversion needs to be applied when the aspe...
Definition: vtctype.h:69
void STB_VTSetMhegVideoAlignment(E_VIDEO_ASPECT_MODE mode)
Set MHEG5 widescreen alignment.
Definition: stbvtc.c:307
void STB_VTSetVideoPrefChangedCallback(void(*callback)(void *), void *user_data)
Set video preferences change callback.
Definition: stbvtc.c:372
E_ASPECT_RATIO STB_VTGetDisplayAspectRatio(void)
Get display aspect ratio.
Definition: stbvtc.c:243
void STB_VTSetMhegEnable(BOOLEAN enable)
Turn on or off MHEG5 scaling calculation.
Definition: stbvtc.c:181
void STB_VTCSetCustomModeCallback(F_VT_CUSTOM_MODE_CALLBACK callback)
Sets the callback used to control the format conversion when the aspect mode set by STB_VTSetVideoAli...
Definition: stbvtc.c:130
Definition: osdtype.h:56
void STB_VTSetHbbtvVideoWindow(S_RECTANGLE *rect)
Set video scaling by HBBTV.
Definition: stbvtc.c:347
void STB_VTSetMhegScalingResolution(U16BIT width, U16BIT height)
Set MHEG5 scaling resolution for video.
Definition: stbvtc.c:201
void STB_VTSetHbbtvEnable(BOOLEAN enable)
Turn on or off HBBTV scaling calculation.
Definition: stbvtc.c:328
Header file - Function prototypes for A/V control.
void STB_VTSetMhegAspectRatio(E_ASPECT_RATIO aspect_ratio)
Set scene aspect ratio (MHEG-5 specific)
Definition: stbvtc.c:286
void STB_VTSetVideoAlignmentPref(E_VIDEO_ASPECT_MODE pref)
Set video alignment preference.
Definition: stbvtc.c:110
void STB_VTSetVideoRatioCallback(F_NOTIFY_VIDEO_AR ar)
Set video preferences change callback.
Definition: stbvtc.c:399
void STB_VTSetMhegVideoScaling(S_RECTANGLE *scaling)
Set video scaling by MHEG5.
Definition: stbvtc.c:222
E_ASPECT_RATIO STB_VTGetVideoAspectRatio(void)
Return the current video aspect ratio.
Definition: stbvtc.c:458
System Wide Global Technical Data Type Definitions.
void STB_VTGetVideoResolution(U16BIT *width, U16BIT *height)
Return the current video resolution.
Definition: stbvtc.c:435
void STB_VTSetVideoOutput(S_RECTANGLE *output)
DVBCore application output window for entire video.
Definition: stbvtc.c:150
E_FORMAT_CONVERSION STB_VTGetDecoderFormatConversion(void)
Return the current decoder format conversion.
Definition: stbvtc.c:412
void STB_VTInitialise(void)
Initialise the VTC module.
Definition: stbvtc.c:84
void STB_VTSetDisplayAspectRatio(E_ASPECT_RATIO aspect_ratio)
Set display aspect ratio.
Definition: stbvtc.c:265