模拟器新增 RemoDispBus 推流服务端,修复远端取图
This commit is contained in:
@@ -31,6 +31,18 @@ int sim_port_init(int32_t hor_res, int32_t ver_res);
|
||||
*/
|
||||
void *sim_port_get_display(void);
|
||||
|
||||
/*
|
||||
* 函数功能:读取当前屏幕内容并转换为 1bpp 单色位图
|
||||
* 入口参数:buf - 输出缓冲(调用方分配,≥ 宽*高/8 字节)
|
||||
* buf_size - buf 容量(字节)
|
||||
* 返回值:0 - 成功,-1 - 失败
|
||||
* 限定条件:sim_port_init() 已成功;须在 SDL 所属线程(主循环线程)调用
|
||||
* 函数说明:经 SDL_RenderReadPixels 读回屏幕实际呈现的 ARGB8888 像素,
|
||||
* 按红通道阈值 128 判白(=1/墨)/黑(=0),打包为 1bpp MSB-first,
|
||||
* 与 MCU 端 ui_port_get_framebuffer 的 1bpp 布局一致
|
||||
*/
|
||||
int sim_port_get_screen_mono(uint8_t *buf, uint32_t buf_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user