WebKit Bugzilla
Attachment 361227 Details for
Bug 194310
: CoreAudioCaptureSource should not configure its audio unit until it starts producing data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194310-20190205152638.patch (text/plain), 3.14 KB, created by
youenn fablet
on 2019-02-05 15:26:42 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-02-05 15:26:42 PST
Size:
3.14 KB
patch
obsolete
>Subversion Revision: 240959 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a64c05f6dbbce624f7c6b325b8b435720fe30c00..ab530b19612f8981416d81fa273f189713737ae3 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-02-05 Youenn Fablet <youenn@apple.com> >+ >+ CoreAudioCaptureSource should not configure its audio unit until it starts producing data >+ https://bugs.webkit.org/show_bug.cgi?id=194310 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Delay the configuration of the audio unit until the source is instructed to start producing data. >+ This allows the UIProcess to not start changing the audio unit when >+ checking for constraints during getUserMedia call before the prompt. >+ Covered by manual testing. >+ >+ * platform/mediastream/mac/CoreAudioCaptureSource.cpp: >+ (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): >+ (WebCore::CoreAudioCaptureSource::initializeToStartProducingData): >+ (WebCore::CoreAudioCaptureSource::startProducingData): >+ * platform/mediastream/mac/CoreAudioCaptureSource.h: >+ > 2019-02-05 Youenn Fablet <youenn@apple.com> > > Disable audio ducking at Audio Unit setup time >diff --git a/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp b/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp >index d985dcb5c1de450677658b837437a3dc4c527576..146bbb8b77c36575b54b4f1843f99c5827656f59 100644 >--- a/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp >+++ b/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp >@@ -830,6 +830,15 @@ CoreAudioCaptureSource::CoreAudioCaptureSource(String&& deviceID, String&& label > : RealtimeMediaSource(RealtimeMediaSource::Type::Audio, WTFMove(label), WTFMove(deviceID), WTFMove(hashSalt)) > , m_captureDeviceID(captureDeviceID) > { >+} >+ >+void CoreAudioCaptureSource::initializeToStartProducingData() >+{ >+ if (m_isReadyToStart) >+ return; >+ >+ m_isReadyToStart = true; >+ > auto& unit = CoreAudioSharedUnit::singleton(); > unit.setCaptureDevice(String { persistentID() }, m_captureDeviceID); > >@@ -878,6 +887,7 @@ void CoreAudioCaptureSource::startProducingData() > return; > } > >+ initializeToStartProducingData(); > unit.startProducingData(); > } > >diff --git a/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h b/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h >index f5203731ccd01e46b275876505e6543ec3eb32e8..56442721bd5afb3f5675b4fcfdb783874e641437 100644 >--- a/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h >+++ b/Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h >@@ -93,6 +93,8 @@ private: > > bool interrupted() const final; > >+ void initializeToStartProducingData(); >+ > uint32_t m_captureDeviceID { 0 }; > > Optional<RealtimeMediaSourceCapabilities> m_capabilities; >@@ -107,6 +109,7 @@ private: > bool m_reconfigurationRequired { false }; > bool m_suspendPending { false }; > bool m_resumePending { false }; >+ bool m_isReadyToStart { false }; > }; > > class CoreAudioCaptureSourceFactory : public AudioCaptureFactory {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194310
: 361227