feat: add Windows SMTC (System Media Transport Controls) support - #737
feat: add Windows SMTC (System Media Transport Controls) support#737kt286 wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kt286 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @kt286. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's GuideAdds Windows System Media Transport Controls (SMTC) integration, wiring WinRT media controls into PlayerEngine and main startup, while keeping existing MPRIS/DBus logic Linux-only and linking required Windows libraries. Sequence diagram for Windows SMTC initialization and playback syncsequenceDiagram
participant Main
participant Presenter
participant PlayerEngine
participant WinSMTC
Main->>WinSMTC: ensureStartMenuShortcut()
Main->>Presenter: playerEngine()
Presenter-->>Main: PlayerEngine*
Main->>PlayerEngine: setWinSMTC(hwnd)
PlayerEngine->>WinSMTC: WinSMTC(this)
PlayerEngine->>WinSMTC: initialize(hwnd)
WinSMTC-->>PlayerEngine: initialized
PlayerEngine->>PlayerEngine: resetDBusMpris(meta)
PlayerEngine->>WinSMTC: updateMetadata(title, artist, album, length, artPath)
PlayerEngine->>PlayerEngine: [playbackStatusChanged]
PlayerEngine->>WinSMTC: updatePlaybackStatus(status)
Sequence diagram for Windows SMTC button handlingsequenceDiagram
actor User
participant SystemSMTC
participant WinSMTC
participant PlayerEngine
User->>SystemSMTC: media key press
SystemSMTC-->>WinSMTC: ButtonPressedEvent
WinSMTC-->>PlayerEngine: playRequested()
PlayerEngine->>PlayerEngine: resume() / play() / pauseNow()
User->>SystemSMTC: next key
SystemSMTC-->>WinSMTC: ButtonPressedEvent
WinSMTC-->>PlayerEngine: nextRequested()
PlayerEngine->>PlayerEngine: playNextMeta(false)
User->>SystemSMTC: previous key
SystemSMTC-->>WinSMTC: ButtonPressedEvent
WinSMTC-->>PlayerEngine: previousRequested()
PlayerEngine->>PlayerEngine: playPreMeta()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
2b69612 to
c774bc5
Compare
|
TAG Bot New tag: 7.0.63 |
|
TAG Bot New tag: 7.0.64 |
c774bc5 to
ac1ebd0
Compare
|
TAG Bot New tag: 7.0.65 |
|
TAG Bot New tag: 7.0.66 |
ac1ebd0 to
630eb0e
Compare
- Add Windows System Media Transport Controls (SMTC) support - Wrap MprisPlayer include and usage in Q_OS_LINUX ifdef - Use void* placeholder for non-Linux platforms to maintain ABI - Add platform guards for setMprisPlayer in presenter and main - Update tests to conditionally compile MPRIS-dependent code feat: 添加 Windows SMTC 支持并为 MPRIS 添加 Linux 条件编译 - 新增 Windows System Media Transport Controls (SMTC) 支持 - 使用 Q_OS_LINUX ifdef 将 MprisPlayer 包裹为仅 Linux 可用 - 非 Linux 平台使用 void* 占位符保持 ABI 兼容 - 为 presenter 和 main 中的 setMprisPlayer 添加平台保护 - 更新测试代码的条件编译
630eb0e to
eb4023a
Compare
Implement Windows SMTC integration so the system media overlay can display current track info and respond to play/pause/next/previous commands, similar to MPRIS on Linux.
feat: 添加 Windows SMTC(系统媒体传输控件)支持
实现 Windows SMTC 集成,使系统媒体覆盖层可以显示当前曲目信息并响应
播放/暂停/下一曲/上一曲命令,类似 Linux 上的 MPRIS。
Summary by Sourcery
Integrate Windows system media controls into the player while preserving Linux-only MPRIS behavior.
New Features:
Enhancements:
Build:
Tests:
Chores: