-
Notifications
You must be signed in to change notification settings - Fork 30
Added Multimedia Video and Display GStreamer test scripts #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| # Waylandsink_Playback (GStreamer) — Runner Test | ||
|
|
||
| This directory contains the **Waylandsink_Playback** validation test for Qualcomm Linux Testkit runners. | ||
|
|
||
| It validates **Wayland display** using **GStreamer waylandsink** with: | ||
| - Weston/Wayland server connectivity checks | ||
| - DRM display connectivity validation | ||
| - Video playback using `waylandsink` element | ||
| - Uses `videotestsrc` to generate test patterns | ||
|
|
||
| The script is designed to be **CI/LAVA-friendly**: | ||
| - Writes **PASS/FAIL/SKIP** into `Waylandsink_Playback.res` | ||
| - Always **exits 0** (even on FAIL/SKIP) | ||
| - Comprehensive Weston/Wayland environment detection | ||
| - Automatic Weston startup if needed | ||
|
|
||
| --- | ||
|
|
||
| ## What this test does | ||
|
|
||
| 1. Sources framework utilities (`functestlib.sh`, `lib_gstreamer.sh`, `lib_display.sh`) | ||
| 2. **Display connectivity check**: Verifies connected DRM display via sysfs | ||
| 3. **Weston/Wayland server check**: | ||
| - Discovers existing Wayland socket | ||
| - Attempts to start Weston if no socket found | ||
| - Validates Wayland connection | ||
| 4. **waylandsink element check**: Verifies GStreamer waylandsink is available | ||
| 5. **Playback test**: Runs videotestsrc → videoconvert → waylandsink pipeline | ||
| 6. **Validation**: Checks playback duration and exit code | ||
|
|
||
| --- | ||
|
|
||
| ## PASS / FAIL / SKIP criteria | ||
|
|
||
| ### PASS | ||
| - Playback completes successfully (exit code 0 or 143) | ||
| - Elapsed time ≥ (duration - 2) seconds | ||
|
|
||
| ### FAIL | ||
| - Playback exits with error code (not 0 or 143) | ||
| - Playback exits too quickly (< duration - 2 seconds) | ||
|
|
||
| ### SKIP | ||
| - Missing GStreamer tools (`gst-launch-1.0`, `gst-inspect-1.0`) | ||
| - No connected DRM display found | ||
| - No Wayland socket found (and cannot start Weston) | ||
| - Wayland connection test fails | ||
| - `waylandsink` element not available | ||
|
|
||
| --- | ||
|
|
||
| ## Dependencies | ||
|
|
||
| ### Required | ||
| - `gst-launch-1.0` | ||
| - `gst-inspect-1.0` | ||
| - `videotestsrc` GStreamer plugin | ||
| - `videoconvert` GStreamer plugin | ||
| - `waylandsink` GStreamer plugin | ||
|
|
||
| ### Display/Wayland | ||
| - Weston compositor (running or startable) | ||
| - Connected DRM display | ||
| - Wayland socket (`/run/user/*/wayland-*` or `/dev/socket/weston/wayland-*`) | ||
|
|
||
| --- | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| ./run.sh [options] | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| - `--duration <seconds>` - Playback duration (default: 10) | ||
| - `--pattern <smpte|snow|ball|etc>` - videotestsrc pattern (default: smpte) | ||
| - `--width <pixels>` - Video width (default: 1920) | ||
| - `--height <pixels>` - Video height (default: 1080) | ||
| - `--framerate <fps>` - Video framerate (default: 30) | ||
| - `--gst-debug <level>` - GStreamer debug level 1-9 (default: 2) | ||
|
|
||
| --- | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # Run default test (1920x1080 SMPTE for 30s) | ||
| ./run.sh | ||
|
|
||
| # Run with 30 second duration | ||
| ./run.sh --duration 30 | ||
|
|
||
| # Run with ball pattern | ||
| ./run.sh --pattern ball | ||
|
|
||
| # Run with custom resolution | ||
| ./run.sh --width 1280 --height 720 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Pipeline | ||
|
|
||
| ``` | ||
| videotestsrc num-buffers=<N> pattern=<pattern> | ||
| ! video/x-raw,width=<W>,height=<H>,framerate=<FPS>/1 | ||
| ! videoconvert | ||
| ! waylandsink | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Logs | ||
|
|
||
| ``` | ||
| ./Waylandsink_Playback.res | ||
| ./logs/Waylandsink_Playback/ | ||
| gst.log # GStreamer debug output | ||
| run.log # Pipeline execution log | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### "SKIP: No connected DRM display found" | ||
| - Check physical display connection | ||
| - Verify DRM drivers loaded: `ls -l /dev/dri/` | ||
|
|
||
| ### "SKIP: No Wayland socket found" | ||
| - Check if Weston is running: `pgrep weston` | ||
| - Try starting Weston manually | ||
| - Check `XDG_RUNTIME_DIR` and `WAYLAND_DISPLAY` environment variables | ||
|
|
||
| ### "SKIP: waylandsink element not available" | ||
| - Install GStreamer Wayland plugin | ||
| - Check: `gst-inspect-1.0 waylandsink` | ||
|
|
||
| ### "FAIL: Playback failed" | ||
| - Check logs in `logs/Waylandsink_Playback/` | ||
| - Increase debug level: `./run.sh --gst-debug 5` | ||
| - Verify Weston is running properly | ||
|
|
||
| --- | ||
|
|
||
| ## LAVA Environment Variables | ||
|
|
||
| - `VIDEO_DURATION` - Playback duration | ||
| - `VIDEO_PATTERN` - videotestsrc pattern | ||
| - `VIDEO_WIDTH` - Video width | ||
| - `VIDEO_HEIGHT` - Video height | ||
| - `VIDEO_FRAMERATE` - Video framerate | ||
| - `VIDEO_GST_DEBUG` - GStreamer debug level | ||
| - `RUNTIMESEC` - Alternative to VIDEO_DURATION |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| metadata: | ||
| name: gstreamer-waylandsink-playback | ||
| format: "Lava-Test Test Definition 1.0" | ||
| description: > | ||
| GStreamer waylandsink playback validation with Weston/Wayland server checks | ||
| on Qualcomm Linux platforms. Uses videotestsrc to generate test patterns | ||
| and displays them via waylandsink. Validates display connectivity and | ||
| Wayland compositor functionality. | ||
| os: | ||
| - linux | ||
| scope: | ||
| - functional | ||
|
|
||
| params: | ||
| # Video resolution (WIDTHxHEIGHT) | ||
| VIDEO_RESOLUTION: "1920x1080" | ||
|
|
||
| # Test pattern for videotestsrc | ||
| VIDEO_PATTERN: "smpte" # smpte|snow|black|white|red|green|blue|checkers-1|checkers-2 | ||
|
|
||
| # Playback duration in seconds | ||
| PLAYBACK_DURATION: "30" | ||
|
|
||
| # Frame rate | ||
| FRAMERATE: "30" | ||
|
|
||
| # GStreamer debug level | ||
| VIDEO_GST_DEBUG: "2" # 1-9 | ||
|
|
||
| run: | ||
| steps: | ||
| - REPO_PATH="$PWD" | ||
|
|
||
| # Navigate to test directory | ||
| - cd Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/ | ||
|
|
||
| # Build CLI args only when params are non-empty | ||
| - | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This pattern won't work on the lava shell. Please use either a multiline format or combine it into a single command.
|
||
| CMD="./run.sh" | ||
|
|
||
| [ -n "${VIDEO_RESOLUTION}" ] && CMD="${CMD} --resolution ${VIDEO_RESOLUTION}" | ||
| [ -n "${VIDEO_PATTERN}" ] && CMD="${CMD} --pattern ${VIDEO_PATTERN}" | ||
| [ -n "${PLAYBACK_DURATION}" ] && CMD="${CMD} --duration ${PLAYBACK_DURATION}" | ||
| [ -n "${FRAMERATE}" ] && CMD="${CMD} --framerate ${FRAMERATE}" | ||
| [ -n "${VIDEO_GST_DEBUG}" ] && CMD="${CMD} --gst-debug ${VIDEO_GST_DEBUG}" | ||
|
|
||
| echo "[LAVA] Running: ${CMD}" | ||
| sh -c "${CMD}" || true | ||
|
|
||
| # Send result to LAVA | ||
| - "${REPO_PATH}/Runner/utils/send-to-lava.sh Waylandsink_Playback.res || true" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the run.sh does not implement --resolution at all (it only supports --width and --height). Result: Unknown argument: --resolution -> SKIP.