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

Unified Diff: media/filters/audio_renderer_algorithm.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: 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
Index: media/filters/audio_renderer_algorithm.cc
diff --git a/media/filters/audio_renderer_algorithm.cc b/media/filters/audio_renderer_algorithm.cc
index a3701245a308e688c098975ab46a9cf893016926..6d2e5f9ba6b262331b83ea0597dde06a5a047594 100644
--- a/media/filters/audio_renderer_algorithm.cc
+++ b/media/filters/audio_renderer_algorithm.cc
@@ -223,6 +223,10 @@ void AudioRendererAlgorithm::IncreaseQueueCapacity() {
capacity_ = std::min(2 * capacity_, max_capacity);
}
+int64_t AudioRendererAlgorithm::GetMemoryUsage() const {
+ return audio_buffer_.frames() * channels_ * sizeof(float);
+}
+
bool AudioRendererAlgorithm::CanPerformWsola() const {
const int search_block_size = num_candidate_blocks_ + (ola_window_size_ - 1);
const int frames = audio_buffer_.frames();

Powered by Google App Engine
This is Rietveld 408576698