Skip to content

Conversation

HTRamsey
Copy link
Collaborator

Uses D3D11 instead of OpenGL on Windows

@HTRamsey HTRamsey force-pushed the dev-gstreamer-qml6d3d11 branch 5 times, most recently from d0e8e0f to 66d670a Compare May 13, 2025 15:35
@HTRamsey HTRamsey force-pushed the dev-gstreamer-qml6d3d11 branch 2 times, most recently from 4d864ef to 6a70327 Compare June 2, 2025 21:15
@HTRamsey HTRamsey force-pushed the dev-gstreamer-qml6d3d11 branch 3 times, most recently from 52435f6 to 21de26f Compare July 3, 2025 03:03
@HTRamsey HTRamsey force-pushed the dev-gstreamer-qml6d3d11 branch 4 times, most recently from 0b3aac9 to 3a0f7bf Compare July 9, 2025 11:44
@HTRamsey HTRamsey requested a review from Copilot July 10, 2025 11:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a Direct3D11-based video sink path for Windows by introducing new D3D11 sink components, updating build configurations, and selecting the appropriate sink and graphics API at runtime on Windows.

  • Introduce gstqgcvideosinkbin_d3d11 and qml6d3d11sink for Windows, alongside registration and plugin support.
  • Update CMake and FindGStreamer.cmake to include and link the D3D11 GStreamer component.
  • Adjust runtime selection in GStreamer.cc, GstVideoReceiver.cc, QML registrations, and application initialization to use D3D11 on Windows.

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
gstqml6gl/CMakeLists.txt Force shader resource cache override
gstqgc/gstqgcvideosinkbin_d3d11.h/.cc Added D3D11 sink bin type and implementation
gstqgc/gstqgcvideosinkbin.h/.cc Renamed QML GL sink fields to match qml6glsink
gstqgc/gstqgcelements.h Declared qgcvideosinkbind3d11 element
gstqgc/CMakeLists.txt Include D3D11 source files on Windows
GstVideoReceiver.cc Conditionally omit sync property on Windows
GStreamer.cc Register and verify qml6d3d11 plugin; select sink by OS
CMakeLists.txt (GStreamer) Add D3d11 to FindGStreamer components
cmake/find-modules/FindGStreamer.cmake Support GStreamer D3d11 component and link libraries
.github/workflows/windows.yml & custom.yml Bump Windows CI GStreamer version to 1.26.3
VideoManager.cc & QGCApplication.cc Register new QML type and switch to Direct3D11 graphics API
Comments suppressed due to low confidence (3)

src/VideoManager/VideoReceiver/GStreamer/GstVideoReceiver.cc:1014

  • The conditional around the "sync" argument leaves a dangling comma or removes it incorrectly on Windows. Refactor to add the sync property only when needed without breaking the argument list.
                 #ifndef Q_OS_WIN

src/VideoManager/VideoReceiver/GStreamer/GStreamer.cc:134

  • Missing semicolon after GST_PLUGIN_STATIC_REGISTER(qml6d3d11), which will cause a compile error.
    GST_PLUGIN_STATIC_REGISTER(qml6d3d11)

src/VideoManager/VideoReceiver/GStreamer/GStreamer.cc:259

  • Array size is declared as 2 but conditionally includes a third element (qml6d3d11) on Windows, leading to out-of-bounds initialization. Increase the size or use a dynamic container.
    static constexpr const char *pluginNames[2] = {

@HTRamsey HTRamsey force-pushed the dev-gstreamer-qml6d3d11 branch 5 times, most recently from 75ce547 to fcbe986 Compare July 11, 2025 07:21
@HTRamsey HTRamsey force-pushed the dev-gstreamer-qml6d3d11 branch from fcbe986 to 26b862f Compare August 8, 2025 13:33
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.

1 participant