|
【应用开发】
FFMedia中回调函数问题
发表于 2023-7-31 11:08:56
浏览:3624
|
回复:5
打印
只看该作者
[复制链接]
楼主
问题描述及复现步骤:
在使用官方的FFMedia python demo中- cv_display.module = last_module.addExternalConsumer("Cv2Display", cv_display, cv2_extcall_back)
复制代码 在cv2_extcall_back回调函数中,打印日志发现没有效果
- firefly@firefly:~/project/ffmedia_release/demo$ python3 ./demo.py -i rtsp://admin:a88888888@192.168.10.10:554/Streaming/Channels/1 --rtsp_transport 1 -b RGB24 -c 1
- Firefly FFMedia: v2.1.1
- input source is a rtsp url
- INFO: ff_media: connectToServer: connected to server 192.168.10.10:554
- INFO: 16ModuleRtspClient: init: rtsp para w h: 1280 720, ws hs: 1280 720, format: H264
- mpp[1411]: mpp_rt: NOT found ion allocator
- mpp[1411]: mpp_rt: found drm allocator
- mpp[1411]: mpp_info: mpp version: 8a85dc5d author: Herman Chen 2022-03-14 [mpp_enc]: Fix stuck on reset async mode encoder
- librga fail to get driver version! Legacy mode will be enabled.
- rga_api version 1.7.0_[1]
- ======================1====================================
- wait...INFO: 10MppDecoder: getTimeoutSample: 0x1aeea80 frame info changed 1 error 0 discard 0
- RgaBlit(1387) RGA_BLIT fail: Bad address
- RgaBlit(1388) RGA_BLIT fail: Bad address
- fd-vir-phy-hnd-format[18, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 2560, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- fd-vir-phy-hnd-format[35, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 1792, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- This output the user patamaters when rga call blit fail
- ERROR: 9ModuleRga: work: Consume failed
- RgaBlit(1387) RGA_BLIT fail: Bad address
- RgaBlit(1388) RGA_BLIT fail: Bad address
- fd-vir-phy-hnd-format[19, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 2560, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- fd-vir-phy-hnd-format[35, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 1792, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- This output the user patamaters when rga call blit fail
- ERROR: 9ModuleRga: work: Consume failed
- RgaBlit(1387) RGA_BLIT fail: Bad address
- RgaBlit(1388) RGA_BLIT fail: Bad address
- fd-vir-phy-hnd-format[20, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 2560, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- fd-vir-phy-hnd-format[35, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 1792, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- This output the user patamaters when rga call blit fail
- ERROR: 9ModuleRga: work: Consume failed
- RgaBlit(1387) RGA_BLIT fail: Bad address
- RgaBlit(1388) RGA_BLIT fail: Bad address
- fd-vir-phy-hnd-format[21, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 2560, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- fd-vir-phy-hnd-format[35, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 1792, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- This output the user patamaters when rga call blit fail
- ERROR: 9ModuleRga: work: Consume failed
- RgaBlit(1387) RGA_BLIT fail: Bad address
- RgaBlit(1388) RGA_BLIT fail: Bad address
- fd-vir-phy-hnd-format[22, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 2560, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- fd-vir-phy-hnd-format[35, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 1792, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- This output the user patamaters when rga call blit fail
- ERROR: 9ModuleRga: work: Consume failed
- RgaBlit(1387) RGA_BLIT fail: Bad address
- RgaBlit(1388) RGA_BLIT fail: Bad address
- fd-vir-phy-hnd-format[23, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 2560, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- fd-vir-phy-hnd-format[35, (nil), (nil), (nil), 0]
- rect[0, 0, 1280, 720, 1280, 720, 1792, 0]
- f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
- This output the user patamaters when rga call blit fail
复制代码
代码如下
- def cv2_extcall_back(obj, VideoBuffer):
- print('=========================2========================')
- vb = m.VideoBuffer.from_base(VideoBuffer)
- if obj.sync is not None:
- delay = obj.sync.updateVideo(vb.getPUstimestamp(), 0)
- if delay > 0:
- time.sleep(delay/1000000)
- data = vb.getActiveData()
- try:
- img = data.reshape((vb.getImagePara().vstride, vb.getImagePara().hstride, 3))
- print("------------------------")
- except ValueError:
- print("Invalid image resolution!")
- resolution = find_two_numbers(data.size//3, vb.getImagePara().hstride, vb.getImagePara().vstride)
- print("Try the recommended resolution: -o {}x{}".format(resolution[0], resolution[1]))
- exit(-1)
- for i in range(obj.count):
- cv2.imshow(obj.name + str(i), img)
- cv2.waitKey(1)
复制代码
|
-
-
1.zip
516 Bytes, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1
|