-
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
Open
nitinn22
wants to merge
7
commits into
qualcomm-linux:main
Choose a base branch
from
nitinn22:feature/gstchange
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e08522e
Added Multimedia Video and Display GStreamer test scripts
nitinn22 79fd143
Fix: make run.sh executables for both video and display scripts
nitinn22 93f6153
Updated lib gstreamer sh utils file to support logs based post proces…
nitinn22 bd8ef68
Extract V4L2 video helpers to reusable library. Move generic GStreame…
nitinn22 55d63f0
rebased lib_gstreamer.sh and added changes, modified the display and …
nitinn22 77b5d42
Added license identifier for all 3 shell files: BSD-3-Clause per lega…
nitinn22 01767d2
Updated wayland, video and lib gstreamer sh scripts based on review c…
nitinn22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
170 changes: 170 additions & 0 deletions
170
Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| # 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 | ||
|
|
||
| - `--resolution <WIDTHxHEIGHT>` - Video resolution (e.g., 1920x1080, 3840x2160) (default: 1920x1080) | ||
| - `--duration <seconds>` - Playback duration (default: 30) | ||
| - `--pattern <smpte|snow|ball|etc>` - videotestsrc pattern (default: smpte) | ||
| - `--width <pixels>` - Video width (alternative to --resolution) (default: 1920) | ||
| - `--height <pixels>` - Video height (alternative to --resolution) (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 custom resolution using --resolution | ||
| ./run.sh --resolution 3840x2160 | ||
|
|
||
| # Run with custom resolution and duration | ||
| ./run.sh --resolution 3840x2160 --duration 20 | ||
|
|
||
| # Run with ball pattern | ||
| ./run.sh --pattern ball | ||
|
|
||
| # Run with custom resolution using separate width/height | ||
| ./run.sh --width 1280 --height 720 | ||
|
|
||
| # Run with different framerate | ||
| ./run.sh --framerate 60 | ||
|
|
||
| # Run with higher debug level | ||
| ./run.sh --gst-debug 5 | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 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 | ||
|
|
||
| The test supports these environment variables (can be set in LAVA job definition): | ||
|
|
||
| - `VIDEO_DURATION` - Playback duration in seconds (default: 30) | ||
| - `RUNTIMESEC` - Alternative to VIDEO_DURATION | ||
| - `VIDEO_PATTERN` - videotestsrc pattern (default: smpte) | ||
| - `VIDEO_WIDTH` - Video width (default: 1920) | ||
| - `VIDEO_HEIGHT` - Video height (default: 1080) | ||
| - `VIDEO_FRAMERATE` - Video framerate (default: 30) | ||
| - `VIDEO_GST_DEBUG` - GStreamer debug level (default: 2) | ||
| - `GST_DEBUG_LEVEL` - Alternative to VIDEO_GST_DEBUG | ||
|
|
||
| **Priority order for duration**: `VIDEO_DURATION` > `RUNTIMESEC` > default (30) |
70 changes: 70 additions & 0 deletions
70
Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/Waylandsink_Playback.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| 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: | ||
| # Playback duration in seconds (default: 30) | ||
| # Priority: VIDEO_DURATION > RUNTIMESEC | ||
| VIDEO_DURATION: "30" | ||
| RUNTIMESEC: "" # if set, used as fallback | ||
|
|
||
| # Test pattern for videotestsrc (default: smpte) | ||
| VIDEO_PATTERN: "smpte" # smpte|snow|black|white|red|green|blue|checkers-1|checkers-2|ball | ||
|
|
||
| # Video width in pixels (default: 1920) | ||
| VIDEO_WIDTH: "1920" | ||
|
|
||
| # Video height in pixels (default: 1080) | ||
| VIDEO_HEIGHT: "1080" | ||
|
|
||
| # Frame rate (default: 30) | ||
| VIDEO_FRAMERATE: "30" | ||
|
|
||
| # GStreamer debug level (default: 2) | ||
| # Priority: VIDEO_GST_DEBUG > GST_DEBUG_LEVEL | ||
| VIDEO_GST_DEBUG: "2" # 1-9 | ||
| GST_DEBUG_LEVEL: "" # if set, used as fallback | ||
|
|
||
| run: | ||
| steps: | ||
| - REPO_PATH="$PWD" | ||
|
|
||
| # Navigate to test directory | ||
| - cd Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/ | ||
|
|
||
| # Export environment variables (script reads these directly) | ||
| - export VIDEO_DURATION="${VIDEO_DURATION}" | ||
| - export RUNTIMESEC="${RUNTIMESEC}" | ||
| - export VIDEO_PATTERN="${VIDEO_PATTERN}" | ||
| - export VIDEO_WIDTH="${VIDEO_WIDTH}" | ||
| - export VIDEO_HEIGHT="${VIDEO_HEIGHT}" | ||
| - export VIDEO_FRAMERATE="${VIDEO_FRAMERATE}" | ||
| - export VIDEO_GST_DEBUG="${VIDEO_GST_DEBUG}" | ||
| - export GST_DEBUG_LEVEL="${GST_DEBUG_LEVEL}" | ||
|
|
||
| # Build CLI args for overrides (optional - can also rely on env vars) | ||
| - | | ||
| CMD="./run.sh" | ||
|
|
||
| # Use CLI args to override defaults if needed | ||
| # Note: Script reads env vars by default, CLI args override env vars | ||
| [ -n "${VIDEO_WIDTH}" ] && [ -n "${VIDEO_HEIGHT}" ] && CMD="${CMD} --resolution ${VIDEO_WIDTH}x${VIDEO_HEIGHT}" | ||
| [ -n "${VIDEO_PATTERN}" ] && CMD="${CMD} --pattern ${VIDEO_PATTERN}" | ||
| [ -n "${VIDEO_DURATION}" ] && CMD="${CMD} --duration ${VIDEO_DURATION}" | ||
| [ -n "${VIDEO_FRAMERATE}" ] && CMD="${CMD} --framerate ${VIDEO_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" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.