Toybrick
标题:
rk3588 使用python库编写hdmirx应用时报错
[打印本页]
作者:
woyehua
时间:
2025-1-16 09:36
标题:
rk3588 使用python库编写hdmirx应用时报错
本帖最后由 woyehua 于 2025-1-16 09:38 编辑
使用python sdk编写hdmi rx的应用,只能显示几秒的画面就会报错
[01/15 21:03:16.297] E/: (fGetstream in :256): V4l2Capture: cannot dequeue new buf ...
复制代码
而且无法捕获异常,这里是什么原因?
使用的测试代码如下
import
toybrick
as
toy
import
time
if
__name__ ==
'__main__'
:
count = 0
begintime = time.time()
hdmi = toy.HdmiCapture(1920, 1080)
disp = toy.Display(
''
, 1920, 1080,
True
)
print(
"Connect display width = "
+ str(disp.width()) +
" ; height = "
+ str(disp.height()))
while
True
:
#尝试在这里(hdmi.read)捕获异常,无效,应该是c代码直接error终止了进程
ret, frame = hdmi.read(1920, 1080)
if
frame
is
not
None
:
ret = disp.imshow(frame)
if
ret == toy.RET_TERMINATED:
break
count += 1
if
time.time() - begintime >= 10:
fps = count / (time.time() - begintime)
print(
'fps = '
+ str(fps))
count = 0
begintime = time.time()
作者:
jefferyzhang
时间:
2025-1-16 14:27
本帖最后由 jefferyzhang 于 2025-1-16 15:41 编辑
什么板子? cannot dequeue new buf 就是hdmi那边没有数据进来。建议用v4l2-ctl抓下数据调试下
欢迎光临 Toybrick (https://t.rock-chips.com/)
Powered by Discuz! X3.3