static void event_handler_set_window_parameters();
mm_navevent_handler_h event_handler;
mm_navevent_handler_size_s image_size;
+player_display_rotation_e g_rotation = PLAYER_DISPLAY_ROTATION_NONE;
#endif
static tizen_profile_e _get_tizen_profile()
if (player_set_display_rotation(g_player[0], rotation) != PLAYER_ERROR_NONE)
g_print("failed to set_display_rotation\n");
#ifdef USE_EVENT_HANDLER
+ g_rotation = (player_display_rotation_e) rotation;
event_handler_set_window_parameters();
#endif
}
{
player_display_rotation_e rotation = 0;
player_get_display_rotation(g_player[0], &rotation);
+#ifdef USE_EVENT_HANDLER
+ g_rotation = (player_display_rotation_e) rotation;
+#endif
g_print(" ==> [Player_Test] Video Overlay Display rotation: [%d ] \n", rotation);
}
static void event_handler_set_window_parameters()
{
- player_display_rotation_e window_orientation;
mm_navevent_handler_size_s window_size;
float image_ratio;
- player_get_display_rotation(g_player[0], &window_orientation);
elm_win_screen_size_get(selected_win_id, NULL, NULL, &window_size.width, &window_size.height);
image_ratio = (float)image_size.width / (float)image_size.height;
- if (window_orientation == PLAYER_DISPLAY_ROTATION_NONE ||
- window_orientation == PLAYER_DISPLAY_ROTATION_180) {
+ if (g_rotation == PLAYER_DISPLAY_ROTATION_NONE ||
+ g_rotation == PLAYER_DISPLAY_ROTATION_180) {
window_size.height = (int)((float)window_size.width / image_ratio);
} else {
window_size.height = window_size.width;
}
mm_navevent_handler_set_window_parameters(event_handler,
- (mm_navevent_handler_orientation_e)window_orientation, window_size);
+ (mm_navevent_handler_orientation_e)g_rotation, window_size);
}
#endif