Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/OpenHD/mpp into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
peteallenm committed Mar 5, 2024
2 parents fb800fc + 72acdca commit 549f2d6
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 17 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ include_directories(inc)
# small utile functions for test case
include_directories(utils)
include_directories(/usr/include/drm)
include_directories(/usr/src/linux-headers-5.10.160-20-rk356x/include/config/)

# ----------------------------------------------------------------------------
# osal library
Expand Down
Binary file added Header.h264
Binary file not shown.
34 changes: 19 additions & 15 deletions build_chroot.sh
Original file line number Diff line number Diff line change
@@ -1,45 +1,49 @@
#!/bin/bash
# This file is the install instruction for the CHROOT build
# We're using cloudsmith-cli to upload the file in CHROOT

sudo apt install -y python3-pip
sudo pip3 install --upgrade cloudsmith-cli
ls -a
sudo apt install -y git ruby-dev make cmake gcc g++ wget libdrm-dev
curl -1sLf 'https://dl.cloudsmith.io/public/openhd/release/setup.deb.sh'| sudo -E bash
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
cd build/linux/aarch64
./make-Makefiles.bash
make -j$(nproc)
make DESTDIR=mpp-package -j4 install
echo "Current directory: $(pwd)"
cd mpp-package/usr/local
mv lib ../
cd ../
mkdir -p aarch64-linux-gnu
cd lib
mv * ../aarch64-linux-gnu/
mv ../aarch64-linux-gnu ../lib/aarch64-linux-gnu
mkdir -p /opt/additionalFiles/build/linux/aarch64/mpp-package/etc/systemd/system/
mv /opt/additionalFiles/h264_decode.service /opt/additionalFiles/build/linux/aarch64/mpp-package/etc/systemd/system/
mkdir -p /opt/additionalFiles/build/linux/aarch64/mpp-package/usr/local/bin
mv /opt/additionalFiles/Header.h264 /opt/additionalFiles/build/linux/aarch64/mpp-package/usr/local/bin/
mv /opt/additionalFiles/build/linux/aarch64/mpp-package/usr/local/bin/openhd_vid_test /opt/additionalFiles/build/linux/aarch64/mpp-package/usr/local/bin/openhd_vid
chmod +x /opt/additionalFiles/build/linux/aarch64/mpp-package/usr/local/bin/openhd_vid
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"
VERSION="1.1-$(date +'%m/%d/%Y')"
VERSION=$(echo "$VERSION" | sed 's/\//-/g')
fpm -a arm64 -s dir -t deb -n mpp-rk3566 -v "$VERSION" -C mpp-package -p mpp-rk3566_VERSION_ARCH.deb
echo "push to cloudsmith"
git describe --exact-match HEAD >/dev/null 2>&1
echo "Pushing the package to OpenHD 2.3 repository"
ls -a
ls -a ../../../
API_KEY=$(cat ../../../cloudsmith_api_key.txt)
DISTRO=$(cat ../../../distro.txt)
FLAVOR=$(cat ../../../flavor.txt)
BOARD=$(cat ../../../board.txt)
API_KEY=$(cat /opt/additionalFiles/cloudsmith_api_key.txt)
DISTRO=$(cat /opt/additionalFiles/distro.txt)
FLAVOR=$(cat /opt/additionalFiles/flavor.txt)
BOARD=$(cat /opt/additionalFiles/board.txt)

if [ "$BOARD" = "rk3566" ]; then
if [ "$BOARD" = "rk3588" ]; then
for file in *.deb; do
mv "$file" "${file%.deb}-rk3566.deb"
mv "$file" "${file%.deb}-rk3588.deb"
done
cloudsmith push deb --api-key "$API_KEY" openhd/dev-release/${DISTRO}/${FLAVOR} *.deb || exit 1
else
for file in *.deb; do
mv "$file" "${file%.deb}-rk3588.deb"
mv "$file" "${file%.deb}-rk3566.deb"
done
cloudsmith push deb --api-key "$API_KEY" openhd/dev-release/${DISTRO}/${FLAVOR} *.deb || exit 1
fi
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 | openhd_vid >/dev/tty1"
Restart=always
RestartSec=2

[Install]
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ macro(add_mpp_test module ext)
endif()
endmacro()

add_mpp_test(mpp_disp c)
add_mpp_test(openhd_vid c)


# mpp info test
Expand Down
2 changes: 1 addition & 1 deletion test/mpp_disp_test.c → test/openhd_vid_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,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 549f2d6

Please sign in to comment.