Skip to content

video: enhance GStreamer encode/decode test framework - #518

Open
nitinn22 wants to merge 2 commits into
qualcomm-linux:mainfrom
nitinn22:feature/video-gst-clean
Open

video: enhance GStreamer encode/decode test framework#518
nitinn22 wants to merge 2 commits into
qualcomm-linux:mainfrom
nitinn22:feature/video-gst-clean

Conversation

@nitinn22

@nitinn22 nitinn22 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Enhance the GStreamer video encode/decode test framework.

Changes

  • Extend lib_gstreamer helper functionality
  • Add reusable video helper support
  • Improve framework integration
  • Enhance encode/decode test execution flow and additional test cases added.
  • Improve validation and artifact handling
  • Update README documentation

Validation

  • Rebased on latest upstream/main
  • Merge conflicts resolved with latest framework
  • Encode/decode workflow validated
  • Branch contains only video-related changes

@nitinn22
nitinn22 force-pushed the feature/video-gst-clean branch from 8d9869d to 56f3538 Compare July 24, 2026 09:11

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.

Move the functions out of run.sh to lib_gstreamer.sh. I see duplicates and still optimizations can be done.

The current commit carries ~1600 lines of code, split it into logical commits inside the same PR:

  1. "gstreamer: add advanced video pipeline helpers"

    • UVC discovery;
    • stack-aware decoder arguments;
    • advanced pipeline builders;
    • common execution and validation helpers.
  2. "video: add UVC and DRC GStreamer tests"

    • UVC preview;
    • DRC caps-transition validation;
    • display prerequisites.
  3. "video: add concurrent decode tests"

    • H.264/H.265/MJPEG;
    • dynamic session layout;
    • concurrency-specific validation.
  4. "video: add downstream advanced encode tests"

    • smart encode;
    • cyclic IR;
    • slice MB;
    • Rotate90;
    • current-run artifact validation.
  5. "docs: document advanced GStreamer video coverage"

    • synchronized defaults;
    • prerequisites;
    • exact PASS/SKIP criteria;
    • verified execution examples.

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
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/utils/lib_gstreamer.sh
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
@nitinn22
nitinn22 force-pushed the feature/video-gst-clean branch 2 times, most recently from 3534470 to 4ff8619 Compare August 10, 2026 17:10
@nitinn22

Copy link
Copy Markdown
Contributor Author

Srikanth Muppandam (@smuppand) , followed similar pattern like earlier all runner script related changes in one commit and helper function changes in another. addressed the review comments and some comments updated explicitly.

Comment thread Runner/utils/lib_gstreamer.sh Outdated
Comment thread Runner/utils/lib_gstreamer.sh Outdated
Comment thread Runner/utils/lib_gstreamer.sh
: >"$test_log"

# Build pipeline using library function with 2 sessions
pipeline=$(gstreamer_build_concurrency_decode_pipeline "mjpeg" "$mjpeg_clip" "2")

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.

The helper’s third argument is video_stack, not session count, and the helper hardcodes sessions=8

Add an explicit session-count argument to gstreamer_build_concurrency_decode_pipeline, generate an appropriate two-session layout, and pass "$detected_stack" 2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

session count want to limit to 8 sessions for h264, h265 and 2 sessions to mjpeg. made changes acc.

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.

session count want to limit to 8 sessions for h264, h265 and 2 sessions to mjpeg. made changes acc.

Add an explicit session-count argument to gstreamer_build_concurrency_decode_pipeline, validate it, generate the matching layout, and call MJPEG with "$detected_stack" "2".

Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
: >"$test_log"

# Build pipeline using library function with 2 sessions
pipeline=$(gstreamer_build_concurrency_decode_pipeline "mjpeg" "$mjpeg_clip" "2")

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.

session count want to limit to 8 sessions for h264, h265 and 2 sessions to mjpeg. made changes acc.

Add an explicit session-count argument to gstreamer_build_concurrency_decode_pipeline, validate it, generate the matching layout, and call MJPEG with "$detected_stack" "2".

Comment thread Runner/utils/lib_gstreamer.sh Outdated
Comment thread Runner/utils/lib_gstreamer.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/README.md Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/README.md Outdated
@smuppand

Copy link
Copy Markdown
Contributor

nitinn22 Please fix the shellcheck failed workflow.

@nitinn22
nitinn22 force-pushed the feature/video-gst-clean branch from 4ff8619 to cc4fa57 Compare August 13, 2026 18:02
@nitinn22

Copy link
Copy Markdown
Contributor Author

addressed comments and shell check failures.

Comment thread Runner/utils/lib_gstreamer.sh Outdated
Comment thread Runner/utils/lib_gstreamer.sh Outdated
Comment thread Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh Outdated
Comment thread Runner/utils/lib_gstreamer.sh Outdated
@nitinn22
nitinn22 force-pushed the feature/video-gst-clean branch from cc4fa57 to 50d33bb Compare August 16, 2026 18:46
@nitinn22

Copy link
Copy Markdown
Contributor Author

run.sh

  • Updated test names and function comments
  • Changed resolution parameters from 3840x2160 to 1920x1080
  • Enhanced pipeline controls with VBR/CBR modes and QP parameters
  • Updated validation logic for new resolutions
  • Updated help text to reflect new test names

README.md

  • Updated test descriptions and names
  • Changed resolution specifications from 4K/UHD to 1080p
  • Added detailed feature lists for both tests
  • Updated pipeline documentation with new controls

Signed-off-by: nitinn <nitinn@qti.qualcomm.com>
Signed-off-by: nitinn <nitinn@qti.qualcomm.com>
@nitinn22
nitinn22 force-pushed the feature/video-gst-clean branch from 50d33bb to 15d3331 Compare August 17, 2026 06:11

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.

Follow-up on UVC thread

This remains unresolved. Missing frame/FPS evidence still only produces a warning at line 1437, after which timeout can be accepted as PASS. Require positive frame or buffer activity and fail when it is absent.

Follow-up on DRC thread

This remains unresolved. The implementation only finds 1080p and 720p anywhere in combined console and dmesg output. It still does not prove an ordered 1080p→720p caps transition or require frame activity after the second caps event.

Follow-up on concurrency thread

This is only partially resolved. The decoder count is now strict, but it counts element names from verbose output. That proves construction, not that every branch negotiated caps and produced buffers. Require per-branch negotiated and active-buffer evidence.

Follow-up on Weston cleanup thread

This remains unresolved. run.sh cleanup still does not call camera_cleanup_wayland_environment. Also, weston_was_running is reset during every setup call, which can overwrite the suite’s original compositor state.

Follow-up on artifact-validation thread

This remains unresolved. gstreamer_validate_encode_output still returns success when gst-discoverer-1.0 is unavailable. Advanced encode tests must not PASS without validating codec, container, resolution, and duration.

Comment thread Runner/utils/lib_gstreamer.sh
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