38 #define DEBUG_PRINTING_ENABLED 51 #ifdef STB_VT_PRINT_REQUIRED 52 #define STB_VT_PRINT(x) DEBUG_PRINTX_CONDITIONAL(DEBUG_STB_VT) x 55 #define STB_VT_PRINT(x) DBGPRINT(x) 57 #define STB_VT_PRINT(x) 66 static void *context = NULL;
67 static F_NOTIFY_VIDEO_AR vgr_video_ar = NULL;
73 static void TransformationChangedCallback(
void *user_data);
90 options.mheg_required = FALSE;
91 options.afd_required = TRUE;
92 options.hbbtv_required = FALSE;
119 STB_VT_PRINT((
"STB_VTSetAlignmentMode: NULL context (was the module initialised?)"));
139 STB_VT_PRINT((
"STB_VTCSetCustomModeCallback: NULL context (was the module initialised?)"));
156 #ifdef DEBUG_PRINTING_ENABLED 159 DBGPRINT(
"(%d,%d,%d,%d)", output->left, output->top, output->width, output->height);
163 DBGPRINT(
"output is NOT specified");
170 STB_VT_PRINT((
"STB_VTSetVideoOutput: NULL context (was the module initialised?)"));
190 STB_VT_PRINT((
"STB_VTSetMhegEnable: NULL context (was the module initialised?)"));
212 STB_VT_PRINT((
"STB_VTSetVideoScalingResolution: NULL context (was the module initialised?)"));
224 FUNCTION_START(STB_VTSetVideoScaling);
232 STB_VT_PRINT((
"STB_VTSetVideoScaling: NULL context (was the module initialised?)"));
235 FUNCTION_FINISH(STB_VTSetVideoScaling);
245 E_ASPECT_RATIO aspect_ratio;
253 STB_VT_PRINT((
"STB_VTSetDisplayAspectRatio: NULL context (was the module initialised?)"));
254 aspect_ratio = ASPECT_UNDEFINED;
275 STB_VT_PRINT((
"STB_VTSetDisplayAspectRatio: NULL context (was the module initialised?)"));
296 STB_VT_PRINT((
"STB_VTSetMhegAspectRatio: NULL context (was the module initialised?)"));
317 STB_VT_PRINT((
"STB_VTSetWidescreenAlignmentMode: NULL context (was the module initialised?)"));
337 STB_VT_PRINT((
"STB_VTSetHbbtvEnable: NULL context (was the module initialised?)"));
356 STB_VT_PRINT((
"STB_VTSetHbbtvVideoWindow: NULL context (was the module initialised?)"));
375 FUNCTION_START(STB_VTSetUserPreferenceChangedCallback);
383 STB_VT_PRINT((
"STB_VTSetUserPreferenceChangedCallback: NULL context (was the module initialised?)"));
386 FUNCTION_FINISH(STB_VTSetUserPreferenceChangedCallback);
414 E_FORMAT_CONVERSION format_conversion;
422 format_conversion = FORMAT_CONVERSION_IGNORE;
423 STB_VT_PRINT((
"STB_VTGetDecoderFormatConversion: NULL context (was the module initialised?)"));
426 return format_conversion;
448 STB_VT_PRINT((
"STB_VTGetVideoResolution: NULL context (was the module initialised?)"));
460 E_ASPECT_RATIO ar = ASPECT_UNDEFINED;
470 STB_VT_PRINT((
"STB_VTGetVideoAspectRatio: NULL context (was the module initialised?)"));
485 static void TransformationChangedCallback(
void *user_data)
490 U16BIT screen_height;
492 E_STB_AV_DECODER_STATUS decoder_status;
494 FUNCTION_START(TransformationChangedCallback);
495 USE_UNWANTED_PARAM(user_data);
501 if (decoder_status != DECODER_STATUS_NONE)
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));
509 #ifdef DEBUG_PRINTING_ENABLED 513 DBGPRINT(
"decoder_status is NONE! out=(%d,%d,%d,%d)",
514 output_rect.left, output_rect.top, output_rect.width, output_rect.height);
521 STB_OSDResize(osd_scaled, screen_width, screen_height, 0, 0);
525 STB_VT_PRINT((
"TransformationChangedCallback: NULL context (was the module initialised?)"));
528 FUNCTION_FINISH(TransformationChangedCallback);
540 FUNCTION_START(VideoChangedCallback);
544 if ((video_info->flags & VIDEO_INFO_VIDEO_RESOLUTION) != 0)
547 STB_VT_PRINT((
"VideoChangedCallback: Video resolution %d %d",
548 video_info->video_width,
549 video_info->video_height));
551 video_info->video_height);
554 if ((video_info->flags & VIDEO_INFO_SCREEN_RESOLUTION) != 0)
557 STB_VT_PRINT((
"VideoChangedCallback: Screen resolution %d %d",
558 video_info->screen_width,
559 video_info->screen_height));
561 video_info->screen_height);
564 if ((video_info->flags & VIDEO_INFO_VIDEO_ASPECT_RATIO) != 0)
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" :
573 if (vgr_video_ar != NULL)
575 vgr_video_ar(video_info->video_aspect_ratio);
579 if ((video_info->flags & VIDEO_INFO_DISPLAY_ASPECT_RATIO) != 0)
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" :
590 if ((video_info->flags & VIDEO_INFO_AFD) != 0)
593 STB_VT_PRINT((
"VideoChangedCallback: AFD value %d",
598 if ((video_info->flags & VIDEO_INFO_DECODER_STATUS) != 0)
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" :
611 FUNCTION_FINISH(VideoChangedCallback);
void STB_VTSetVideoOutput(S_RECTANGLE *output)
DVBCore application output window for entire video.
E_ASPECT_RATIO STB_VTGetDisplayAspectRatio(void)
Get display aspect ratio.
void VT_SetHbbtvWindow(void *context, S_RECTANGLE *output)
Set HBBTV output window.
E_FORMAT_CONVERSION STB_VTGetDecoderFormatConversion(void)
Return the current decoder format conversion.
void VT_SetProfileHbbtv(void *context, BOOLEAN enable)
Set profile to apply HBBTV option.
void VT_SetMhegScalingResolution(void *context, U16BIT width, U16BIT height)
Set MHEG5 scaling resolution.
void STB_VTInitialise(void)
Initialise the VTC module.
void STB_VTSetHbbtvVideoWindow(S_RECTANGLE *rect)
Set video scaling by HBBTV.
void VT_GetVideoResolution(void *context, U16BIT *width, U16BIT *height)
Return the current video resolution.
void VT_SetUserPreferenceChangedCallback(void *context, F_VT_NOTIFICATION_CALLBACK callback, void *user_data)
Set user preference change callback.
void STB_VTSetMhegScalingResolution(U16BIT width, U16BIT height)
Set Mheg scaling resolution for video.
void VT_SetAppScaling(void *context, S_RECTANGLE *window)
Set application scaling information.
void VT_SetVideoChangedCallback(void *context, F_VT_NOTIFICATION_CALLBACK callback, void *user_data)
Set video change callback.
void VT_SetCustomModeCallback(void *context, F_VT_CUSTOM_MODE_CALLBACK callback)
Set customer mode callback.
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...
void VT_SetAfd(void *context, U8BIT afd_value)
Set current AFD (active format descriptor value)
BOOLEAN VT_IsOsdScaled(void *context)
Check if osd must be scaled due to MHEG scene aspect ratio.
void VT_SetDisplayAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio)
Set display aspect ratio.
void STB_VTSetMhegVideoAlignment(E_VIDEO_ASPECT_MODE mode)
Set MHEG5 widescreen alignment.
Header file - Function prototypes for OSD control.
E_STB_AV_DECODER_STATUS VT_GetDecoderStatus(void *context)
Get the decoder status.
void VT_SetMhegScaling(void *context, S_RECTANGLE *scaling)
Set MHEG-5 scaling information.
E_FORMAT_CONVERSION VT_GetDecoderFormatConversion(void *context)
Return the current decoder format conversion.
E_ASPECT_RATIO VT_GetVideoAspectRatio(void *context)
Get video aspect ratio.
Header file - Function prototypes for A/V control.
void STB_VTSetVideoPrefChangedCallback(void(*callback)(void *), void *user_data)
Set video preferences change callback.
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.
void VT_SetVideoAlignmentPref(void *context, E_VIDEO_ASPECT_MODE alignment)
Set user preference for video aspect ratio alignment.
void STB_VTSetHbbtvEnable(BOOLEAN enable)
Turn on or off HBBTV scaling calculation.
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...
void VT_SetVideoAspectRatio(void *context, E_ASPECT_RATIO aspect_ratio)
Set video aspect ratio.
void STB_VTSetMhegVideoScaling(S_RECTANGLE *scaling)
Set Mheg video scaling.
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.
Debug functions header file.
void STB_VTSetVideoAlignmentPref(E_VIDEO_ASPECT_MODE alignment)
Set video alignment preference.
void STB_VTSetMhegAspectRatio(E_ASPECT_RATIO aspect_ratio)
Set scene aspect ratio (MHEG-5 specific)
void VT_SetProfileMheg5(void *context, BOOLEAN enable)
Set profile to apply MHEG5 option.
void VT_SetScreenResolution(void *context, U16BIT width, U16BIT height)
Set screen resolution.
E_ASPECT_RATIO VT_GetDisplayAspectRatio(void *context)
Get display aspect ratio.
void STB_VTGetVideoResolution(U16BIT *width, U16BIT *height)
Return the current video resolution.
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.
void * VT_Open(S_VT_OPTIONS *options)
Open video transformation manager.
E_ASPECT_RATIO STB_VTGetVideoAspectRatio(void)
Return the current video aspect ratio.
void STB_VTSetDisplayAspectRatio(E_ASPECT_RATIO aspect_ratio)
Set display aspect ratio.
Header file - Function prototypes for heap memory.
void STB_VTSetVideoRatioCallback(F_NOTIFY_VIDEO_AR ar)
Set video preferences change callback.
void VT_SetDecoderStatus(void *context, E_STB_AV_DECODER_STATUS status)
Set the decoder status.
void VT_SetMhegVideoAlignment(void *context, E_VIDEO_ASPECT_MODE mode)
Set widescreeen alignment mode for MHEG-5.
void STB_VTSetMhegEnable(BOOLEAN enable)
Turn on or off MHEG5 scaling calculation.
void VT_GetVideoTransformation(void *context, S_RECTANGLE *input_rect, S_RECTANGLE *output_rect)
Get the current video transfromation rectangles.