DVBCore  20.3.0
DVBCore Documentation
stbvtc.c
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 // gives direct COM port access
27 // #define STB_DEBUG
28 
29 //---includes for this file----------------------------------------------------
30 // compiler library header files
31 
32 // third party header files
33 
34 // Ocean Blue Software header files
35 
36 #include <techtype.h>
37 #ifdef STB_DEBUG
38 #define DEBUG_PRINTING_ENABLED
39 #endif
40 #include <dbgfuncs.h>
41 
42 #include "stbvtc.h"
43 #include "stbhwav.h"
44 #include "stbheap.h"
45 #include "stbhwos.h"
46 #include "stbhwosd.h"
47 
48 #include "vtc.h"
49 
50 //---constant definitions for this file----------------------------------------
51 #ifdef STB_VT_PRINT_REQUIRED
52  #define STB_VT_PRINT(x) DEBUG_PRINTX_CONDITIONAL(DEBUG_STB_VT) x
53 #else
54  #ifdef STB_DEBUG
55  #define STB_VT_PRINT(x) DBGPRINT(x)
56  #else
57  #define STB_VT_PRINT(x)
58  #endif
59 #endif
60 
61 //---local typedef structs for this file---------------------------------------
62 
63 //---local (static) variable declarations for this file------------------------
64 // (internal variables declared static to make them local)
65 
66 static void *context = NULL;
67 static F_NOTIFY_VIDEO_AR vgr_video_ar = NULL;
68 
69 
70 //---local function prototypes for this file-----------------------------------
71 // (internal functions declared static to make them local)
72 
73 static void TransformationChangedCallback(void *user_data);
74 static void VideoChangedCallback(S_STB_AV_VIDEO_INFO *video_info,
75  void *user_data);
76 
77 //---global function definitions-----------------------------------------------
78 
79 /*!**************************************************************************
80  * @brief Initialise the VTC module
81  * @param None
82  * @return None
83  ****************************************************************************/
84 void STB_VTInitialise(void)
85 {
86  S_VT_OPTIONS options;
87 
88  FUNCTION_START(STB_VTInitialise);
89 
90  options.mheg_required = FALSE;
91  options.afd_required = TRUE;
92  options.hbbtv_required = FALSE;
93 
94  context = VT_Open(&options);
95  if (context != NULL)
96  {
97  VT_SetVideoChangedCallback(context, TransformationChangedCallback, NULL);
98  STB_AVSetVideoCallback(0, VideoChangedCallback, context);
99  VT_Enable(context, TRUE);
100  }
101 
102  FUNCTION_FINISH(STB_VTInitialise);
103 }
104 
105 /*!**************************************************************************
106  * @brief Set video alignment preference
107  * @param pref - video alignment
108  * @return None
109  ****************************************************************************/
110 void STB_VTSetVideoAlignmentPref(E_VIDEO_ASPECT_MODE alignment)
111 {
112  FUNCTION_START(STB_VTSetVideoAlignmentPref);
113  if (context != NULL)
114  {
115  VT_SetVideoAlignmentPref(context, alignment);
116  }
117  else
118  {
119  STB_VT_PRINT(("STB_VTSetAlignmentMode: NULL context (was the module initialised?)"));
120  }
121  FUNCTION_FINISH(STB_VTSetVideoAlignmentPref);
122 }
123 
131 {
132  FUNCTION_START(STB_VTCSetCustomModeCallback);
133  if (context != NULL)
134  {
135  VT_SetCustomModeCallback(context, callback);
136  }
137  else
138  {
139  STB_VT_PRINT(("STB_VTCSetCustomModeCallback: NULL context (was the module initialised?)"));
140  }
141  FUNCTION_FINISH(STB_VTCSetCustomModeCallback);
142 }
143 
144 /*!**************************************************************************
145  * @brief DVBCore application output window for entire video
146  * @param output - output video rectangle. NULL means full-screen, unless
147  * MHEG says duifferently.
148  * @return None
149  ****************************************************************************/
151 {
152  FUNCTION_START(STB_VTSetVideoOutput);
153 
154  if (context != NULL)
155  {
156  #ifdef DEBUG_PRINTING_ENABLED
157  if (output != NULL)
158  {
159  DBGPRINT("(%d,%d,%d,%d)", output->left, output->top, output->width, output->height);
160  }
161  else
162  {
163  DBGPRINT("output is NOT specified");
164  }
165  #endif
166  VT_SetAppScaling(context, output);
167  }
168  else
169  {
170  STB_VT_PRINT(("STB_VTSetVideoOutput: NULL context (was the module initialised?)"));
171  }
172 
173  FUNCTION_FINISH(STB_VTSetVideoOutput);
174 }
175 
176 /*!**************************************************************************
177  * @brief Turn on or off MHEG5 scaling calculation
178  * @param enable TRUE - turn on MHEG5 calculations
179  * @return None
180  ****************************************************************************/
181 void STB_VTSetMhegEnable(BOOLEAN enable)
182 {
183  FUNCTION_START(STB_VTSetMhegEnable);
184  if (context != NULL)
185  {
186  VT_SetProfileMheg5(context, enable);
187  }
188  else
189  {
190  STB_VT_PRINT(("STB_VTSetMhegEnable: NULL context (was the module initialised?)"));
191  }
192  FUNCTION_FINISH(STB_VTSetMhegEnable);
193 }
194 
195 /*!**************************************************************************
196  * @brief Set Mheg scaling resolution for video
197  * @param width - width resolution
198  * @param height - height resolution
199  * @return None
200  ****************************************************************************/
201 void STB_VTSetMhegScalingResolution(U16BIT width, U16BIT height)
202 {
203  FUNCTION_START(STB_VTSetMhegScalingResolution);
204 
205  if (context != NULL)
206  {
207  DBGPRINT("(%d,%d)", width, height);
208  VT_SetMhegScalingResolution(context, width, height);
209  }
210  else
211  {
212  STB_VT_PRINT(("STB_VTSetVideoScalingResolution: NULL context (was the module initialised?)"));
213  }
214  FUNCTION_FINISH(STB_VTSetMhegScalingResolution);
215 }
216 
217 /*!**************************************************************************
218  * @brief Set Mheg video scaling
219  * @param scaling - scaling transformation (offset, size)
220  * @return None
221  ****************************************************************************/
223 {
224  FUNCTION_START(STB_VTSetVideoScaling);
225 
226  if (context != NULL)
227  {
228  VT_SetMhegScaling(context, scaling);
229  }
230  else
231  {
232  STB_VT_PRINT(("STB_VTSetVideoScaling: NULL context (was the module initialised?)"));
233  }
234 
235  FUNCTION_FINISH(STB_VTSetVideoScaling);
236 }
237 
238 /*!**************************************************************************
239  * @brief Get display aspect ratio
240  * @param aspect_ratio - display aspect ratio
241  * @return None
242  ****************************************************************************/
243 E_ASPECT_RATIO STB_VTGetDisplayAspectRatio(void)
244 {
245  E_ASPECT_RATIO aspect_ratio;
246  FUNCTION_START(STB_VTSetDisplayAspectRatio);
247  if (context != NULL)
248  {
249  aspect_ratio = VT_GetDisplayAspectRatio(context);
250  }
251  else
252  {
253  STB_VT_PRINT(("STB_VTSetDisplayAspectRatio: NULL context (was the module initialised?)"));
254  aspect_ratio = ASPECT_UNDEFINED;
255  }
256  FUNCTION_FINISH(STB_VTSetDisplayAspectRatio);
257  return aspect_ratio;
258 }
259 
260 /*!**************************************************************************
261  * @brief Set display aspect ratio
262  * @param aspect_ratio - display aspect ratio
263  * @return None
264  ****************************************************************************/
265 void STB_VTSetDisplayAspectRatio(E_ASPECT_RATIO aspect_ratio)
266 {
267  FUNCTION_START(STB_VTSetDisplayAspectRatio);
268 
269  if (context != NULL)
270  {
271  VT_SetDisplayAspectRatio(context, aspect_ratio);
272  }
273  else
274  {
275  STB_VT_PRINT(("STB_VTSetDisplayAspectRatio: NULL context (was the module initialised?)"));
276  }
277 
278  FUNCTION_FINISH(STB_VTSetDisplayAspectRatio);
279 }
280 
281 /*!**************************************************************************
282  * @brief Set scene aspect ratio (MHEG-5 specific)
283  * @param aspect_ratio - scene aspect ratio
284  * @return None
285  ****************************************************************************/
286 void STB_VTSetMhegAspectRatio(E_ASPECT_RATIO aspect_ratio)
287 {
288  FUNCTION_START(STB_VTSetMhegAspectRatio);
289 
290  if (context != NULL)
291  {
292  VT_SetMhegAspectRatio(context, aspect_ratio);
293  }
294  else
295  {
296  STB_VT_PRINT(("STB_VTSetMhegAspectRatio: NULL context (was the module initialised?)"));
297  }
298 
299  FUNCTION_FINISH(STB_VTSetMhegAspectRatio);
300 }
301 
302 /*!**************************************************************************
303  * @brief Set MHEG5 widescreen alignment
304  * @param mode - widescreen alignment mode
305  * @return None
306  ****************************************************************************/
307 void STB_VTSetMhegVideoAlignment(E_VIDEO_ASPECT_MODE mode)
308 {
309  FUNCTION_START(STB_VTSetMhegVideoAlignment);
310 
311  if (context != NULL)
312  {
313  VT_SetMhegVideoAlignment(context, mode);
314  }
315  else
316  {
317  STB_VT_PRINT(("STB_VTSetWidescreenAlignmentMode: NULL context (was the module initialised?)"));
318  }
319 
320  FUNCTION_FINISH(STB_VTSetMhegVideoAlignment);
321 }
322 
323 /*!**************************************************************************
324  * @brief Turn on or off HBBTV scaling calculation
325  * @param enable TRUE - turn on MHEG5 calculations
326  * @return None
327  ****************************************************************************/
328 void STB_VTSetHbbtvEnable(BOOLEAN enable)
329 {
330  FUNCTION_START(STB_VTSetHbbtvEnable);
331  if (context != NULL)
332  {
333  VT_SetProfileHbbtv(context, enable);
334  }
335  else
336  {
337  STB_VT_PRINT(("STB_VTSetHbbtvEnable: NULL context (was the module initialised?)"));
338  }
339  FUNCTION_FINISH(STB_VTSetHbbtvEnable);
340 }
341 
342 /*!**************************************************************************
343  * @brief Set video scaling by HBBTV
344  * @param rect output window rectangle
345  * @return None
346  ****************************************************************************/
348 {
349  FUNCTION_START(STB_VTSetHbbtvVideoWindow);
350  if (context != NULL)
351  {
352  VT_SetHbbtvWindow(context, rect);
353  }
354  else
355  {
356  STB_VT_PRINT(("STB_VTSetHbbtvVideoWindow: NULL context (was the module initialised?)"));
357  }
358 
359  FUNCTION_FINISH(STB_VTSetHbbtvVideoWindow);
360 }
361 
362 /*!**************************************************************************
363  * @brief Set video preferences change callback
364  *
365  * The callback function is called when video transformation is changed as a
366  * result of a user preference change (only).
367  *
368  * @param callback - callback for notification
369  * @param user_data - user data for the callback
370  * @return None
371  ****************************************************************************/
372 void STB_VTSetVideoPrefChangedCallback(void (*callback)(void *),
373  void *user_data)
374 {
375  FUNCTION_START(STB_VTSetUserPreferenceChangedCallback);
376 
377  if (context != NULL)
378  {
379  VT_SetUserPreferenceChangedCallback(context, callback, user_data);
380  }
381  else
382  {
383  STB_VT_PRINT(("STB_VTSetUserPreferenceChangedCallback: NULL context (was the module initialised?)"));
384  }
385 
386  FUNCTION_FINISH(STB_VTSetUserPreferenceChangedCallback);
387 }
388 
389 /*!**************************************************************************
390  * @brief Set video preferences change callback
391  *
392  * The callback function is called when video transformation is changed as a
393  * result of a user preference change (only).
394  *
395  * @param callback - callback for notification
396  * @param user_data - user data for the callback
397  * @return None
398  ****************************************************************************/
399 void STB_VTSetVideoRatioCallback(F_NOTIFY_VIDEO_AR ar)
400 {
401  FUNCTION_START(STB_VTSetVideoRatioCallback);
402 
403  vgr_video_ar = ar;
404 
405  FUNCTION_FINISH(STB_VTSetVideoRatioCallback);
406 }
407 
408 /*!**************************************************************************
409  * @brief Return the current decoder format conversion
410  * @return The current format conversion
411  ****************************************************************************/
412 E_FORMAT_CONVERSION STB_VTGetDecoderFormatConversion(void)
413 {
414  E_FORMAT_CONVERSION format_conversion;
415  FUNCTION_START(STB_VTGetDecoderFormatConversion);
416  if (context != NULL)
417  {
418  format_conversion = VT_GetDecoderFormatConversion(context);
419  }
420  else
421  {
422  format_conversion = FORMAT_CONVERSION_IGNORE;
423  STB_VT_PRINT(("STB_VTGetDecoderFormatConversion: NULL context (was the module initialised?)"));
424  }
425  FUNCTION_FINISH(STB_VTGetDecoderFormatConversion);
426  return format_conversion;
427 }
428 
429 /*!**************************************************************************
430  * @brief Return the current video resolution
431  * @param width - video width
432  * @param height - video height
433  * @return None
434  ****************************************************************************/
435 void STB_VTGetVideoResolution(U16BIT *width, U16BIT *height)
436 {
437  FUNCTION_START(STB_VTGetVideoResolution);
438 
439  *width = 0;
440  *height = 0;
441 
442  if (context != NULL)
443  {
444  VT_GetVideoResolution(context, width, height);
445  }
446  else
447  {
448  STB_VT_PRINT(("STB_VTGetVideoResolution: NULL context (was the module initialised?)"));
449  }
450 
451  FUNCTION_FINISH(STB_VTGetVideoResolution);
452 }
453 
454 /*!**************************************************************************
455  * @brief Return the current video aspect ratio
456  * @return E_ASPECT_RATIO aspect ratio
457  ****************************************************************************/
458 E_ASPECT_RATIO STB_VTGetVideoAspectRatio(void)
459 {
460  E_ASPECT_RATIO ar = ASPECT_UNDEFINED;
461 
462  FUNCTION_START(STB_VTGetVideoAspectRatio);
463 
464  if (context != NULL)
465  {
466  ar = VT_GetVideoAspectRatio(context);
467  }
468  else
469  {
470  STB_VT_PRINT(("STB_VTGetVideoAspectRatio: NULL context (was the module initialised?)"));
471  }
472 
473  FUNCTION_FINISH(STB_VTGetVideoAspectRatio);
474 
475  return ar;
476 }
477 
478 //---local function definitions------------------------------------------------
479 
480 /*!**************************************************************************
481  * @brief Callback which is called when the video transformation changes
482  * @param user_data - user data for the callback
483  * @return None
484  ****************************************************************************/
485 static void TransformationChangedCallback(void *user_data)
486 {
487  S_RECTANGLE input_rect;
488  S_RECTANGLE output_rect;
489  U16BIT screen_width;
490  U16BIT screen_height;
491  BOOLEAN osd_scaled;
492  E_STB_AV_DECODER_STATUS decoder_status;
493 
494  FUNCTION_START(TransformationChangedCallback);
495  USE_UNWANTED_PARAM(user_data);
496 
497  if (context != NULL)
498  {
499  /* Apply video transformation (if relevant) */
500  decoder_status = VT_GetDecoderStatus(context);
501  if (decoder_status != DECODER_STATUS_NONE)
502  {
503  VT_GetVideoTransformation(context, &input_rect, &output_rect);
504  STB_VT_PRINT(("STB_AVApplyVideoTransformation(0, [(%d,%d) %dx%d], [(%d,%d) %dx%d])",
505  input_rect.left, input_rect.top, input_rect.width, input_rect.height,
506  output_rect.left, output_rect.top, output_rect.width, output_rect.height));
507  STB_AVApplyVideoTransformation(0, &input_rect, &output_rect);
508  }
509  #ifdef DEBUG_PRINTING_ENABLED
510  else
511  {
512  VT_GetVideoTransformation(context, &input_rect, &output_rect);
513  DBGPRINT("decoder_status is NONE! out=(%d,%d,%d,%d)",
514  output_rect.left, output_rect.top, output_rect.width, output_rect.height);
515  }
516  #endif
517 
518  /* Apply OSD transformation */
519  STB_OSDGetSize(&screen_width, &screen_height);
520  osd_scaled = VT_IsOsdScaled(context);
521  STB_OSDResize(osd_scaled, screen_width, screen_height, 0, 0);
522  }
523  else
524  {
525  STB_VT_PRINT(("TransformationChangedCallback: NULL context (was the module initialised?)"));
526  }
527 
528  FUNCTION_FINISH(TransformationChangedCallback);
529 }
530 
531 /*!**************************************************************************
532  * @brief Callback which is called when video properties change
533  * @param video_info - new video information
534  * @param context - transformation manager context
535  * @return None
536  ****************************************************************************/
537 static void VideoChangedCallback(S_STB_AV_VIDEO_INFO *video_info,
538  void *context)
539 {
540  FUNCTION_START(VideoChangedCallback);
541 
542  VT_Enable(context, FALSE);
543 
544  if ((video_info->flags & VIDEO_INFO_VIDEO_RESOLUTION) != 0)
545  {
546  /* New video resolution */
547  STB_VT_PRINT(("VideoChangedCallback: Video resolution %d %d",
548  video_info->video_width,
549  video_info->video_height));
550  VT_SetVideoResolution(context, video_info->video_width,
551  video_info->video_height);
552  }
553 
554  if ((video_info->flags & VIDEO_INFO_SCREEN_RESOLUTION) != 0)
555  {
556  /* New screen resolution */
557  STB_VT_PRINT(("VideoChangedCallback: Screen resolution %d %d",
558  video_info->screen_width,
559  video_info->screen_height));
560  VT_SetScreenResolution(context, video_info->screen_width,
561  video_info->screen_height);
562  }
563 
564  if ((video_info->flags & VIDEO_INFO_VIDEO_ASPECT_RATIO) != 0)
565  {
566  /* New video aspect ratio */
567  STB_VT_PRINT(("VideoChangedCallback: Video aspect ratio %s",
568  video_info->video_aspect_ratio == ASPECT_RATIO_4_3 ? "ASPECT_RATIO_4_3" :
569  video_info->video_aspect_ratio == ASPECT_RATIO_16_9 ? "ASPECT_RATIO_16_9" :
570  "*unknown*"));
571 
572  VT_SetVideoAspectRatio(context, video_info->video_aspect_ratio);
573  if (vgr_video_ar != NULL)
574  {
575  vgr_video_ar(video_info->video_aspect_ratio);
576  }
577  }
578 
579  if ((video_info->flags & VIDEO_INFO_DISPLAY_ASPECT_RATIO) != 0)
580  {
581  /* New video aspect ratio */
582  STB_VT_PRINT(("VideoChangedCallback: Display aspect ratio %s",
583  video_info->display_aspect_ratio == ASPECT_RATIO_4_3 ? "ASPECT_RATIO_4_3" :
584  video_info->display_aspect_ratio == ASPECT_RATIO_16_9 ? "ASPECT_RATIO_16_9" :
585  "*unknown*"));
586 
587  VT_SetDisplayAspectRatio(context, video_info->display_aspect_ratio);
588  }
589 
590  if ((video_info->flags & VIDEO_INFO_AFD) != 0)
591  {
592  /* New AFD value */
593  STB_VT_PRINT(("VideoChangedCallback: AFD value %d",
594  video_info->afd));
595  VT_SetAfd(context, video_info->afd);
596  }
597 
598  if ((video_info->flags & VIDEO_INFO_DECODER_STATUS) != 0)
599  {
600  /* New decoder status */
601  STB_VT_PRINT(("VideoChangedCallback: Decoder status %s",
602  video_info->status == DECODER_STATUS_NONE ? "DECODER_STATUS_NONE" :
603  video_info->status == DECODER_STATUS_VIDEO ? "DECODER_STATUS_VIDEO" :
604  video_info->status == DECODER_STATUS_IFRAME ? "DECODER_STATUS_IFRAME" :
605  "*unknown*"));
606  VT_SetDecoderStatus(context, video_info->status);
607  }
608 
609  VT_Enable(context, TRUE);
610 
611  FUNCTION_FINISH(VideoChangedCallback);
612 }
613 
614 //*****************************************************************************
615 // End of file
616 //*****************************************************************************
617 
void STB_VTSetVideoOutput(S_RECTANGLE *output)
DVBCore application output window for entire video.
Definition: stbvtc.c:150
E_ASPECT_RATIO STB_VTGetDisplayAspectRatio(void)
Get display aspect ratio.
Definition: stbvtc.c:243
void VT_SetHbbtvWindow(void *context, S_RECTANGLE *output)
Set HBBTV output window.
Definition: vtc.c:832
E_FORMAT_CONVERSION STB_VTGetDecoderFormatConversion(void)
Return the current decoder format conversion.
Definition: stbvtc.c:412
void VT_SetProfileHbbtv(void *context, BOOLEAN enable)
Set profile to apply HBBTV option.
Definition: vtc.c:811
void VT_SetMhegScalingResolution(void *context, U16BIT width, U16BIT height)
Set MHEG5 scaling resolution.
Definition: vtc.c:633
void STB_VTInitialise(void)
Initialise the VTC module.
Definition: stbvtc.c:84
void STB_VTSetHbbtvVideoWindow(S_RECTANGLE *rect)
Set video scaling by HBBTV.
Definition: stbvtc.c:347
void VT_GetVideoResolution(void *context, U16BIT *width, U16BIT *height)
Return the current video resolution.
Definition: vtc.c:977
void VT_SetUserPreferenceChangedCallback(void *context, F_VT_NOTIFICATION_CALLBACK callback, void *user_data)
Set user preference change callback.
Definition: vtc.c:921
void STB_VTSetMhegScalingResolution(U16BIT width, U16BIT height)
Set Mheg scaling resolution for video.
Definition: stbvtc.c:201
void VT_SetAppScaling(void *context, S_RECTANGLE *window)
Set application scaling information.
Definition: vtc.c:686
void VT_SetVideoChangedCallback(void *context, F_VT_NOTIFICATION_CALLBACK callback, void *user_data)
Set video change callback.
Definition: vtc.c:898
void VT_SetCustomModeCallback(void *context, F_VT_CUSTOM_MODE_CALLBACK callback)
Set customer mode callback.
Definition: vtc.c:613
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 VT_SetAfd(void *context, U8BIT afd_value)
Set current AFD (active format descriptor value)
Definition: vtc.c:446
BOOLEAN VT_IsOsdScaled(void *context)
Check if osd must be scaled due to MHEG scene aspect ratio.
Definition: vtc.c:1007
void VT_SetDisplayAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio)
Set display aspect ratio.
Definition: vtc.c:548
void STB_VTSetMhegVideoAlignment(E_VIDEO_ASPECT_MODE mode)
Set MHEG5 widescreen alignment.
Definition: stbvtc.c:307
Header file - Function prototypes for OSD control.
E_STB_AV_DECODER_STATUS VT_GetDecoderStatus(void *context)
Get the decoder status.
Definition: vtc.c:1049
void VT_SetMhegScaling(void *context, S_RECTANGLE *scaling)
Set MHEG-5 scaling information.
Definition: vtc.c:657
E_FORMAT_CONVERSION VT_GetDecoderFormatConversion(void *context)
Return the current decoder format conversion.
Definition: vtc.c:939
E_ASPECT_RATIO VT_GetVideoAspectRatio(void *context)
Get video aspect ratio.
Definition: vtc.c:492
Header file - Function prototypes for A/V control.
void STB_VTSetVideoPrefChangedCallback(void(*callback)(void *), void *user_data)
Set video preferences change callback.
Definition: stbvtc.c:372
void STB_AVSetVideoCallback(U8BIT path, void(*callback)(S_STB_AV_VIDEO_INFO *, void *), void *user_data)
Register callback for updated video information.
void VT_SetMhegAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio)
Set MHEG-5 aspect ratio.
Definition: vtc.c:510
void VT_SetVideoAlignmentPref(void *context, E_VIDEO_ASPECT_MODE alignment)
Set user preference for video aspect ratio alignment.
Definition: vtc.c:572
void STB_VTSetHbbtvEnable(BOOLEAN enable)
Turn on or off HBBTV scaling calculation.
Definition: stbvtc.c:328
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
void VT_SetVideoAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio)
Set video aspect ratio.
Definition: vtc.c:469
void STB_VTSetMhegVideoScaling(S_RECTANGLE *scaling)
Set Mheg video scaling.
Definition: stbvtc.c:222
Header file - macros and function prototypes for public use.
void STB_OSDGetSize(U16BIT *width, U16BIT *height)
Returns the current width and height of the OSD.
void VT_Enable(void *context, BOOLEAN enable)
Enable or disable transformation calculations.
Definition: vtc.c:424
Debug functions header file.
void STB_VTSetVideoAlignmentPref(E_VIDEO_ASPECT_MODE alignment)
Set video alignment preference.
Definition: stbvtc.c:110
void STB_VTSetMhegAspectRatio(E_ASPECT_RATIO aspect_ratio)
Set scene aspect ratio (MHEG-5 specific)
Definition: stbvtc.c:286
void VT_SetProfileMheg5(void *context, BOOLEAN enable)
Set profile to apply MHEG5 option.
Definition: vtc.c:790
void VT_SetScreenResolution(void *context, U16BIT width, U16BIT height)
Set screen resolution.
Definition: vtc.c:744
E_ASPECT_RATIO VT_GetDisplayAspectRatio(void *context)
Get display aspect ratio.
Definition: vtc.c:533
void STB_VTGetVideoResolution(U16BIT *width, U16BIT *height)
Return the current video resolution.
Definition: stbvtc.c:435
void STB_OSDResize(BOOLEAN scaling, U16BIT width, U16BIT height, U16BIT x_offset, U16BIT y_offset)
Reconifugres the OSD for a new screen size.
Header file - Function prototypes for operating system.
System Wide Global Technical Data Type Definitions.
void STB_AVApplyVideoTransformation(U8BIT path, S_RECTANGLE *input, S_RECTANGLE *output)
Apply video transformation.
void VT_SetVideoResolution(void *context, U16BIT width, U16BIT height)
Set video resolution.
Definition: vtc.c:717
void * VT_Open(S_VT_OPTIONS *options)
Open video transformation manager.
Definition: vtc.c:348
E_ASPECT_RATIO STB_VTGetVideoAspectRatio(void)
Return the current video aspect ratio.
Definition: stbvtc.c:458
void STB_VTSetDisplayAspectRatio(E_ASPECT_RATIO aspect_ratio)
Set display aspect ratio.
Definition: stbvtc.c:265
Header file - Function prototypes for heap memory.
void STB_VTSetVideoRatioCallback(F_NOTIFY_VIDEO_AR ar)
Set video preferences change callback.
Definition: stbvtc.c:399
Blank description.
void VT_SetDecoderStatus(void *context, E_STB_AV_DECODER_STATUS status)
Set the decoder status.
Definition: vtc.c:1029
#define DBGPRINT(...)
Definition: dbgfuncs.h:74
void VT_SetMhegVideoAlignment(void *context, E_VIDEO_ASPECT_MODE mode)
Set widescreeen alignment mode for MHEG-5.
Definition: vtc.c:770
void STB_VTSetMhegEnable(BOOLEAN enable)
Turn on or off MHEG5 scaling calculation.
Definition: stbvtc.c:181
void VT_GetVideoTransformation(void *context, S_RECTANGLE *input_rect, S_RECTANGLE *output_rect)
Get the current video transfromation rectangles.
Definition: vtc.c:863