[webkit-changes] [WebKit/WebKit] 5e2b53: [GTK] Creates a lot of MPRIS notifications with no...

Alex noreply at github.com
Sat Mar 23 09:59:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e2b534ceb82cab15eac4b487e09c592bd06fec6
      https://github.com/WebKit/WebKit/commit/5e2b534ceb82cab15eac4b487e09c592bd06fec6
  Author: Serial <69764315+Serial-ATA at users.noreply.github.com>
  Date:   2024-03-23 (Sat, 23 Mar 2024)

  Changed paths:
    M Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp
    M Source/WebCore/platform/audio/glib/MediaSessionGLib.h
    M Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp
    M Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h

  Log Message:
  -----------
  [GTK] Creates a lot of MPRIS notifications with no reason
https://bugs.webkit.org/show_bug.cgi?id=247527

Reviewed by Philippe Normand.

At any given time, there should be only one active MPRIS session.
MediaSessionManagerGLib would not unregister inactive MPRIS sessions
once a new one became the current session. This patch ensures that
once a new current session is set, all others both unregistered and
marked as ineligible for future registration on status changes.

* Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:
(WebCore::MediaSessionGLib::~MediaSessionGLib):
(WebCore::MediaSessionGLib::ensureMprisSessionRegistered):
(WebCore::MediaSessionGLib::unregisterMprisSession):
(WebCore::MediaSessionGLib::emitPositionChanged):
(WebCore::MediaSessionGLib::getPlaybackStatusAsGVariant):
(WebCore::MediaSessionGLib::emitPropertiesChanged):
* Source/WebCore/platform/audio/glib/MediaSessionGLib.h:
(WebCore::MediaSessionGLib::setMprisRegistrationEligibility):
(WebCore::MediaSessionGLib::mprisRegistrationEligibility const):
(WTF::LogArgument<WebCore::MediaSessionGLib::MprisRegistrationEligiblilty>::toString):
* Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.cpp:
(WebCore::MediaSessionManagerGLib::setPrimarySessionIfNeeded):
(WebCore::MediaSessionManagerGLib::unregisterAllOtherSessions):
(WebCore::MediaSessionManagerGLib::nowPlayingEligibleSession): Modified to reflect the Cocoa implementation
(WebCore::MediaSessionManagerGLib::updateNowPlayingInfo):
(WebCore::MediaSessionManagerGLib::setCurrentSession):
* Source/WebCore/platform/audio/glib/MediaSessionManagerGLib.h:

Canonical link: https://commits.webkit.org/276591@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list