Support media control buttons via MPRIS #27
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/nanoKontroller2!27
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-1-media-actions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a
mediaaction type that drives MPRIS players on the D-Bus session bus, so the transport buttons finally have something to bind to.Closes: #1
What is in here
MprisPlayerRegistry(no glib, unit-tested): which players exist, their playback status and history, and the rule that ranks them — status band, then recency, then configured entry order, then appearance order, with a bus-name tiebreak so the result cannot depend on hash order. Matching reusesNodeMatcherover every dot-aligned suffix of the bus name (with theinstance_<n>segment stripped) plus the player'sIdentity.MediaService: session-bus connection,NameOwnerChangedtracking, oneorg.mpris.MediaPlayer2.Playerproxy per player (plus a short-lived one forIdentity), asynchronous method calls, and listener notification on every change. A missing session bus prints one warning and leaves all media actions inert.LedManager, with a single shared timer;Setcancels blinking for the control it writes.Rewind/FastForwardadded to theLEDenum — they carry LEDs on the device but were not addressable. Side effect: the startup reset now clears them too.Action_Media:play-pause,stop,next,previous,seek-backward,seek-forward; optionaltargetandseconds. Play LED solid while playing, blinking while paused; Stop LED lit while stopped; seek LEDs show the button, not the player, and scrubbing repeats every 200 ms after a 400 ms hold.MediaService&threaded throughIActionBase::Initand the action factory (clean cutover, no overloads kept), README documentation, anddbus.socketadded to the user unit'sAfter=.Verification
nanoKontroller2_mpris_tests(new ctest target) covers instance-suffix stripping, suffix matching,Identitymatching and the full selection ranking, including the no-match and unknown-bus-name paths. Built and run locally: all checks pass.DBUS_SESSION_BUS_ADDRESS=unix:path=/nonexistentdegraded path) are untested. In particular, the assumption thatRewind/FastForwardreally have LEDs comes from the issue, not from code — if they do not light up, the twoLEDenum members and the LED writes in the seek branch can be dropped without touching anything else.WIP: Support media control buttons via MPRISto Support media control buttons via MPRIS