Project

General

Profile

Actions

QTWebEngine - HW video

Enable hardware accelaration video to qtwebengine for Rockchip modules.
Video files use hardware mpp module

Apply patches from https://github.com/JeffyCN/meta-rockchip/tree/dunfell/dynamic-layers/recipes-browser/chromium/chromium_87.0.4280

change files in folder:
/media/alex/data/Yocto/poky/build-rockchip/tmp/work/arm8a-poky-linux/qtwebengine/5.15 ... /git/src/3rdparty/chromium

  • ui/gfx/linux/BUILD.gn
  • ui/gfx/linux/gbm_wrapper.cc
  • media/media_options.gni
  • media/gpu/v4l2/v4l2.sig
  • media/gpu/v4l2/v4l2_video_decoder.cc
  • media/gpu/v4l2/v4l2_device.cc
  • media/gpu/v4l2/generic_v4l2_device.cc
  • media/gpu/v4l2/v4l2_decode_surface.cc
  • media/gpu/gpu_video_decode_accelerator_factory.h
  • media/gpu/gpu_video_decode_accelerator_factory.cc
  • media/gpu/args.ini
  • media/gpu/BUILD.gn
  • components/chromeos_camera/gpu_mjpeg_decode_accelerator_factory.cc

build with:

source oe-init-build-env build-rockchip/
bitbake qtwebengine -c compile -f
bitbake core-image-minimal

create and run script: init.sh (this file is at /data/firmware/htdocs/python)

for type in dec enc; do
        dev=/dev/video-${type}0
        echo $type > $dev
        chmod 660 $dev
        chown root.video $dev
done

# Link /usr/lib64 for dlopen libv4l2.so
[ -e /lib/ld-linux-aarch64.so.1 -a ! -e /usr/lib64 ] && \
        ln -s lib /usr/lib64

exit 0

this script creates : /dev/video-dec0 and /dev/video-enc0
needed for HW video decoding on rockchip

For future use:

WidevineCdm library must be used for DRM content (e.g. netflix)
copy libwidevinecdm.so file

and add flag on command line for chromium : --widevine-path="path-to-widevine-library"

libwidevinecdm.so requires yocto at least mickledore version
but we have only kirkstone (this is stable)

Updated by Alex Seferidis 5 months ago ยท 1 revisions