Added Multimedia Video and Display GStreamer test scripts#290
Added Multimedia Video and Display GStreamer test scripts#290nitinn22 wants to merge 6 commits intoqualcomm-linux:mainfrom
Conversation
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>
There was a problem hiding this comment.
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.
Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/Waylandsink_Playback.yaml
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/Waylandsink_Playback.yaml
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Outdated
Show resolved
Hide resolved
…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>
|
@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. |
smuppand
left a comment
There was a problem hiding this comment.
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.
Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/Waylandsink_Playback.yaml
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Outdated
Show resolved
Hide resolved
Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh
Outdated
Show resolved
Hide resolved
…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>
| @@ -0,0 +1,389 @@ | |||
| #!/bin/sh | |||
| # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. | |||
| # SPDX-License-Identifier: BSD-3-Clause per legal request. | |||
There was a problem hiding this comment.
Remove per legal request.
| exit 0 | ||
| } | ||
|
|
||
| check_dependencies "grep head sed" >/dev/null 2>&1 || { |
There was a problem hiding this comment.
Both can be combined into a single dependency check.
|
|
||
| # -------------------- Pre-checks -------------------- | ||
| check_dependencies "gst-launch-1.0 gst-inspect-1.0" >/dev/null 2>&1 || { | ||
| log_warn "Missing gstreamer runtime (gst-launch-1.0/gst-inspect-1.0)" |
| } | ||
|
|
||
| check_dependencies "grep head sed" >/dev/null 2>&1 || { | ||
| log_warn "Missing required tools (grep, head, sed)" |
| # Parse WIDTHxHEIGHT format (e.g., 1920x1080) | ||
| if [ -n "$2" ]; then | ||
| width="${2%%x*}" | ||
| height="${2#*x}" |
There was a problem hiding this comment.
No validation that: WIDTHxHEIGHT format is present
both are numeric and height isn’t unchanged when x missing
This can trigger arithmetic/ caps errors later
|
|
||
| for res in $resolutions; do | ||
| params=$(gstreamer_resolution_to_wh "$res") | ||
| width=$(printf '%s' "$params" | awk '{print $1}') |
There was a problem hiding this comment.
Avoid awk and prefer posix clean + faster
set -- $params
width="$1"; height="$2"
| res="$1" | ||
| case "$res" in | ||
| 480p) | ||
| printf '%s %s\n' "640" "480" |
There was a problem hiding this comment.
Right now, unknown tokens silently become 480p:
That hides config mistakes (e.g., VIDEO_RESOLUTIONS=4K typo) and makes results misleading.
*)
return 1
;;
Then callers should SKIP that test case (or overall SKIP if no valid resolutions).
| ;; | ||
| vp9) | ||
| parser="" | ||
| container="matroskademux" |
There was a problem hiding this comment.
Then you always go through the container branch, which will generate:
filesrc ! matroskademux ! ! v4l2vp9dec ...
Because parser="", you end up with ! ! (invalid pipeline).
only insert parser when it’s non-empty. Also, VP9 in WebM should be:
filesrc ! matroskademux ! vp9parse ! v4l2vp9dec ... (if vp9parse exists), or
filesrc ! matroskademux ! queue ! v4l2vp9dec ... (often works, but parse is better)
| width="$2" | ||
| height="$3" | ||
| duration="$4" | ||
| framerate="$5" |
There was a problem hiding this comment.
uses $((duration * framerate)) without numeric safety
Library should not assume callers validated this. Any env typo will break pipeline construction.
| fi | ||
|
|
||
| # Check for CRITICAL or FATAL level messages | ||
| if grep -q -E "CRITICAL|FATAL" "$logfile" 2>/dev/null; then |
There was a problem hiding this comment.
this can match unreleated messages.
prefer anchored or GST_..._ERROR patterns (already partly covered)
grep -q -E '(^CRITICAL:|^FATAL:|gst.*(CRITICAL|FATAL))'
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.