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

Unified Diff: media/base/pipeline.cc

Issue 1409123005: Add methods for telling V8 how much memory audio/video is using. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix html viewer. Created 5 years, 2 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
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/pipeline_status.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 387470aec070dd242e5486419f9efb15d859a2fa..2527086b89ac07e7102907b8d3963efee1fc3c2c 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -466,12 +466,14 @@ void Pipeline::AddBufferedTimeRange(TimeDelta start, TimeDelta end) {
}
// Called from any thread.
-void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats) {
+void Pipeline::OnUpdateStatistics(const PipelineStatistics& stats_delta) {
base::AutoLock auto_lock(lock_);
- statistics_.audio_bytes_decoded += stats.audio_bytes_decoded;
- statistics_.video_bytes_decoded += stats.video_bytes_decoded;
- statistics_.video_frames_decoded += stats.video_frames_decoded;
- statistics_.video_frames_dropped += stats.video_frames_dropped;
+ statistics_.audio_bytes_decoded += stats_delta.audio_bytes_decoded;
+ statistics_.video_bytes_decoded += stats_delta.video_bytes_decoded;
+ statistics_.video_frames_decoded += stats_delta.video_frames_decoded;
+ statistics_.video_frames_dropped += stats_delta.video_frames_dropped;
+ statistics_.audio_memory_usage += stats_delta.audio_memory_usage;
+ statistics_.video_memory_usage += stats_delta.video_memory_usage;
}
void Pipeline::StartTask() {
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/pipeline_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698