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

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

Issue 617093003: Add MediaStreamSource frame rate calculation to the tracker. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding type name. Fixing IPC type problem. Created 6 years, 3 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/webrtc_internals.cc
diff --git a/content/browser/media/webrtc_internals.cc b/content/browser/media/webrtc_internals.cc
index d8a0314466c3930839e820a09045db574754536c..48a46393ea99d8f71d1a86af5a1caf1df4156cb3 100644
--- a/content/browser/media/webrtc_internals.cc
+++ b/content/browser/media/webrtc_internals.cc
@@ -205,6 +205,22 @@ void WebRTCInternals::OnGetUserMedia(int rid,
SendUpdate("addGetUserMedia", dict);
}
+void WebRTCInternals::OnAddVideoStats(base::ProcessId pid,
+ const std::string& video_id,
+ float input_frame_rate,
+ int number_of_dropped_frames) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ base::DictionaryValue* dict = new base::DictionaryValue();
+ dict->SetInteger("pid", static_cast<int>(pid));
+ dict->SetString("video_id", video_id);
+ dict->SetDouble("input_frame_rate", input_frame_rate);
+ dict->SetInteger("number_of_dropped_frames", number_of_dropped_frames);
+
+ if (observers_.might_have_observers())
+ SendUpdate("addVideoStats", dict);
+}
+
void WebRTCInternals::AddObserver(WebRTCInternalsUIObserver *observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
observers_.AddObserver(observer);
« no previous file with comments | « content/browser/media/webrtc_internals.h ('k') | content/browser/renderer_host/media/peer_connection_tracker_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698