Skip to content

Added Multimedia Video and Display GStreamer test scripts#290

Merged
smuppand merged 20 commits intoqualcomm-linux:mainfrom
nitinn22:feature/gstchange
Feb 27, 2026
Merged

Added Multimedia Video and Display GStreamer test scripts#290
smuppand merged 20 commits intoqualcomm-linux:mainfrom
nitinn22:feature/gstchange

Conversation

@nitinn22
Copy link
Contributor

The scripts support GStreamer level validation for video and display,

Video: H.264/H.265/VP9 encode/decode with V4L2
Display: Wayland compositor validation

More info in their corresponding readme files.

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…sing

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the generic helpers currently defined in Video_Encode_Decode/run.sh into Runner/utils/lib_gstreamer.sh so other GST tests can reuse them:
get_resolution_params() ->gstreamer_resolution_to_wh()
get_encoder_element() / get_decoder_element() -> gstreamer_v4l2_{encoder,decoder}_for_codec()
get_file_extension() -> gstreamer_container_ext_for_codec() (or similar)
Extract pipeline string creation into library builders:
gstreamer_build_v4l2_encode_pipeline()
gstreamer_build_v4l2_decode_pipeline()
Move bitrate selection + file-size helper into lib (gstreamer_bitrate_for_resolution, gstreamer_file_size_bytes) to avoid re-implementations.

Keep .res emission + summary logic in run.sh. library functions should not write results directly.

…r V4L2 video helper functions from Video_Encode_Decode test to shared lib_gstreamer.sh for code reuse across all GStreamer tests

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
@smuppand
Copy link
Contributor

@nitinn22 Kindly close the comments where you've already addressed previous review feedback, so I can focus on the remaining ones. Also, please rebase your work on top of the main branch. Also Updated SPDX license identifiers from BSD-3-Clause-Clear to BSD-3-Clause per legal request.

Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README inconsistency (Waylandsink): help text says default test is “for 10s” but script default duration resolves to 30s. Update README/help examples.

README mismatch (Video): documentation lists encoded outputs like .h264/.h265, but the pipeline uses mp4mux and outputs .mp4. Update README to match reality.

…video scripts based on review comments

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…l request

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…omments

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to address few before merge (non-blocking but important)

…received

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: nitinn22 <nitinn@qti.qualcomm.com>
while [ "$SEARCH" != "/" ]; do
if [ -f "$SEARCH/init_env" ]; then
INIT_ENV="$SEARCH/init_env"
break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If init_env is missing, .res stays empty.

duration="${VIDEO_DURATION:-${RUNTIMESEC:-30}}"
pattern="${VIDEO_PATTERN:-smpte}"
width="${VIDEO_WIDTH:-1920}"
height="${VIDEO_HEIGHT:-1080}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You validate VIDEO_DURATION, RUNTIMESEC, VIDEO_FRAMERATE, debug level — but not VIDEO_WIDTH / VIDEO_HEIGHT.
If someone passes VIDEO_WIDTH=1920x1080 (or any non-numeric), your basic sanity block can hit "integer expression expected"/ undefined behavior depending on the shell

SEARCH="$SCRIPT_DIR"
while [ "$SEARCH" != "/" ]; do
if [ -f "$SEARCH/init_env" ]; then
INIT_ENV="$SEARCH/init_env"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here as well..

# Validate environment variables if set
# Validate numeric parameters
for param in VIDEO_DURATION RUNTIMESEC VIDEO_FRAMERATE VIDEO_GST_DEBUG GST_DEBUG_LEVEL; do
val="${!param:-}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a bashism, remove the loop and validate each env var explicitly or use a posix safe eval.

echo "$TESTNAME SKIP" >"$RES_FILE"
exit 0
fi
if [ -n "$2" ] && ! is_u32 "$2"; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u32 isn't guarenteed.

encoder=$(gstreamer_v4l2_encoder_for_codec "$codec")
if [ -z "$encoder" ]; then
log_warn "Encoder not available for $codec"
skip_count=$((skip_count + 1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the skip_count++ increments from the VP9 pre-step and let the actual decode test be the single source of skip accounting.
Specifically remove these (3 places):
when IVF not found after download attempt
when missing ivfparse/muxer
when conversion fails and you rm files
That keeps actual_total = pass+fail+skip aligned with executed tests.

…g as per repo standards

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…ttern

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…ner/utils/send-to-lava.sh

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…yback.yaml

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…unt logic for vp9

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…bm clip removed ivf dep, updated lib gstreamer with addon local clip function for vp9 test

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
…pendencies

Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
@smuppand smuppand requested a review from abbajaj806 February 26, 2026 18:22
Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smuppand smuppand merged commit ee7c271 into qualcomm-linux:main Feb 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants