rk3568/rk3588 rgaconvert插件编译
下载源代码
git clone https://github.com/higithubhi/gstreamer-rgaconvert.git
编译源码:
进入gstreamer-rgaconvert目录
gcc -fPIC -shared plugins/gstrgaconvert.c -o libgstrgaconvert.so -I plugins/ -lrga -lgstallocators-1.0 -lgstreamer-1.0 -lglib-2.0 -lgobject-2.0 -lgstbase-1.0 -lgstvideo-1.0 -lgstaudio-1.0 -I/usr/include/glib-2.0 -I/usr/include/gstreamer-1.0 -I /usr/lib/aarch64-linux-gnu/glib-2.0/include/
复制生成后的文件
cp libgstrgaconvert.so /usr/lib/aarch64-linux-gnu/gstreamer-1.0/
查看是否生效
gst-inspect-1.0 |grep rgaconvert
rgaconvert: rgaconvert: Rockchip rga hardware convert
如是生效了就如上所示
测试解码转格式
gst-launch-1.0 filesrc location=1080p.mp4 ! qtdemux ! h264parse ! mppvideodec ! rgaconvert ! video/x-raw,format=NV12,width=1920,height=1080 ! fakesink sync=true
gst-launch-1.0 filesrc location=1080p.mp4 ! qtdemux ! h264parse ! mppvideodec ! rgaconvert ! video/x-raw,format=BGR,width=1920,height=1080 ! fakesink sync=true
gst-launch-1.0 filesrc location=1080p.mp4 ! qtdemux ! h264parse ! mppvideodec ! rgaconvert ! video/x-raw,format=RGB,width=1920,height=1080 ! fakesink sync=true
gst-launch-1.0 filesrc location=4k.mp4 ! qtdemux ! h264parse ! mppvideodec ! rgaconvert ! video/x-raw,format=BGR,width=3840,height=2160 ! fakesink sync=true
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
rga_api version 1.9.3_[2]
Pipeline is PREROLLED ...
Prerolled, waiting for async message to finish...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstSystemClock
本文链接地址:https://const.net.cn/804.html