From 7e57075fd27af287ad060d8a350239813d36428e Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Thu, 8 Feb 2024 21:13:15 +0100 Subject: [PATCH] add header and service --- Header.h264 | Bin 0 -> 692 bytes build_chroot.sh | 5 ++++- h264_decode.service | 14 ++++++++++++++ test/mpp_disp_test.c | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Header.h264 create mode 100644 h264_decode.service diff --git a/Header.h264 b/Header.h264 new file mode 100644 index 0000000000000000000000000000000000000000..76a31c4f44559408e6e48a8aabd42e6607fd1747 GIT binary patch literal 692 zcmZQzU|{6@zyKuEeHk>Tg)lYfc7S*p?+k@-i>7uoI513SnDKyD`v0H&JyRC*zgi-A zmOYJ|dDrHf0;`^faGYFnXYm3*H3L66hRU}Y|Cl!Zz4Jpx`p@B|qAQEfs>yYV+gO}3J=A(RYN`Vlqwq8a zp`Q{A=2eFnEZ$_txje9K;^$P6{#W^T{<1};%0Y|@L0_8BpV@Ep=k#a&Gy6?yE`Ihu z```S}{m=CfYWlf&%bKU3=byK?`Sbbn`ST6}uUBitAB}3Xbjfl+b|VXifb)L|N9M$S z?Gvo#Ji0ClYTgmI)qg3^s;q0Nn!otV(OpW?yqsO)uHOPAOg<(tFc`02&A=U5ad3V3 zMxG?^nuVLEUUJquu4o$Pcl^iP==;)lgm&BrH{A97#lFAhFWCO^+`kq5=XL%60wzC( zUM8gl9wnRtjamY#PAn@Nrg8`^WC~I6YT*ok3i(WFeQNyqSX#{*(SK|cth5pU{`Tnq literal 0 HcmV?d00001 diff --git a/build_chroot.sh b/build_chroot.sh index ab31ff20f..d850d92f7 100644 --- a/build_chroot.sh +++ b/build_chroot.sh @@ -8,7 +8,6 @@ curl -1sLf 'https://dl.cloudsmith.io/public/openhd/release/setup.deb.sh'| sudo - apt update sudo apt install -y git ruby-dev curl make cmake gcc g++ wget libdrm-dev mlocate openhd qopenhd-rk3566 apt-transport-https apt-utils open-hd-web-ui gem install fpm -ls -a /usr/include/libdrm cd build/linux/aarch64 ./make-Makefiles.bash make -j$(nproc) @@ -21,6 +20,10 @@ mkdir -p aarch64-linux-gnu cd lib mv * ../aarch64-linux-gnu/ mv ../aarch64-linux-gnu ../lib/aarch64-linux-gnu +mkdir -p ../usr/local/bin +mkdir -p ../etc/system/systemd +mv ../../../h264_decode.service ../etc/system/systemd/ +mv ../../../Header.h264 ../usr/local/bin cd ../../../ fpm -a arm64 -s dir -t deb -n mpp -v 1.0 -C mpp-package -p mpp_VERSION_ARCH.deb echo "copied deb file" diff --git a/h264_decode.service b/h264_decode.service new file mode 100644 index 000000000..000de879e --- /dev/null +++ b/h264_decode.service @@ -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 ! queue ! kmssink plane-id=54 force-modesetting=false" +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 config-interval=1 ! video/x-h264,stream-format=byte-stream,alignment=au ! fdsink fd=1 | sudo mpp_disp >/dev/tty1" +Restart=always +RestartSec=2 + +[Install] +WantedBy=multi-user.target diff --git a/test/mpp_disp_test.c b/test/mpp_disp_test.c index 9e0561a46..890c10a74 100644 --- a/test/mpp_disp_test.c +++ b/test/mpp_disp_test.c @@ -142,7 +142,7 @@ MPP_RET preader_read(PeteReader *slot) { fcntl(0, F_SETFL, fcntl(0, F_GETFL) | O_NONBLOCK); Configured = true; - FILE *fp = fopen("/home/openhd/Header.h264", "rb"); + FILE *fp = fopen("/usr/local/bin/Header.h264", "rb"); if(fp) { fseek(fp, 0L, SEEK_END);