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

Unified Diff: media/base/audio_buffer_converter.h

Issue 2788483003: Introduce AudioBufferMemoryPool to avoid thrashing on audio buffers. (Closed)
Patch Set: Add class comments. Created 3 years, 9 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/audio_buffer.cc ('k') | media/base/audio_buffer_converter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_buffer_converter.h
diff --git a/media/base/audio_buffer_converter.h b/media/base/audio_buffer_converter.h
index f29274812fb2f0893d40dbc5d85ccc9de82f6d15..d3f4b6b74ebd099239252187b411841d85668f6a 100644
--- a/media/base/audio_buffer_converter.h
+++ b/media/base/audio_buffer_converter.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
+#include "media/base/audio_buffer.h"
#include "media/base/audio_converter.h"
#include "media/base/audio_parameters.h"
#include "media/base/audio_timestamp_helper.h"
@@ -17,7 +18,6 @@
namespace media {
-class AudioBuffer;
class AudioBus;
// Takes AudioBuffers in any format and uses an AudioConverter to convert them
@@ -98,6 +98,9 @@ class MEDIA_EXPORT AudioBufferConverter : public AudioConverter::InputCallback {
// full AudioBuses in ProvideInput()?
bool is_flushing_;
+ // Pool to avoid thrashing memory when allocating AudioBuffers.
+ scoped_refptr<AudioBufferMemoryPool> pool_;
+
// The AudioConverter which does the real work here.
std::unique_ptr<AudioConverter> audio_converter_;
};
« no previous file with comments | « media/base/audio_buffer.cc ('k') | media/base/audio_buffer_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698