rpi camera: update font and link it to IBM repository (#3647)

This commit is contained in:
Alessandro Ros 2024-08-11 23:34:12 +02:00 committed by GitHub
parent c8f1fa93f5
commit 1e7a7d1674
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13 additions and 5 deletions

View File

@ -4,5 +4,5 @@
/coverage*.txt
/apidocs/*.html
/internal/servers/hls/hls.min.js
/internal/protocols/rpicamera/exe/text_font.h
/internal/protocols/rpicamera/exe/text_font.*
/internal/protocols/rpicamera/exe/exe

2
.gitignore vendored
View File

@ -3,5 +3,5 @@
/coverage*.txt
/apidocs/*.html
/internal/servers/hls/hls.min.js
/internal/protocols/rpicamera/exe/text_font.h
/internal/protocols/rpicamera/exe/text_font.*
/internal/protocols/rpicamera/exe/exe

View File

@ -472,7 +472,7 @@ The resulting stream will be available in path `/cam`.
_MediaMTX_ natively supports the Raspberry Pi Camera, enabling high-quality and low-latency video streaming from the camera to any user, for any purpose. There are a couple of requirements:
1. The server must run on a Raspberry Pi, with Raspberry Pi OS bullseye or newer as operative system. Both 32 bit and 64 bit operative systems are supported.
1. The server must run on a Raspberry Pi, with Raspberry Pi OS Bullseye as operative system. Both 32 bit and 64 bit architectures are supported.
2. Make sure that the legacy camera stack is disabled. Type `sudo raspi-config`, then go to `Interfacing options`, `enable/disable legacy camera support`, choose `no`. Reboot the system.

View File

@ -36,6 +36,14 @@ OBJS = \
all: exe
TEXT_FONT_URL = https://github.com/IBM/plex/raw/v6.4.2/IBM-Plex-Mono/fonts/complete/ttf/IBMPlexMono-Medium.ttf
TEXT_FONT_SHA256 = 0bede3debdea8488bbb927f8f0650d915073209734a67fe8cd5a3320b572511c
text_font.ttf:
wget -O text_font.tmp $(TEXT_FONT_URL)
H=$$(sha256sum text_font.tmp | awk '{ print $$1 }'); [ "$$H" = "$(TEXT_FONT_SHA256)" ] || { echo "hash mismatch; got $$H, expected $(TEXT_FONT_SHA256)"; exit 1; }
mv text_font.tmp $@
text_font.h: text_font.ttf
xxd --include $< > text_font.h

View File

@ -3,14 +3,14 @@ BINARY_NAME = mediamtx
define DOCKERFILE_BINARIES
FROM $(RPI32_IMAGE) AS rpicamera32
RUN ["cross-build-start"]
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd wget
WORKDIR /s/internal/protocols/rpicamera/exe
COPY internal/protocols/rpicamera/exe .
RUN make -j$$(nproc)
FROM $(RPI64_IMAGE) AS rpicamera64
RUN ["cross-build-start"]
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd
RUN apt update && apt install -y --no-install-recommends g++ pkg-config make libcamera-dev libfreetype-dev xxd wget
WORKDIR /s/internal/protocols/rpicamera/exe
COPY internal/protocols/rpicamera/exe .
RUN make -j$$(nproc)