fix video and lvgl rotate

This commit is contained in:
zzh 2026-03-03 09:25:50 +08:00
parent adc2ffc714
commit 3c2f2634c3
7 changed files with 11 additions and 8 deletions

Binary file not shown.

View File

@ -91,7 +91,7 @@
#endif
#endif /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/
#define LV_DEF_REFR_PERIOD 150 /**< [ms] 150ms (6.7fps),优化后支持 tag.gif + 02.gif + 视频长时间稳定运行 */
#define LV_DEF_REFR_PERIOD 180 /**< [ms] 150ms (6.7fps),优化后支持 tag.gif + 02.gif + 视频长时间稳定运行 */
#define LV_DPI_DEF 130 /**< [px/inch] */

View File

@ -1 +1 @@
69abcb73eeff987b2759c8906bd77c27 /home/hyx/work/0212/demo/release/e_player-single-00-70-1.0.84.tar
205283fc5104c1ba9df3bba600eecd69 /home/hyx/work/0212/demo/release/e_player-single-00-70-1.0.84.tar

View File

@ -503,6 +503,7 @@ static int play_video(VideoPlayer *video_player, const MediaPath *media_path)
if (player)
{
qua_mm_player_set_parameter(player, KEY_PARAMETER_VO_DISPLAY_ID, (QUA_VOID_PTR)video_player->display);
qua_mm_player_set_parameter(player, KEY_PARAMETER_VO_ROTATE, (QUA_VOID_PTR)&g_screen_rotation);
xos_player_set_volume(player, 0);
qua_mm_player_set_loop(player, QUA_FALSE);
video_player->player = player;

View File

@ -30,7 +30,7 @@ static disp_handle_t front_disp;
static disp_handle_t back_disp;
// 屏幕旋转
int g_screen_rotation = 0;
int g_screen_rotation = 2;
qua_mm_system_ops_t *g_sys_ops = NULL;
qua_mm_tde_device_t *g_tde_device_for_hole = NULL;

View File

@ -115,13 +115,15 @@ int main(int argc, char **argv)
// 根据屏幕旋转调整小动画位置
extern int g_screen_rotation;
int small_x = 800 - 150;
int small_y = 1280 - 150;
int small_x = 800 - 150; // 650 (原始右下角)
int small_y = 1280 - 150; // 1130 (原始右下角)
if (g_screen_rotation == 2) {
// 180度旋转右下角变成左上角
small_x = 0;
small_y = 0;
// 180度旋转显示系统已旋转逻辑坐标需要反向
// 要显示在左上角,逻辑坐标应该是右下角
small_x = 800 - 150; // 650
small_y = 1280 - 150; // 1130
printf("[DEBUG] Rotation 2: using original bottom-right position for top-left display\n");
}
lv_obj_set_pos(small_gif, small_x, small_y);