[webkit-changes] [WebKit/WebKit] aa24ab: A muted microphone track should get ended if its d...
youennf
noreply at github.com
Wed Apr 19 07:28:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: aa24abef3b41ed32881b1c66d61adc5a3702374e
https://github.com/WebKit/WebKit/commit/aa24abef3b41ed32881b1c66d61adc5a3702374e
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-04-19 (Wed, 19 Apr 2023)
Changed paths:
M LayoutTests/fast/mediastream/MediaDevices-addEventListener-expected.txt
M LayoutTests/fast/mediastream/device-change-event-2-expected.txt
M LayoutTests/fast/mediastream/microphone-change-while-capturing-expected.txt
M LayoutTests/fast/mediastream/microphone-change-while-capturing.html
A LayoutTests/fast/mediastream/microphone-change-while-muted-expected.txt
A LayoutTests/fast/mediastream/microphone-change-while-muted.html
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
M Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp
M Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.h
M Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp
M Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp
M Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h
Log Message:
-----------
A muted microphone track should get ended if its device disappears
https://bugs.webkit.org/show_bug.cgi?id=255591
rdar://problem/108194510
Reviewed by Eric Carlson.
The main change is in BaseAudioSharedUnit::devicesChanged where we no longer exit early if the shared unit is not running.
This ensures that muted tracks will be ended if their device is gone.
We do a refactoring so that mock device changes kick in the BaseAudioSharedUnit::devicesChanged logic.
We also do a small change to MediaStreamTrack::trackEnded to only log MediaStreamTrack capture failure if the track is not already ended.
Covered by added test.
Drive by fix in LayoutTests/fast/mediastream/microphone-change-while-capturing.html to ensure we use the usb fake device.
Rebasing of some tests now that some additional tracks are failing due to device changes.
* LayoutTests/fast/mediastream/MediaDevices-addEventListener-expected.txt:
* LayoutTests/fast/mediastream/device-change-event-2-expected.txt:
* LayoutTests/fast/mediastream/microphone-change-while-capturing-expected.txt:
* LayoutTests/fast/mediastream/microphone-change-while-capturing.html:
* LayoutTests/fast/mediastream/microphone-change-while-muted-expected.txt: Added.
* LayoutTests/fast/mediastream/microphone-change-while-muted.html: Copied from LayoutTests/fast/mediastream/microphone-change-while-capturing.html.
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::trackEnded):
* Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp:
(WebCore::BaseAudioSharedUnit::BaseAudioSharedUnit):
(WebCore::BaseAudioSharedUnit::~BaseAudioSharedUnit):
(WebCore::BaseAudioSharedUnit::devicesChanged):
* Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.h:
* Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
(WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
* Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSourceFactory::devicesChanged): Deleted.
* Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h:
Canonical link: https://commits.webkit.org/263132@main
More information about the webkit-changes
mailing list