fix gif+video run busy

This commit is contained in:
zzh 2026-02-25 14:29:27 +08:00
parent 2dbad2fa11
commit 7ca6110fd2
7 changed files with 19 additions and 11 deletions

BIN
02_fixed.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

View File

@ -91,7 +91,7 @@
#endif
#endif /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/
#define LV_DEF_REFR_PERIOD 50 /**< [ms] 50ms (20fps),降低刷新频率避免 VO_BUSY */
#define LV_DEF_REFR_PERIOD 150 /**< [ms] 150ms (6.7fps),优化后支持 tag.gif + 02.gif + 视频长时间稳定运行 */
#define LV_DPI_DEF 130 /**< [px/inch] */
@ -566,8 +566,8 @@
/** GIF decoder library */
#define LV_USE_GIF 1
#if LV_USE_GIF
/** GIF decoder accelerate */
#define LV_GIF_CACHE_DECODE_DATA 1
/** GIF decoder accelerate - 禁用缓存以避免透明帧残影 */
#define LV_GIF_CACHE_DECODE_DATA 0
#endif

View File

@ -1 +1 @@
9fd3959aad86f953b04dc72e7fc126b8 /home/hyx/work/0212/demo/release/e_player-single-00-70-1.0.84.tar
fc6846865270cca1350150fd2ee30cce /home/hyx/work/0212/demo/release/e_player-single-00-70-1.0.84.tar

View File

@ -101,13 +101,21 @@ int main(int argc, char **argv)
disp_handle_t disp = get_front_display();
/* 创建 GIF 动画 - 右下角 */
lv_obj_t *gif_img = lv_gif_create(disp.root_obj);
lv_gif_set_src(gif_img, "A:usrdata/pic/02.gif");
lv_obj_set_pos(gif_img, 800 - 240, 1280 - 240); /* 右下角:(560, 1040) */
lv_obj_set_size(gif_img, 240, 240);
lv_obj_clear_flag(gif_img, LV_OBJ_FLAG_HIDDEN);
lv_gif_restart(gif_img);
/* 创建 tag.gif 全屏背景动画 */
lv_obj_t *tag_gif = lv_gif_create(disp.root_obj);
lv_gif_set_src(tag_gif, "A:usrdata/pic/tag.gif");
lv_obj_set_pos(tag_gif, 0, 0); /* 全屏 */
lv_obj_set_size(tag_gif, 800, 1280);
lv_obj_clear_flag(tag_gif, LV_OBJ_FLAG_HIDDEN);
lv_gif_restart(tag_gif);
/* 创建 02.gif 小动画 - 右下角,缩小到 120x120 减少负载 */
lv_obj_t *small_gif = lv_gif_create(disp.root_obj);
lv_gif_set_src(small_gif, "A:usrdata/pic/02.gif");
lv_obj_set_pos(small_gif, 800 - 150, 1280 - 150); /* 右下角:(680, 1160) */
lv_obj_set_size(small_gif, 150, 150);
lv_obj_clear_flag(small_gif, LV_OBJ_FLAG_HIDDEN);
lv_gif_restart(small_gif);
//创建视频播放器
VideoPlayer *video_player=video_player_init(0);

BIN
tag.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB