fix(VideoManager): preserve Windows software frames - #14728
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14728 +/- ##
==========================================
+ Coverage 25.47% 32.61% +7.14%
==========================================
Files 769 783 +14
Lines 65912 67513 +1601
Branches 30495 31263 +768
==========================================
+ Hits 16788 22020 +5232
+ Misses 37285 30657 -6628
- Partials 11839 14836 +2997
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Build ResultsPlatform Status
All builds passed. Pre-commit
Pre-commit hooks: 0 passed, 0 failed, 0 skipped. Test Resultslinux-coverage-integration: 37 passed, 0 skipped Code Coverage
Artifact Sizes
Updated: 2026-07-28 07:21:07 UTC • Commit: 1b53292 • Triggered by: Windows |
fc60736 to
1b53292
Compare
|
@HTRamsey, this focused Windows system-memory regression fix is ready for review. Exact head |
|
Do you have anything like a gstreamer test stream setup which can reproduce this? |
|
Yes. This PR includes a deterministic, camera-free GStreamer reproducer:
On a Windows D3D11 Debug build, run it with:
The test maps the There is also a companion test, qgroundcontrol/test/VideoManager/GStreamer/gstqgc/GStreamerGstQgcTest.cc Lines 721 to 778 in 1b53292 I can also provide an external RTSP/JPEG recipe if that is more useful for your setup. |
|
I finally got a windows build up and running and I can see the problem as well with the MockLink Camera/Video support I added a few days ago. |
|
Verified that the fix works. Just doing code review now... |
There was a problem hiding this comment.
Pull request overview
Fixes a Windows-specific regression in QGroundControl’s GStreamer GPU sink bin where the pipeline was unconditionally inserting d3d11upload ! d3d11convert, which could incorrectly promote system-memory (software-decoded) frames into the D3D path and produce green frames. The change restores direct caps-driven routing into qgcqvideosink, preserving zero-copy for native D3D frames while keeping the existing CPU fallback for system-memory frames.
Changes:
- Simplified the Windows GPU path wiring to link
capsfilter → qgcqvideosinkdirectly (no forced D3D11 upload/convert stage). - Updated/extended GStreamer unit tests to assert Windows GPU bin element composition and to validate both system-memory fallback rendering and direct D3D11 memory handling.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/VideoManager/VideoReceiver/GStreamer/gstqgc/gstqgcvideosinkbin.cc |
Removes forced d3d11upload ! d3d11convert insertion and restores direct caps-based routing into qgcqvideosink. |
test/VideoManager/GStreamer/GStreamerTest.h |
Adds declarations for two new Windows GPU sink regression tests. |
test/VideoManager/GStreamer/GStreamerTest.cc |
Adds skip stubs for the new tests when GStreamer is not enabled. |
test/VideoManager/GStreamer/gstqgc/GStreamerGstQgcTest.cc |
Updates GPU-bin structure assertions for Windows and adds two new Windows-specific validation tests (software/system-memory fallback + direct D3D11Memory path). |
Concerns
|
|
@alireza787b Can you look at the Claude review? |
|
@alireza787b I'm going to merge this an you can deal with the code review after the fact. I want to mark stable RC1 today and this pull does work and is certainly better than without it! |
|
Thanks for reproducing and verifying the Windows fallback before merge. The requested post-merge comment and test cleanup is now isolated in #14752. It does not change runtime behavior and explicitly avoids claiming separate hardware-decoder coverage for 4:2:2 or 4:4:4 streams. |
Description
QGC's Windows GPU-capable sink was inserting
d3d11upload ! d3d11convertahead of every decoded frame. That also promoted software-decoded system-memory frames into the D3D path. In the reproduced JPEG case those frames rendered solid green, while QGC's existing Force CPU video path rendered the same stream correctly.This change restores direct caps routing into
qgcqvideosink:This is a generic Windows sink regression fix. It adds no transport-specific behavior and no new user setting.
Type of Change
Testing
The integrated candidate was manually exercised with JPEG streams on Windows, Linux, and Android. Windows reproduced the green-frame failure before this routing correction and rendered correctly through the system-memory fallback afterward.
Exact PR head
1b532926ab276969a9eefc8e15bbe1747bbc5767passed QGC's Linux, Windows, macOS, Android, iOS, Docker, sanitizer, unit, integration, pre-commit, and CodeQL checks.Platforms Tested
Flight Stacks Tested
Not applicable: this change is confined to decoded-frame routing and does not enter a vehicle command path.
Screenshots
Not applicable; there is no UI change.
Checklist
Related Issues
This is an independent regression fix extracted from draft #13594. HTTP and WebSocket JPEG source support are intentionally proposed separately.
By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).