Qt multimedia with the ffmpeg backend suddenly started sending
LoadedMedia signals in the PlayingState, even though that should not be
a valid combination according to the docs. This is messing up the
AudioManager.
This method should pause the audio. Instead, the VLC backend would
toggle the pause state, i.e. it would start playing again if the audio
stream was already paused. This caused issues with already paused
streams incorrectly resuming playback after the system woke up from
suspend.
BUG: 474432
Stop spamming the DBus with positionChanged signals if playback is
progressing at the nominal playback rate. This brings the
implementation in line with the MPRIS2 player spec. The previous
implementation was causing android battery drain issues with KDEConnect
constantly updating the position (and player details) on the notification
widget.
This implementation will still send the current playback position every
10 seconds to ensure that clients that don't implement the standard
properly or did not receive previous messages, will still get regularly
updated.
This also fixes correct signaling of playback rate changes over DBus.
Otherwise it'll become a so-called automagic dependency with no control
over including support for it or not, other than having it installed on
the system or not.
For LIBVLC CMAKE_DISABLE_FIND_PACKAGE can be used, but for
pkg_check_modules no such things exits and we need an explicit option.
KMediaSession is an audio player library that has an API which is close
to QMediaPlayer and which allows to use --- and dynamically switch
between --- different audio backends. At this moment there is
implementation for libVLC, gstreamer and QtMultimedia. Only QtMultimedia
is a hard dependency in order to at least have one functional backend on
all platforms; all other dependencies are optional.
KMediaSession has out-of-the-box, built-in MPRIS2 support, sleep inhibit,
and basic metadata support.
BUG: 462358
Closes#35