Bug 230250 - [GLib] Media session manager unable to handle more than one session
Summary: [GLib] Media session manager unable to handle more than one session
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-14 04:08 PDT by Philippe Normand
Modified: 2022-12-05 13:21 PST (History)
13 users (show)

See Also:


Attachments
Patch (44.50 KB, patch)
2021-09-19 03:21 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2021-09-14 04:08:43 PDT
The dbus name it tries to acquire is unique to the app PID. We need some session id there, and the manager should handle more than one dbus object then, I think.
Comment 1 Philippe Normand 2021-09-19 03:21:42 PDT
Created attachment 438586 [details]
Patch
Comment 2 Peng Liu 2021-09-22 09:34:25 PDT
Comment on attachment 438586 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=438586&action=review

> Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:50
> +        return { };

Do you mean `return std::nullopt;` here?

> Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:117
> +        return { };

Ditto.

> Source/WebCore/platform/audio/glib/MediaSessionGLib.h:37
> +    explicit MediaSessionGLib(MediaSessionManagerGLib&, GRefPtr<GDBusConnection>&&, MediaSessionIdentifier);

Do we need explicit here?
Comment 3 Chris Dumez 2021-09-22 09:38:14 PDT
Comment on attachment 438586 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=438586&action=review

>> Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:50
>> +        return { };
> 
> Do you mean `return std::nullopt;` here?

Why? What would be the difference?
Comment 4 Peng Liu 2021-09-22 09:49:53 PDT
Comment on attachment 438586 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=438586&action=review

>>> Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:50
>>> +        return { };
>> 
>> Do you mean `return std::nullopt;` here?
> 
> Why? What would be the difference?

Just a style thing. I have seen a lot of usages of `std::nullopt`.
Comment 5 Adrian Perez 2021-09-30 13:22:39 PDT
Comment on attachment 438586 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=438586&action=review

>> Source/WebCore/platform/audio/glib/MediaSessionGLib.h:37
>> +    explicit MediaSessionGLib(MediaSessionManagerGLib&, GRefPtr<GDBusConnection>&&, MediaSessionIdentifier);
> 
> Do we need explicit here?

Never hurts :)
Comment 6 EWS 2021-10-02 02:07:19 PDT
Committed r283437 (242424@main): <https://commits.webkit.org/242424@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438586 [details].
Comment 7 Radar WebKit Bug Importer 2021-10-02 02:08:16 PDT
<rdar://problem/83795322>
Comment 8 Arcady Goldmints-Orlov 2021-10-08 12:20:07 PDT
This appears to have caused a number of regressions, (list filtered to what I think could be related to the change):

Regressions: Unexpected text-only failures

	media/audio-background-playback-playlist.html [ Failure ]
	media/media-session/actionHandlerInternalMappings.html [ Failure ]
	media/media-session/default-actionHandlers.html [ Failure ]
	media/video-background-playback.html [ Failure ]
	media/video-concurrent-playback.html [ Failure ]
	media/video-interruption-with-resume-not-allowing-play.html [ Failure ]
	media/video-multiple-concurrent-playback.html [ Failure ]
	media/webaudio-background-playback.html [ Failure ]
	webrtc/concurrentVideoPlayback2.html [ Failure ]

Regressions: Unexpected timeouts
	media/media-session/callActionHandler.html [ Timeout ]
	media/media-session/play-after-seek.html [ Timeout ]
	media/remote-control-command-is-user-gesture.html [ Timeout ]
	media/remote-control-command-scrubbing.html [ Timeout ]
	media/remote-control-command-seek.html [ Timeout ]
	media/video-inactive-playback.html [ Timeout ]
	media/video-interruption-with-resume-allowing-play.html [ Timeout ]
	media/video-isplayingtoautomotiveheadunit.html [ Timeout ]
	media/video-system-sleep.html [ Timeout ]
	webaudio/audiocontext-state-interrupted.html [ Timeout ]
	webaudio/suspend-context-while-interrupted.html [ Timeout ]
Comment 9 Philippe Normand 2021-10-09 02:07:11 PDT
I can't reproduce this on my desktop...
Comment 10 Arcady Goldmints-Orlov 2021-10-15 09:31:06 PDT
I can't reproduce it locally either but it seems to happen consistently on the bots, e.g. https://build.webkit.org/results/GTK-Linux-64-bit-Release-Skip-Failing-Tests/r284248%20(2041)/results.html