Project

General

Profile

QTWebEngine - HW video » History » Version 1

Alex Seferidis, 07/21/2025 03:29 PM

1 1 Alex Seferidis
# QTWebEngine - HW video
2
3
Enable hardware accelaration video to qtwebengine for Rockchip modules.
4
Video files use hardware mpp module
5
6
Apply patches from https://github.com/JeffyCN/meta-rockchip/tree/dunfell/dynamic-layers/recipes-browser/chromium/chromium_87.0.4280
7
8
change files in folder:
9
/media/alex/data/Yocto/poky/build-rockchip/tmp/work/arm8a-poky-linux/qtwebengine/5.15 ... /git/src/3rdparty/chromium
10
11
- ui/gfx/linux/BUILD.gn
12
- ui/gfx/linux/gbm_wrapper.cc
13
- media/media_options.gni
14
- media/gpu/v4l2/v4l2.sig
15
- media/gpu/v4l2/v4l2_video_decoder.cc
16
- media/gpu/v4l2/v4l2_device.cc
17
- media/gpu/v4l2/generic_v4l2_device.cc
18
- media/gpu/v4l2/v4l2_decode_surface.cc
19
- media/gpu/gpu_video_decode_accelerator_factory.h
20
- media/gpu/gpu_video_decode_accelerator_factory.cc
21
- media/gpu/args.ini
22
- media/gpu/BUILD.gn
23
- components/chromeos_camera/gpu_mjpeg_decode_accelerator_factory.cc
24
25
26
build with:
27
```
28
source oe-init-build-env build-rockchip/
29
bitbake qtwebengine -c compile -f
30
bitbake core-image-minimal
31
```
32
33
34
create and run script: init.sh (this file is at /data/firmware/htdocs/python)
35
36
```
37
for type in dec enc; do
38
        dev=/dev/video-${type}0
39
        echo $type > $dev
40
        chmod 660 $dev
41
        chown root.video $dev
42
done
43
44
# Link /usr/lib64 for dlopen libv4l2.so
45
[ -e /lib/ld-linux-aarch64.so.1 -a ! -e /usr/lib64 ] && \
46
        ln -s lib /usr/lib64
47
48
exit 0
49
50
```
51
52
this script creates : /dev/video-dec0 and /dev/video-enc0
53
needed for HW video decoding on rockchip
54
55
## For future use:
56
57
WidevineCdm library must be used for DRM content (e.g. netflix)
58
copy libwidevinecdm.so file
59
60
and add flag on command line for chromium : --widevine-path="path-to-widevine-library" 
61
62
libwidevinecdm.so requires yocto at least mickledore version
63
but we have only kirkstone (this is stable)