文档: 添加README说明修改点
This commit is contained in:
parent
65e29b91e4
commit
b77c31d4ff
46
README.md
Normal file
46
README.md
Normal file
@ -0,0 +1,46 @@
|
||||
# eplayer demo - FB+视频共存问题
|
||||
|
||||
## 问题与根因
|
||||
|
||||
FB 和视频无法共存:`compress(TRUE)` 下 render 阻塞,`compress(FALSE)` 下视频返回 VO_BUSY。
|
||||
|
||||
根因: `rootfs_overlay/qua/ko/loadko.sh` 中 `insmod 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=0` → `fbc=3000`,`vram0_size=4000`,`fhfb0_fbc=1`
|
||||
|
||||
### 应用层
|
||||
|
||||
3. e_logger.c — 修复 `log_print` 死锁(持有 mutex 后调用 `log_init` 再次加锁)
|
||||
4. fbdev_10xd.c — `compress(TRUE)` 前加载 `bk.rgba` 全屏铺底 + `tag.rgba` 底部 alpha 叠加
|
||||
5. fbdev.c — 跳过 LVGL memcpy,仅做挖洞 + render
|
||||
6. 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 格式。
|
||||
Loading…
Reference in New Issue
Block a user