Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: content/browser/media/media_internals.cc

Issue 1864483002: Forward output glitch information from stream WebRTC log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finished up for review. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/media/media_internals.cc
diff --git a/content/browser/media/media_internals.cc b/content/browser/media/media_internals.cc
index 3813858b07f926e4f096c229638264cdc628c85a..e09c9363c481acb2db5278aa7eb62465612b2b26 100644
--- a/content/browser/media/media_internals.cc
+++ b/content/browser/media/media_internals.cc
@@ -13,6 +13,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
+#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
@@ -110,6 +111,9 @@ class AudioLogImpl : public media::AudioLog {
void OnSetVolume(int component_id, double volume) override;
void OnSwitchOutputDevice(int component_id,
const std::string& device_id) override;
+ void OnStatistics(int component_id,
+ const std::string& name,
+ int value) override;
// Called by MediaInternals to update the WebContents title for a stream.
void SendWebContentsTitle(int component_id,
@@ -206,6 +210,15 @@ void AudioLogImpl::OnSwitchOutputDevice(int component_id,
kAudioLogUpdateFunction, &dict);
}
+void AudioLogImpl::OnStatistics(int component_id,
+ const std::string& name,
+ int value) {
+ MediaStreamManager::SendMessageToNativeLog(
+ base::StringPrintf("%s: %d", name.c_str(), value));
+
+ // TODO(grunell): Show stats on media-internals page.
+}
+
void AudioLogImpl::SendWebContentsTitle(int component_id,
int render_process_id,
int render_frame_id) {

Powered by Google App Engine
This is Rietveld 408576698