mirror of
https://github.com/Screenly/Anthias.git
synced 2026-06-10 09:08:09 -04:00
* perf(viewer): render video via QML VideoOutput in a QQuickWidget - replace the QGraphicsVideoItem-on-raster-QGraphicsView substrate: QVideoFrame::toImage did an RHI offscreen render + GPU->CPU readback per frame, capping presentation at 8.3 fps (Pi 4) / 10-12 fps (Pi 5) with a saturated GUI thread while HW decode ran fine (issue 2967). Validated on both testbeds: Pi 4 30.0 fps presented at 64% total CPU, Pi 5 26.6 fps at 13-35% - VideoOutput keeps frames on the GPU: scene-graph textures with shader YUV->RGB, composited through the same QQuickRenderControl FBO machinery QWebEngineView already uses (eglfs-safe, inherits whole-screen rotation -- re-validated under QT_QPA_EGLFS_ROTATION) - log frames-rendered (QQuickWindow::afterRendering) next to frames-delivered in playback-stats so presentation-side drops are visible -- the sink-only counter is how the 8 fps regression shipped unnoticed; connection is retried from play() so the counter can't silently stay dead - fail hard (qFatal) when the QML scene is unavailable instead of decoding video to nowhere: crash-respawn is supervised and loud, a silent black-screen kiosk is not - video-rotate maps to VideoOutput.orientation (still a defensive no-op; every platform rotates the whole screen) - ship qt6-declarative-dev + qml6-module-qtquick/-qtmultimedia in the Qt6 viewer images; drop the now-unused multimediawidgets - run the C++ tests with QT_QUICK_BACKEND=software so the QML scene loads under the offscreen platform Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(image-builder): align gstreamer-drop version comment to Qt 6.5 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
41 lines
1.4 KiB
Bash
Executable File
41 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build and run AnthiasViewer's QtTest unit tests.
|
|
#
|
|
# Requires Qt 6 (qt6-base-dev, qt6-multimedia-dev). The viewer
|
|
# Docker image already ships those for the per-board builder stage
|
|
# — running this inside that container is the canonical
|
|
# environment.
|
|
#
|
|
# Usage: bin/test_webview_cpp.sh
|
|
#
|
|
# The tests run under ``QT_QPA_PLATFORM=offscreen`` so no real
|
|
# display server is needed; QtMultimedia's playback pipeline won't
|
|
# fully initialise (no rendering target) but the API surface plus
|
|
# the QGraphicsVideoItem rotation transform are testable that way.
|
|
# Decoder engagement + drop counts are exercised on real devices
|
|
# via the BBB test bed. CI integration is a follow-up.
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
WEBVIEW_DIR="src/anthias_webview"
|
|
BUILD_DIR="${WEBVIEW_DIR}/tests/build"
|
|
|
|
mkdir -p "${BUILD_DIR}"
|
|
pushd "${BUILD_DIR}" >/dev/null
|
|
|
|
qmake6 ../tests.pro
|
|
make -j"$(nproc)"
|
|
|
|
# QTEST_MAIN's generated binary exits non-zero on any test failure.
|
|
# ``QT_QPA_PLATFORM=offscreen`` skips connecting to a real display
|
|
# server / framebuffer — the tests don't render, they exercise
|
|
# the QMediaPlayer / VideoOutput API surface plus the option
|
|
# plumbing. ``QT_QUICK_BACKEND=software`` keeps the QQuickWidget's
|
|
# scene graph off the GPU so the QML scene loads on hosts whose
|
|
# offscreen platform has no usable GL context.
|
|
QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software ./AnthiasViewerTests
|
|
|
|
popd >/dev/null
|