DVBCore
1.0
Open source DVB engine
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00024 #ifndef VTC_H 00025 #define VTC_H 00026 00027 #include "techtype.h" 00028 #include "stbhwav.h" 00029 #include "vtctype.h" 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 typedef struct s_vt_options 00036 { 00037 BOOLEAN mheg_required; 00038 BOOLEAN afd_required; 00039 BOOLEAN hbbtv_required; 00040 } S_VT_OPTIONS; 00041 00042 typedef void (*F_VT_NOTIFICATION_CALLBACK)(void *userdata); 00043 00044 /*!************************************************************************** 00045 * @brief Open video transformation manager 00046 * @param options - transformation manager options 00047 * @return Pointer to manager context, NULL if cannot be created 00048 ****************************************************************************/ 00049 void* VT_Open(S_VT_OPTIONS *options); 00050 00051 /*!************************************************************************** 00052 * @brief Close video transformation manager 00053 * @param context - transformation calculator context 00054 ****************************************************************************/ 00055 void VT_Close(void *context); 00056 00057 /*!************************************************************************** 00058 * @brief Enable or disable transformation calculations 00059 * @param context - transformation calculator context 00060 * @param enable - TRUE if calculations are enabled, FALSE otherwise 00061 ****************************************************************************/ 00062 void VT_Enable(void *context, BOOLEAN enable); 00063 00064 /*!************************************************************************** 00065 * @brief Set current AFD (active format descriptor value) 00066 * @param context - transformation calculator context 00067 * @param afd_value - AFD value 00068 ****************************************************************************/ 00069 void VT_SetAfd(void *context, U8BIT afd_value); 00070 00071 /*!************************************************************************** 00072 * @brief Set video aspect ratio 00073 * @param context - transformation calculator context 00074 * @param aspect_ratio - video aspect ratio 00075 ****************************************************************************/ 00076 void VT_SetVideoAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio); 00077 00078 /*!************************************************************************** 00079 * @brief Get video aspect ratio 00080 * @param context - transformation calculator context 00081 * @return aspect_ratio - video aspect ratio 00082 ****************************************************************************/ 00083 E_ASPECT_RATIO VT_GetVideoAspectRatio(void *context); 00084 00085 /*!************************************************************************** 00086 * @brief Set MHEG5 scene aspect ratio 00087 * @param context - transformation calculator context 00088 * @param aspect_ratio - scene aspect ratio 00089 ****************************************************************************/ 00090 void VT_SetMhegAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio); 00091 00092 /*!************************************************************************** 00093 * @brief Get display aspect ratio 00094 * @param context - transformation calculator context 00095 * @return E_ASPECT_RATIO of display 00096 ****************************************************************************/ 00097 E_ASPECT_RATIO VT_GetDisplayAspectRatio(void *context); 00098 00099 /*!************************************************************************** 00100 * @brief Set display aspect ratio 00101 * @param context - transformation calculator context 00102 * @param aspect_ratio - video aspect ratio 00103 ****************************************************************************/ 00104 void VT_SetDisplayAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio); 00105 00106 /*!************************************************************************** 00107 * @brief Set Voyager scaling resolution 00108 * @param context - transformation calculator context 00109 * @param width 00110 * @param height 00111 ****************************************************************************/ 00112 void VT_SetMhegScalingResolution(void *context, U16BIT width, U16BIT height); 00113 00114 /*!************************************************************************** 00115 * @brief Set MHEG-5 scaling information 00116 * @param context - transformation calculator context 00117 * @param scaling - scaling and positioning transformation 00118 * @note When scaling is NULL, scaling is ignored and the behaviour will 00119 * be as if full screen video is mapped to the full screen. 00120 ****************************************************************************/ 00121 void VT_SetMhegScaling(void *context, S_RECTANGLE *scaling); 00122 00123 /*!************************************************************************** 00124 * @brief Set application scaling information 00125 * @param context - transformation calculator context 00126 * @param window - output window (screen CS) 00127 * @note When window is NULL, application scaling is turned off 00128 ****************************************************************************/ 00129 void VT_SetAppScaling(void *context, S_RECTANGLE *window); 00130 00131 /*!************************************************************************** 00132 * @brief Set video resolution 00133 * @param context - transformation calculator context 00134 * @param width - video width (in pixels) 00135 * @param height - video height (in pixels) 00136 ****************************************************************************/ 00137 void VT_SetVideoResolution(void *context, U16BIT width, U16BIT height); 00138 00139 /*!************************************************************************** 00140 * @brief Set screen resolution 00141 * @param context - transformation calculator context 00142 * @param width - screen width (in pixels) 00143 * @param height - screen height (in pixels) 00144 ****************************************************************************/ 00145 void VT_SetScreenResolution(void *context, U16BIT width, U16BIT height); 00146 00147 /*!************************************************************************** 00148 * @brief Set profile to apply MHEG5 option 00149 * @param context - transformation calculator context 00150 * @param enable - TRUE turns MHEG5 option on 00151 ****************************************************************************/ 00152 void VT_SetProfileMheg5(void *context, BOOLEAN enable); 00153 00154 /*!************************************************************************** 00155 * @brief Set profile to apply HBBTV option 00156 * @param context - transformation calculator context 00157 * @param enable - TRUE turns MHEG5 option on 00158 ****************************************************************************/ 00159 void VT_SetProfileHbbtv(void *context, BOOLEAN enable); 00160 00161 /*!************************************************************************** 00162 * @brief Set HBBTV output window 00163 * @param context - transformation calculator context 00164 * @param output - window 00165 ****************************************************************************/ 00166 void VT_SetHbbtvWindow(void *context, S_RECTANGLE *output); 00167 00168 /*!************************************************************************** 00169 * @brief Set widescreeen alignment mode for MHEG-5 00170 * @param context - transformation calculator context 00171 * @param wam - widescreen alignment mode 00172 ****************************************************************************/ 00173 void VT_SetMhegVideoAlignment(void *context, E_VIDEO_ASPECT_MODE wam); 00174 00175 /*!************************************************************************** 00176 * @brief Get the current video transfromation rectangles 00177 * @param context - transformation calculator context 00178 * @param input_rect - input rectangle for transformation 00179 * @param output_rect - output rectangle for transformation 00180 ****************************************************************************/ 00181 void VT_GetVideoTransformation(void *context, S_RECTANGLE *input_rect, 00182 S_RECTANGLE *output_rect); 00183 00184 /*!************************************************************************** 00185 * @brief Return WSS (wide-screen signalling) value 00186 * @param context - transformation calculator context 00187 * @param wss - WSS value 00188 ****************************************************************************/ 00189 void VT_GetWss(void *context, U8BIT *wss); 00190 00191 /*!************************************************************************** 00192 * @brief Set video change callback 00193 * 00194 * The callback is called whenever the video transformation is changed 00195 * for any reason. 00196 * 00197 * @param context - transformation calculator context 00198 * @param callback - the callback to call 00199 * @param user_data - user data to pass to the callback 00200 ****************************************************************************/ 00201 void VT_SetVideoChangedCallback(void *context, 00202 F_VT_NOTIFICATION_CALLBACK callback, 00203 void *user_data); 00204 00205 /*!************************************************************************** 00206 * @brief Set user preference change callback 00207 * 00208 * The callback is called whenever the video transformation changes as 00209 * a result of a change in user preferences. 00210 * 00211 * @param context - transformation calculator context 00212 * @param callback - the callback to call 00213 * @param user_data - user data to pass to the callback 00214 ****************************************************************************/ 00215 void VT_SetUserPreferenceChangedCallback(void *context, 00216 F_VT_NOTIFICATION_CALLBACK callback, 00217 void *user_data); 00218 00219 /*!************************************************************************** 00220 * @brief Return the current decoder format conversion 00221 * @param context - transformation calculator context 00222 * @return Decoder format conversion 00223 ****************************************************************************/ 00224 E_FORMAT_CONVERSION VT_GetDecoderFormatConversion(void *context); 00225 00226 /*!************************************************************************** 00227 * @brief Return the current screen resolution 00228 * @param context - transformation calculator context 00229 * @param width - screen width 00230 * @param height - screen height 00231 ****************************************************************************/ 00232 void VT_GetScreenResolution(void *context, U16BIT *width, U16BIT *height); 00233 00234 /*!************************************************************************** 00235 * @brief Return the current video resolution 00236 * @param context - transformation calculator context 00237 * @param width - video width 00238 * @param height - video height 00239 ****************************************************************************/ 00240 void VT_GetVideoResolution(void *context, U16BIT *width, U16BIT *height); 00241 00242 /*!************************************************************************** 00243 * @brief Check if osd must be scaled due to MHEG scene aspect ratio 00244 * 00245 * @param context - transformation calculator context 00246 * @return TRUE if osd scaling is required, FALSE otherwise 00247 ****************************************************************************/ 00248 BOOLEAN VT_IsOsdScaled(void *context); 00249 00250 /*!************************************************************************** 00251 * @brief Set user preference for video aspect ratio 00252 * 00253 * @param context - transformation calculator context 00254 * @param alignment - New video alignment preference: 00255 ****************************************************************************/ 00256 void VT_SetVideoAlignmentPref(void *context, E_VIDEO_ASPECT_MODE alignment); 00257 00258 /*!************************************************************************** 00259 * @brief Set the decoder status 00260 * @param context - transformation calculator context 00261 * @param status - New decoder status 00262 ****************************************************************************/ 00263 void VT_SetDecoderStatus(void *context, E_STB_AV_DECODER_STATUS status); 00264 00265 /*!************************************************************************** 00266 * @brief Get the decoder status 00267 * @param context - transformation calculator context 00268 * @return The decoder status 00269 ****************************************************************************/ 00270 E_STB_AV_DECODER_STATUS VT_GetDecoderStatus(void *context); 00271 00272 #ifdef __cplusplus 00273 } 00274 #endif 00275 00276 #endif /*VTC_H*/