RealtimeOutgoingAudioSource should not push more audio data if the WebRTC thread...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jul 2017 00:25:38 +0000 (00:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Jul 2017 00:25:38 +0000 (00:25 +0000)
commit736e6996b69711d8ca1c4664a57709c3ccf20350
tree2e5548c2fad8a7c436f44f764769b4cb16eb7a0e
parent3052a8e7ef50669d1e59a069fa444975ae9235f1
RealtimeOutgoingAudioSource should not push more audio data if the WebRTC thread is not able to process it
https://bugs.webkit.org/show_bug.cgi?id=174383

Patch by Youenn Fablet <youenn@apple.com> on 2017-07-11
Reviewed by Eric Carlson.

This patch adds support to check for pending-processing audio data.
If the amount of audio data is bigger than a high water mark of 0.5 seconds,
we stop pushing new audio data until buffered audio data is lower than a low water mark of 0.1 seconds.
Patch is tested by adding breakpoints to trigger the high water mark, verifying that low water mark is triggered
and receiving audio is fine on the other connection endpoint.

* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::isReachingBufferedAudioDataHighLimit):
(WebCore::RealtimeOutgoingAudioSource::isReachingBufferedAudioDataLowLimit):
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h