瑞芯微Rockchip开发者社区
直播中

王利祥

7年用户 1378经验值
私信 关注
[问答]

怎样去使用RK39999Pro的1080P39解码框架能力呢

怎样去使用RK39999Pro的1080P39解码框架能力呢?

如何利用RK39999Pro的1080P39解码框架能力去开发3个社区?

回帖(1)

余煌木

2022-2-11 14:21:45
前言:

RK39999Pro拥有路1080P39解码框架能力,开发者不知道如何快速开发3个社区,快速开发者们在这里编写了一套简单的上手python库,可以让大家上手编写6个简单的上手Demo
。库目前还在非常多的测试版本阶段,发布了。需要在早期发现方便:

1。 2.python
授权Toybrick开发版,包含Toybrick 3399Pro和Toybrick 1888计算棒,其他产品我们无法使用。
3.该python不开源。所有代码仅在模块中提供使用模块的演示中有,请看 RK 的正式启动项目模块的演示模块还于演示来。
4. 该 python 模块是为了让关注神经网络应用程序的调试,比较高层,不会提供开发负载控制。
5


。思路分析:

R3399Pro的VPU支持多路编解码需要,主控想完成多路编解码并,请见谅。开发:

1. 使用多线程处理不同处理
速度的一些重要提示,也建议及时使用 GPU
。使用 Rtsp 获取数据,每个线程做的事情显示基本就是: Rtsp 获取数据 - 解码 -


逻辑代码:代码解析:


#!/usr/bin/env python3.6
import os
import toybrick as toy
import time
import threading
def func_rtspdisplay(gl, index, url, usr, pwd):
    rtsp = toy.input.createRtspClient(url, usr, pwd)
    rtsp.connect()
    last = time.time()
    while rtsp.is_opened():
        frame = rtsp.read_rgb(640, 360)
        now = time.time()
        gl.show(index, frame)
        print("> [%d] got frame. use = %f s" % (index, now - last))
        last = now
    print('# End of Thread %d' % (index))
if __name__ == '__main__':
    os.system('iptables -F')  # Disable Firewall
    gl = toy.output.createGLDrmDisplay(toy.DisplayPort.HDMI_A)
    idx0 = gl.add_view(0, 180, 640, 360)
    idx1 = gl.add_view(640, 180, 640, 360)
    idx2 = gl.add_view(1280, 180, 640, 360)
    idx3 = gl.add_view(0, 540, 640, 360)
    idx4 = gl.add_view(640, 540, 640, 360)
    idx5 = gl.add_view(1280, 540, 640, 360)
    t0 = threading.Thread(target=func_rtspdisplay, args = (gl, idx0, "rtsp://192.168.169.13/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
    t1 = threading.Thread(target=func_rtspdisplay, args = (gl, idx1, "rtsp://192.168.169.16/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
    t2 = threading.Thread(target=func_rtspdisplay, args = (gl, idx2, "rtsp://192.168.169.13/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
    t3 = threading.Thread(target=func_rtspdisplay, args = (gl, idx3, "rtsp://192.168.169.16/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
    t4 = threading.Thread(target=func_rtspdisplay, args = (gl, idx4, "rtsp://192.168.169.13/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
    t5 = threading.Thread(target=func_rtspdisplay, args = (gl, idx5, "rtsp://192.168.169.16/cam/realmonitor?channel=1&subtype=0", "admin", "admin123"))
    t0.start()
    t1.start()
    t2.start()
    t3.start()
    t4.start()
    t5.start()
    t0.join()
    t1.join()
    t2.join()
    t3.join()
    t4.join()
    t5.join()


1. 然后我们第一次创建一个 OpenGL 的显示接口,通过 D 的显示接口,主要是 HDMI-A
2. 2. 允许在上新建 6 个屏幕位置的
窗口 完成后新建了6个线程库,每个线程都执行一个同样的函数func_rtspdisplay 4. funcrtspdisplay 4. funcrtspdisplay 4. funcrtspdisplay 4. funcrtspdisplay 4. funcrtspdisplay
4. funcrtspdisplay 4. funcrt_spdisplay 4. funcrt_spdisplay 4. funcrt_spdisplay 4. funcrt_spdisplay 4. funcrt_spdisplay 4. 函数


库:

1. 自动使用VPU硬件进行解码
2. 解码到缩放到是硬件连续显示地址,没有显示mmap虚拟地址,全部0复制,速度接口。
3.使用GPU绘制6路,不占用CPU资源。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分