Add Qt6 multimedia backend plugin (Qt 6.4+)#7
Draft
Copilot wants to merge 3 commits into
Draft
Conversation
Agent-Logs-Url: https://github.com/wang-bin/qtmultimedia-plugins-mdk/sessions/cd7d1633-5721-48d4-9f0f-4863174ea640 Co-authored-by: wang-bin <785206+wang-bin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Support Qt6 multimedia framework and custom plugins
Add Qt6 multimedia backend plugin (Qt 6.4+)
Mar 28, 2026
wang-bin
requested changes
May 15, 2026
Owner
wang-bin
left a comment
There was a problem hiding this comment.
- before qt6.10,
QPlatformMediaIntegration::createSome()returnsQMaybe<QPlatformSome*>, since qt6.10 returnsq23::expected<QPlatformSome*,QString/*error*/>
Copilot stopped work on behalf of
wang-bin due to an error
May 15, 2026 06:11
Copilot stopped work on behalf of
wang-bin due to an error
May 15, 2026 06:25
wang-bin
requested changes
May 19, 2026
Owner
wang-bin
left a comment
There was a problem hiding this comment.
before qt6.10, QPlatformMediaIntegration::createSome() returns QMaybe<QPlatformSome*>, since qt6.10 returns q23::expected<QPlatformSome*,QString/error/>
Agent-Logs-Url: https://github.com/wang-bin/qtmultimedia-plugins-mdk/sessions/2bc94e2e-e0a4-41ee-b6e2-b56efd47db36 Co-authored-by: wang-bin <785206+wang-bin@users.noreply.github.com>
Author
Updated Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qt 6.4 introduced a new
QPlatformMediaPlugin/QPlatformMediaIntegrationAPI for custom multimedia backends, replacing the Qt5QMediaServiceProviderPluginmodel. This PR wires MDK into that new framework while keeping the Qt5 path intact.New Qt6 plugin layer (
qt6/)mdkplatformmediaplugin—QPlatformMediaPluginentry point; responds to key"mdk"viaQ_PLUGIN_METADATA(IID QPlatformMediaPlugin_iid)mdkmediaintegration—QPlatformMediaIntegrationfactory; creates the player and a defaultQPlatformVideoSinkmdkplayercontrol—QPlatformMediaPlayerimplementation wrapping MDK'sPlayer; all MDK callbacks dispatch to the main thread viaQMetaObject::invokeMethodVideo output
Two paths, tried in order:
MDK_ABI):player_.renderVideo()→getVideoFrame()→ plane-by-plane memcpy into aQVideoFrame→QVideoSink::setVideoFrame(). Zero GL overhead for software-decoded content.MDK_ABI): render into a dedicatedQOffscreenSurface+QOpenGLContext, read back viaQOpenGLFramebufferObject::toImage(), push asQVideoFrameFormat::Format_RGBA8888.Build system
.qmake.confandmdkmediaservice.proconditionally selectPLUGIN_TYPE=multimedia/ sources for Qt6,mediaservice/ original sources for Qt5.<Qt>/plugins/multimedia/; Qt5 unchanged at<Qt>/plugins/mediaservice/.QT += multimedia-private opengladded for Qt6 builds.Plugin metadata
mdkmediaservice.jsonkey renamed"mdkservice"→"mdk"(required for Qt6 discovery; Qt5 uses the"Services"field and is unaffected by the key name). Existing users relying onQT_MULTIMEDIA_PREFERRED_PLUGINS=mdkservicewill need to update tomdk.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.