Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e08522e
Added Multimedia Video and Display GStreamer test scripts
nitinn22 Feb 13, 2026
79fd143
Fix: make run.sh executables for both video and display scripts
nitinn22 Feb 13, 2026
93f6153
Updated lib gstreamer sh utils file to support logs based post proces…
nitinn22 Feb 13, 2026
bd8ef68
Extract V4L2 video helpers to reusable library. Move generic GStreame…
nitinn22 Feb 15, 2026
55d63f0
rebased lib_gstreamer.sh and added changes, modified the display and …
nitinn22 Feb 15, 2026
77b5d42
Added license identifier for all 3 shell files: BSD-3-Clause per lega…
nitinn22 Feb 15, 2026
01767d2
Updated wayland, video and lib gstreamer sh scripts based on review c…
nitinn22 Feb 18, 2026
8b2f32c
Made changes to handle display and video sh scripts per new comments …
nitinn22 Feb 24, 2026
2b50999
Merge branch 'main' into feature/gstchange
nitinn22 Feb 24, 2026
bf17e92
Made changes to handle display and video sh scripts to follow sourcin…
nitinn22 Feb 24, 2026
d6f55b1
replaced the is_u32 function call with the same numeric validation pa…
nitinn22 Feb 24, 2026
4718eb2
Fixed LAVA results reporting by using absolute path: ${REPO_PATH}/Run…
nitinn22 Feb 25, 2026
d2a55e9
Fixed YAML syntax by properly indenting the block scalar section
nitinn22 Feb 25, 2026
c0b7680
updated both YAML files to match the working structure from Audio_Pla…
nitinn22 Feb 25, 2026
8786de3
Simplified the yaml files added consistent indentation
nitinn22 Feb 25, 2026
8f8396a
Updated emit results logic in video run.sh file also modified skip co…
nitinn22 Feb 25, 2026
11b76a2
Skip count removed for vp9 encode as its unsupported
nitinn22 Feb 25, 2026
087d2d7
Removed noisy yamls, updated sh script to handle vp9 download only we…
nitinn22 Feb 26, 2026
78acf3c
Vp9 decode supporting clip url modified and removed ivf conversion de…
nitinn22 Feb 26, 2026
72946d2
Updated video sh script to emit results including failure count info
nitinn22 Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
metadata:
name: 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_DURATION: "30" # seconds
VIDEO_PATTERN: "smpte" # smpte|snow|black|white|red|green|blue|checkers-1|checkers-2|ball
VIDEO_WIDTH: "1920" # pixels
VIDEO_HEIGHT: "1080" # pixels
VIDEO_FRAMERATE: "30" # fps
VIDEO_GST_DEBUG: "2" # 1-9

run:
steps:
- REPO_PATH="$PWD"
- cd Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/
- export VIDEO_DURATION VIDEO_PATTERN VIDEO_WIDTH VIDEO_HEIGHT VIDEO_FRAMERATE VIDEO_GST_DEBUG
- ./run.sh --resolution "${VIDEO_WIDTH}x${VIDEO_HEIGHT}" --pattern "${VIDEO_PATTERN}" --duration "${VIDEO_DURATION}" --framerate "${VIDEO_FRAMERATE}" --gst-debug "${VIDEO_GST_DEBUG}" || true
- $REPO_PATH/Runner/utils/send-to-lava.sh Waylandsink_Playback.res || true
Loading
Loading