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

Unified Diff: media/audio/audio_output_mixer.h

Issue 10154007: Change the way audio mixer gets "pending bytes" (amount of data currently buffered (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | media/audio/audio_output_mixer.cc » ('j') | media/audio/audio_output_mixer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_mixer.h
===================================================================
--- media/audio/audio_output_mixer.h (revision 133745)
+++ media/audio/audio_output_mixer.h (working copy)
@@ -10,6 +10,7 @@
#define MEDIA_AUDIO_AUDIO_OUTPUT_MIXER_H_
#include <map>
+#include <set>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -61,6 +62,14 @@
// audio manager thread is safe.
base::Lock lock_;
+ // Information for each each in-flight buffer.
+ struct BufferData {
+ explicit BufferData(int len) : length(len) { }
+ int length;
+ };
+ typedef std::map<void*, BufferData> BufferMap;
+ BufferMap buffer_data_;
+
// List of audio output proxies currently being played.
// For every proxy we store aux structure containing data necessary for
// mixing.
@@ -68,6 +77,9 @@
AudioOutputStream::AudioSourceCallback* audio_source_callback;
double volume;
int pending_bytes;
+ std::set<void*> buffers; // Used to catch when we stop prebuffering and
+ // start releasing buffers.
+ bool prebuffering;
};
typedef std::map<AudioOutputProxy*, ProxyData> ProxyMap;
ProxyMap proxies_;
« no previous file with comments | « no previous file | media/audio/audio_output_mixer.cc » ('j') | media/audio/audio_output_mixer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698