Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a420a8c5cf2113698903a874a565592cc18a127c
https://github.com/WebKit/WebKit/commit/a420a8c5cf2113698903a874a565592cc18a127c
Author: Loïc Le Page <[email protected]>
Date: 2025-10-06 (Mon, 06 Oct 2025)
Changed paths:
M Source/WebCore/Modules/speech/SpeechRecognitionCaptureSource.cpp
M Source/WebCore/platform/mediastream/CaptureDevice.h
M Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp
M
Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp
M
Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp
M Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp
M Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp
Log Message:
-----------
[WPE][GTK] Speakers enumeration doesn't show ALSA virtual sinks
https://bugs.webkit.org/show_bug.cgi?id=300109
Reviewed by Philippe Normand.
- The audio devices management system was considering the speakers as capture
devices and so was automatically creating GStreamer pipelines with an
underlying `alsasink` element opening the raw audio hardware. As ALSA
devices have usually an exclusive access, maintaining the device open was
impeding to list the other virtual sinks in the ALSA configuration. During
the listing of the virtual sinks, it needs to open the underlying real
audio device to fetch information about the audio samples format but
it cannot because the audio real device is already open. In all cases, there
should not be any GStreamer pipeline at all created for a speaker device as
it produces no audio. Doing so was also producing some warnings at the
GStreamer level as it was trying to set a property reserved for source
elements on a sink element. The fix is filtering out the speaker devices
when creating the `GStreamerAudioCaptureSource` instances in order to not
build broken capture pipelines with sink elements.
- Indeed, the `GStreamerCaptureDeviceManager` was not creating unique IDs
for the different input/output interfaces. Those unique IDs are used to link
together different audio elements but, as they were not unique, a same sound
card with a microphone and a speaker had the same ID for both interfaces. At
the moment of creating a `GStreamerAudioCaptureSource` instance for the
microphone, the system was fetching the speaker interface instead and not
the microphone one and, so, was locking the real hardware sound card just
like in the former point. In addition to the device name, the fix also adds
the device GStreamer class to differentiate inputs from outputs in the
device ID.
* Source/WebCore/Modules/speech/SpeechRecognitionCaptureSource.cpp:
(WebCore::SpeechRecognitionCaptureSource::findCaptureDevice):
* Source/WebCore/platform/mediastream/CaptureDevice.h:
(WebCore::CaptureDevice::isSpeakerDevice const):
* Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::createMediaStream):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
*
Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
(WebCore::GStreamerCaptureDeviceManager::captureDeviceFromGstDevice):
* Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp:
(WebCore::GStreamerCapturer::createSource):
* Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp:
Canonical link: https://commits.webkit.org/301082@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes