WebKit Bugzilla
Attachment 340185 Details for
Bug 185545
: Add release logging for incoming and outgoing webrtc audio tracks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185545-20180511131039.patch (text/plain), 4.91 KB, created by
youenn fablet
on 2018-05-11 04:10:40 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-05-11 04:10:40 PDT
Size:
4.91 KB
patch
obsolete
>Subversion Revision: 231552 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2895887912decc6116a1d78fa067b82cf30ec095..98c8db0392a900528fc9a0591fe591d41079fa22 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-11 Youenn Fablet <youenn@apple.com> >+ >+ Add release logging for incoming and outgoing webrtc audio tracks >+ https://bugs.webkit.org/show_bug.cgi?id=185545 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add logging of audio tracks. When doing a WebRTC call, >+ one log line is added each second for each audio track. >+ Validated that logging is done through manual testing. >+ >+ * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp: >+ (WebCore::RealtimeIncomingAudioSourceCocoa::OnData): >+ * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: >+ * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp: >+ (WebCore::RealtimeOutgoingAudioSourceCocoa::pullAudioData): >+ * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h: >+ > 2018-05-11 Youenn Fablet <youenn@apple.com> > > imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html is crashing on debug builds >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp b/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp >index 119c9403dca1ea1de3a9190b3beb93307f192e89..fbc76c551ed5d3fadcef2619f3dc431a864a1dc2 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp >@@ -33,6 +33,7 @@ > #include "AudioStreamDescription.h" > #include "CAAudioStreamDescription.h" > #include "LibWebRTCAudioFormat.h" >+#include "Logging.h" > #include "WebAudioBufferList.h" > #include "WebAudioSourceProviderAVFObjC.h" > #include <pal/avfoundation/MediaTimeAVFoundation.h> >@@ -73,6 +74,11 @@ void RealtimeIncomingAudioSourceCocoa::OnData(const void* audioData, int bitsPer > if (sampleRate == 16000 && numberOfChannels == 1) > return; > >+#if !RELEASE_LOG_DISABLED >+ if (!(++m_chunksReceived % 100)) >+ RELEASE_LOG(MediaStream, "RealtimeIncomingAudioSourceCocoa::OnData %zu chunk", m_chunksReceived); >+#endif >+ > ASSERT(bitsPerSample == 16); > ASSERT(numberOfChannels == 1 || numberOfChannels == 2); > ASSERT(sampleRate == 48000); >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h b/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h >index d010475e5eca2ffc914303471b65fb1a897daba7..a7b38517a48a7ee217a2ec457bbdaf91c509bcca 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h >@@ -50,6 +50,7 @@ private: > void OnData(const void* audioData, int bitsPerSample, int sampleRate, size_t numberOfChannels, size_t numberOfFrames) final; > > uint64_t m_numberOfFrames { 0 }; >+ size_t m_chunksReceived { 0 }; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp >index cc6c775d7e818d068e74d21332962654fa5d34ff..65ee68a9115f29b4d701b012e4bf68e6ebcdeb15 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp >@@ -31,6 +31,7 @@ > #include "CAAudioStreamDescription.h" > #include "LibWebRTCAudioFormat.h" > #include "LibWebRTCProvider.h" >+#include "Logging.h" > > namespace WebCore { > >@@ -155,6 +156,11 @@ void RealtimeOutgoingAudioSourceCocoa::pullAudioData() > > m_sampleConverter->pullAvalaibleSamplesAsChunks(bufferList, chunkSampleCount, m_readCount, [this, chunkSampleCount] { > m_readCount += chunkSampleCount; >+#if !RELEASE_LOG_DISABLED >+ if (!(++m_chunksSent % 100)) >+ RELEASE_LOG(MediaStream, "RealtimeOutgoingAudioSourceCocoa::pullAudioData %zu chunk", m_chunksSent); >+#endif >+ > for (auto sink : m_sinks) > sink->OnData(m_audioBuffer.data(), LibWebRTCAudioFormat::sampleSize, m_outputStreamDescription.sampleRate(), m_outputStreamDescription.numberOfChannels(), chunkSampleCount); > }); >diff --git a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h >index 76fa5ad002a08dd33190473bee22edf6322247e9..12655261cb1023358cb8e35bbb04922fe507b51f 100644 >--- a/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h >+++ b/Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h >@@ -63,6 +63,7 @@ private: > uint64_t m_readCount { 0 }; > uint64_t m_writeCount { 0 }; > bool m_skippingAudioData { false }; >+ size_t m_chunksSent { 0 }; > }; > > } // namespace WebCore
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 185545
:
340185
|
340186
|
359311
|
359312
|
359374