10.1屏播放测试程序
Go to file
2026-02-25 14:29:27 +08:00
bin fix gif+video run busy 2026-02-25 14:29:27 +08:00
extern initial: demo project before FB+video coexistence fix 2026-02-12 13:17:55 +08:00
include fix gif 2026-02-25 11:32:55 +08:00
lvgl initial: demo project before FB+video coexistence fix 2026-02-12 13:17:55 +08:00
release fix gif+video run busy 2026-02-25 14:29:27 +08:00
src fix gif+video run busy 2026-02-25 14:29:27 +08:00
.gitignore 修复: main.c编译错误 - 未定义file_path, 错误的返回类型 2026-02-12 13:25:54 +08:00
02_fixed.gif fix gif+video run busy 2026-02-25 14:29:27 +08:00
bk.jpg 功能: FB+视频共存 - bk背景+tag叠加+视频挖洞 2026-02-12 14:34:25 +08:00
build.sh initial: demo project before FB+video coexistence fix 2026-02-12 13:17:55 +08:00
CMakeLists.txt fix gif 2026-02-25 11:32:55 +08:00
lv_conf.h fix gif+video run busy 2026-02-25 14:29:27 +08:00
README.md 文档: 添加README说明修改点 2026-02-12 18:46:35 +08:00
tag.gif fix gif+video run busy 2026-02-25 14:29:27 +08:00
tag.png 功能: FB+视频共存 - bk背景+tag叠加+视频挖洞 2026-02-12 14:34:25 +08:00
toolchain-arm.cmake initial: demo project before FB+video coexistence fix 2026-02-12 13:17:55 +08:00

eplayer demo - FB+视频共存问题

问题与根因

FB 和视频无法共存:compress(TRUE) 下 render 阻塞,compress(FALSE) 下视频返回 VO_BUSY。

根因: rootfs_overlay/qua/ko/loadko.shinsmod fhfb.ko fbc=0 禁用了 FB 压缩,且 fhfb.ko 是旧版不支持 fbc。

修改点

内核层

  1. 替换 fhfb.ko — 用 SDK 新版替换 rootfs_overlay/qua/ko/fhfb.ko(旧版 md5:96d321 → 新版 md5:58050d
  2. loadko.sh 启用 fbc — fbc=0fbc=3000vram0_size=4000fhfb0_fbc=1

应用层

  1. e_logger.c — 修复 log_print 死锁(持有 mutex 后调用 log_init 再次加锁)
  2. fbdev_10xd.c — compress(TRUE) 前加载 bk.rgba 全屏铺底 + tag.rgba 底部 alpha 叠加
  3. fbdev.c — 跳过 LVGL memcpy仅做挖洞 + render
  4. main.c — 视频区域改为顶部LVGL root 设为透明

关键时序

mmap → 写入图片 → compress(TRUE) → VO enable → show(TRUE) → render → 挖洞 → 播视频

图片必须在 compress(TRUE) 之前写入 FB buffer。

素材

素材需预转换PNG/JPG → raw BGRA

python3 -c " from PIL import Image import struct img = Image.open('/path/to/bk1.jpg').convert('RGBA') print(f'Size: {img.size}') with open('/path/to/bk1.rgba', 'wb') as f: for y in range(img.height): for x in range(img.width): r, g, b, a = img.getpixel((x, y)) f.write(struct.pack('BBBB', b, g, r, a)) print('Done') "

设备上 crc32 与 zlib 冲突,无法用 libpng需预转换 raw 格式。