Bug 225785 - Clean up UserMediaCaptureManagerProxy.cpp
Summary: Clean up UserMediaCaptureManagerProxy.cpp
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-05-13 16:08 PDT by Peng Liu
Modified: 2021-05-20 16:09 PDT (History)
10 users (show)

See Also:


Attachments
Patch (11.22 KB, patch)
2021-05-17 08:05 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (16.61 KB, patch)
2021-05-18 01:13 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2021-05-13 16:08:19 PDT
In UserMediaCaptureManagerProxy.cpp

void audioUnitWillStart() final
{
    // FIXME: WebProcess might want to set the category/bufferSize itself, in which case we should remove that code.
    auto bufferSize = AudioSession::sharedSession().sampleRate() / 50;
    if (AudioSession::sharedSession().preferredBufferSize() > bufferSize)
        AudioSession::sharedSession().setPreferredBufferSize(bufferSize);
    AudioSession::sharedSession().setCategory(AudioSession::PlayAndRecord, RouteSharingPolicy::Default);
}

Probably we need to remove this code section now?
Comment 1 Peng Liu 2021-05-13 16:09:15 PDT
Assign to Youenn to take a look. :-)
Comment 2 youenn fablet 2021-05-17 08:05:28 PDT
Created attachment 428828 [details]
Patch
Comment 3 youenn fablet 2021-05-18 01:13:32 PDT
Created attachment 428918 [details]
Patch
Comment 4 youenn fablet 2021-05-18 01:56:08 PDT
Hum, in case of GPUProcess crash, we would need to ensure the audio session category is set before restarting audio capture.
There is no such guarantee right now.
Comment 5 Radar WebKit Bug Importer 2021-05-20 16:09:20 PDT
<rdar://problem/78282244>