Skip to content

Added Multimedia Video and Display GStreamer test scripts - #290

Merged
Srikanth Muppandam (smuppand) merged 20 commits into
qualcomm-linux:mainfrom
nitinn22:feature/gstchange
Feb 27, 2026
Merged

Srikanth Muppandam (smuppand) merged 20 commits into
qualcomm-linux:mainfrom
nitinn22:feature/gstchange

Conversation

@nitinn22

Copy link
Copy Markdown
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>

@smuppand Srikanth Muppandam (smuppand) left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
…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
Copy Markdown
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
Copy Markdown
Contributor

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.

Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
…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>
Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
Comment thread Runner/utils/lib_gstreamer.sh
Comment thread Runner/utils/lib_gstreamer.sh
Comment thread Runner/utils/lib_gstreamer.sh
Comment thread Runner/utils/lib_gstreamer.sh Outdated
…omments

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

Copy link
Copy Markdown
Contributor

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)

Comment thread Runner/utils/lib_gstreamer.sh
Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh Outdated
…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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@smuppand
Srikanth Muppandam (smuppand) merged commit ee7c271 into qualcomm-linux:main Feb 27, 2026
12 checks passed
@nitinn22
nitinn22 deleted the feature/gstchange branch March 4, 2026 16:36
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