Skip to content

Commit

Permalink
fix rockship platform decoding (tested on rock5a)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Dec 3, 2023
1 parent eec88db commit 7c11a80
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 3 deletions.
14 changes: 14 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ elif [[ "${PACKAGE_ARCH}" = "arm64" ]]; then
-p qopenhd_rk3588_VERSION_ARCH.deb \
--after-install after-install.sh \
${PLATFORM_PACKAGES} || exit 1
#Rock5aPackage

rm /tmp/qopenhd/etc/systemd/system/qopenhd.service
rm /tmp/qopenhd/etc/systemd/system/h264_decode.service
rm /tmp/qopenhd/etc/systemd/system/h265_decode.service

cp systemd/rock5_qopenhd.service /tmp/qopenhd/etc/systemd/system/qopenhd.service
cp systemd/rock5_h264a_decode.service /tmp/qopenhd/etc/systemd/system/h264_decode.service
cp systemd/rock5_h265a_decode.service /tmp/qopenhd/etc/systemd/system/h265_decode.service

fpm -a ${PACKAGE_ARCH} -s dir -t deb -n qopenhd_rk3588a -v ${VERSION} -C ${TMPDIR} \
-p qopenhd_rk3588_VERSION_ARCH.deb \
--after-install after-install.sh \
${PLATFORM_PACKAGES} || exit 1
else
echo "everything else"

Expand Down
2 changes: 1 addition & 1 deletion systemd/rock5_h264_decode.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description=rock_h264_decode
User=root

# Video decode via mpp, started by QOpenHD if needed (and stopped if needed)
ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H264' ! rtph264depay ! h264parse ! mppvideodec format=23 fast-mode=true ! queue ! kmssink plane-id=54 force-modesetting=true"
ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H264' ! rtph264depay ! h264parse ! mppvideodec format=23 fast-mode=true width=1920 height=1080 ! queue ! kmssink plane-id=54"

Restart=always
RestartSec=2
Expand Down
14 changes: 14 additions & 0 deletions systemd/rock5_h264a_decode.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=rock_h264_decode

[Service]
User=root

# Video decode via mpp, started by QOpenHD if needed (and stopped if needed)
ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H264' ! rtph264depay ! h264parse ! mppvideodec format=23 fast-mode=true width=1920 height=1080 ! queue ! kmssink plane-id=68"

Restart=always
RestartSec=2

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion systemd/rock5_h265_decode.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Description=rock_h265_decode
User=root

# Video decode via mpp, started by QOpenHD if needed (and stopped if needed)
ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec format=23 fast-mode=true ! queue ! kmssink plane-id=54 force-modesetting=true"
ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec format=23 fast-mode=true widt=1920 height=1080 ! queue ! kmssink plane-id=54"

Restart=always
RestartSec=1
Expand Down
14 changes: 14 additions & 0 deletions systemd/rock5_h265a_decode.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=rock_h265_decode

[Service]
User=root

# Video decode via mpp, started by QOpenHD if needed (and stopped if needed)
ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)96, clock-rate=(int)90000, media=(string)video, encoding-name=(string)H265' ! rtph265depay ! h265parse ! mppvideodec format=23 fast-mode=true widt=1920 height=1080 ! queue ! kmssink plane-id=68"

Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target
14 changes: 14 additions & 0 deletions systemd/rock5_mjpega_decode.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=rock_mjpeg_decode

[Service]
User=root

# Video decode via mpp, started by QOpenHD if needed (and stopped if needed)
ExecStart=/bin/sh -c "gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, payload=(int)26, clock-rate=(int)90000, media=(string)video, encoding-name=(string)JPEG' ! rtpjpegdepay ! jpegdec ! queue ! kmssink plane-id=68 force-modesetting=true"

Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target
3 changes: 2 additions & 1 deletion systemd/rock5_qopenhd.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ After=multi-user.target

[Service]
Type=simple
Environment="FONTCONFIG_PATH=/etc/fonts"
Environment="QT_QPA_EGLFS_KMS_ATOMIC=1"
Environment="FONTCONFIG_PATH=/etc/fonts"
Environment="QT_QPA_EGLFS_KMS_PLANE_INDEX=5"
Environment="QT_QPA_EGLFS_FORCE888=1"
Environment="QT_QPA_EGLFS_SWAPINTERVAL=0"
Environment="QT_QPA_EGLFS_ALWAYS_SET_MODE=true"
Environment="QT_QPA_EGLFS_KMS_CONFIG=/usr/local/share/qopenhd/rock_qt_eglfs_kms_config.json"
ExecStart=/usr/local/bin/QOpenHD -platform eglfs
User=root
Expand Down

0 comments on commit 7c11a80

Please sign in to comment.