Skip to content

Commit

Permalink
add header and service
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Feb 8, 2024
1 parent bc2d36e commit 7e57075
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
Binary file added Header.h264
Binary file not shown.
5 changes: 4 additions & 1 deletion build_chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"
Expand Down
14 changes: 14 additions & 0 deletions h264_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 ! 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
2 changes: 1 addition & 1 deletion test/mpp_disp_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7e57075

Please sign in to comment.