WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 233316
Let RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit switch to VPIO unit if VPIO is running
https://bugs.webkit.org/show_bug.cgi?id=233316
Summary
Let RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit switch to VP...
youenn fablet
Reported
2021-11-18 06:32:23 PST
Let RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit switch to VPIO unit if VPIO is running
Attachments
Patch
(35.53 KB, patch)
2021-11-18 06:49 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(39.83 KB, patch)
2021-11-19 12:38 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(39.32 KB, patch)
2021-11-22 00:43 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(39.56 KB, patch)
2021-12-01 05:45 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2021-11-18 06:49:24 PST
Created
attachment 444668
[details]
Patch
youenn fablet
Comment 2
2021-11-18 06:51:45 PST
There are some issues with this approach. In particular, when microphone is muted through WebKit, we keep using PlayAndRecord but switch to RemoteIO for audio rendering. We then end up in ducked audio, because of PlayAndRecord. We need to investigate this issue further, as it seems setting PlayAndRecord but not starting VPIO should not trigger these audio level jumps.
youenn fablet
Comment 3
2021-11-19 12:38:11 PST
Created
attachment 444845
[details]
Patch
youenn fablet
Comment 4
2021-11-22 00:43:50 PST
Created
attachment 444950
[details]
Patch
Phong Le
Comment 5
2021-11-25 03:01:02 PST
Not only remote audio stream but also playing a media url by audio, video element during a call
Radar WebKit Bug Importer
Comment 6
2021-11-25 06:33:24 PST
<
rdar://problem/85750694
>
Eric Carlson
Comment 7
2021-11-30 08:47:56 PST
Comment on
attachment 444950
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=444950&action=review
> Source/WebCore/ChangeLog:9 > + We use this in WebKit to render the MediaStreamTrackis of the process doing capture through VPIO when running.
s/MediaStreamTrackis/MediaStreamTracks/
> Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp:87 > + setShouldProduceMicrophoneSamples(true);
Nit: it not only _should_ produce microphone samples, it _is_ producing them, so maybe `setIsProducingMicrophoneSamples` instead?
> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:499 > + m_speakerSamplesProducer->captureUnitIsStopped();
Nit: The producer is called after the unit has stopped, so I think `captureUnitHasStopped` would be clearer.
> Source/WebKit/GPUProcess/GPUProcess.cpp:516 > +void GPUProcess::notifyStartCapturingAudio(GPUConnectionToWebProcess& process)
Nit: this name is slightly awkward, maybe `audioCaptureIsStarting`, or `processIsStartingToCaptureAudio` instead?
> Source/WebKit/GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:255 > + if (m_isPlaying) > + m_localUnit->stop();
This made me scratch my head for a minute so it might be worth adding a comment about why we stop the local unit when the capture unit starts.
> Source/WebKit/GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:261 > + if (m_isPlaying) > + m_localUnit->start();
Ditto
youenn fablet
Comment 8
2021-12-01 05:34:15 PST
Thanks for the review. (In reply to Eric Carlson from
comment #7
)
> Comment on
attachment 444950
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=444950&action=review
> > > Source/WebCore/ChangeLog:9 > > + We use this in WebKit to render the MediaStreamTrackis of the process doing capture through VPIO when running. > > s/MediaStreamTrackis/MediaStreamTracks/
OK
> > Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp:87 > > + setShouldProduceMicrophoneSamples(true); > > Nit: it not only _should_ produce microphone samples, it _is_ producing > them, so maybe `setIsProducingMicrophoneSamples` instead?
Sounds good.
> > Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:499 > > + m_speakerSamplesProducer->captureUnitIsStopped(); > > Nit: The producer is called after the unit has stopped, so I think > `captureUnitHasStopped` would be clearer.
OK
> > Source/WebKit/GPUProcess/GPUProcess.cpp:516 > > +void GPUProcess::notifyStartCapturingAudio(GPUConnectionToWebProcess& process) > > Nit: this name is slightly awkward, maybe `audioCaptureIsStarting`, or > `processIsStartingToCaptureAudio` instead?
processIsStartingToCaptureAudio sounds much better.
> > Source/WebKit/GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:255 > > + if (m_isPlaying) > > + m_localUnit->stop(); > > This made me scratch my head for a minute so it might be worth adding a > comment about why we stop the local unit when the capture unit starts. > > > Source/WebKit/GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:261 > > + if (m_isPlaying) > > + m_localUnit->start(); > > Ditto
OK, will add a comment.
youenn fablet
Comment 9
2021-12-01 05:45:33 PST
Created
attachment 445565
[details]
Patch
EWS
Comment 10
2021-12-08 03:07:10 PST
Committed
r286650
(
244963@main
): <
https://commits.webkit.org/244963@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 445565
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug