Bug 416179

Summary: Don't signal MPRIS Position property changes on bus
Product: [Applications] Elisa Reporter: Kai Uwe Broulik <kde>
Component: generalAssignee: Matthieu Gallien <matthieu_gallien>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Kai Uwe Broulik 2020-01-12 17:57:24 UTC
SUMMARY
Elisa continuously signals that the Position property has changed while playing which causes excess DBus traffic and the MPRIS spec [1] explicitly says should not be done.

[1] https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html#Property:Position


STEPS TO REPRODUCE
1. Play a song in Elisa
2. Run dbus-monitor

OBSERVED RESULT
It continuously emits PropertyChanged for Position

EXPECTED RESULT
It doesn't spam the bus

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.17.80
KDE Frameworks Version: 5.66.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION
The UnityLauncher DBus could probably also be throttled more, signalling a change of 0,001446 for an item that is 300px wide in task bar is less than a one pixel change.
Comment 1 Alexander Stippich 2020-01-22 20:15:18 UTC
Git commit baa589f73411bb41ad9319b24fc79eae66667d41 by Alexander Stippich.
Committed on 22/01/2020 at 20:14.
Pushed by astippich into branch 'release/19.12'.

do not signal property change for position via MPRIS

M  +0    -1    src/mpris2/mediaplayer2player.cpp

https://invent.kde.org/kde/elisa/commit/baa589f73411bb41ad9319b24fc79eae66667d41
Comment 2 Alexander Stippich 2020-02-04 16:09:20 UTC
Git commit ec5197521066d64ec0d2409a0af9388095c2130c by Alexander Stippich.
Committed on 04/02/2020 at 16:09.
Pushed by astippich into branch 'release/19.12'.

limit the rate with which progress is sent via MPRIS

M  +13   -5    src/mpris2/mediaplayer2player.cpp
M  +1    -0    src/mpris2/mediaplayer2player.h

https://invent.kde.org/kde/elisa/commit/ec5197521066d64ec0d2409a0af9388095c2130c