Title: [276950] trunk/Source/WebCore
- Revision
- 276950
- Author
- commit-qu...@webkit.org
- Date
- 2021-05-04 00:42:47 -0700 (Tue, 04 May 2021)
Log Message
[GStreamer][Debug] Allow fastMallocs in audio threads
https://bugs.webkit.org/show_bug.cgi?id=225306
Patch by Philippe Normand <pnorm...@igalia.com> on 2021-05-04
Reviewed by Adrian Perez de Castro.
For the time being the GStreamer ports need to allocate audio buffers for WebRTC. This
deserves deeper investigation to avoid the allocations but for now the bots need to be fixed
ASAP.
* platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp:
(WebCore::RealtimeIncomingAudioSourceLibWebRTC::OnData):
* platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
(WebCore::LibWebRTCAudioModule::pollAudioData):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (276949 => 276950)
--- trunk/Source/WebCore/ChangeLog 2021-05-04 06:34:16 UTC (rev 276949)
+++ trunk/Source/WebCore/ChangeLog 2021-05-04 07:42:47 UTC (rev 276950)
@@ -1,3 +1,19 @@
+2021-05-04 Philippe Normand <pnorm...@igalia.com>
+
+ [GStreamer][Debug] Allow fastMallocs in audio threads
+ https://bugs.webkit.org/show_bug.cgi?id=225306
+
+ Reviewed by Adrian Perez de Castro.
+
+ For the time being the GStreamer ports need to allocate audio buffers for WebRTC. This
+ deserves deeper investigation to avoid the allocations but for now the bots need to be fixed
+ ASAP.
+
+ * platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp:
+ (WebCore::RealtimeIncomingAudioSourceLibWebRTC::OnData):
+ * platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
+ (WebCore::LibWebRTCAudioModule::pollAudioData):
+
2021-05-03 Frédéric Wang <fw...@igalia.com>
ASSERTION FAILED: !m_needExceptionCheck while converting IDLSequence<T>
Modified: trunk/Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp (276949 => 276950)
--- trunk/Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp 2021-05-04 06:34:16 UTC (rev 276949)
+++ trunk/Source/WebCore/platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp 2021-05-04 07:42:47 UTC (rev 276950)
@@ -64,6 +64,9 @@
gst_audio_info_set_format(&info, format, sampleRate, numberOfChannels, NULL);
+ // FIXME: We could likely avoid allocation here, when muted -> memset(0...) and maybe wrap the
+ // audioData in a GstBuffer?
+ DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions;
auto bufferSize = GST_AUDIO_INFO_BPF(&info) * numberOfFrames;
gpointer bufferData = fastMalloc(bufferSize);
if (muted())
Modified: trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp (276949 => 276950)
--- trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp 2021-05-04 06:34:16 UTC (rev 276949)
+++ trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp 2021-05-04 07:42:47 UTC (rev 276950)
@@ -110,11 +110,12 @@
pollAudioData();
};
- // For performance reasons, we forbid heap allocations while doing rendering on the webrtc audio thread.
- ForbidMallocUseForCurrentThreadScope forbidMallocUse;
+ {
+ // For performance reasons, we forbid heap allocations while doing rendering on the webrtc audio thread.
+ ForbidMallocUseForCurrentThreadScope forbidMallocUse;
- pollFromSource();
-
+ pollFromSource();
+ }
m_queue->dispatchAfter(computeDelayUntilNextPolling(), WTFMove(nextPollFunction));
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes