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

Unified Diff: media/audio/simple_sources.h

Issue 2140001: Removed PushSource::Packet. SeekableBuffer.current_time() fixed to return (Closed)
Patch Set: - Created 10 years, 7 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/simple_sources.cc » ('j') | media/audio/simple_sources.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/simple_sources.h
diff --git a/media/audio/simple_sources.h b/media/audio/simple_sources.h
index 9d8c5faeefa4f4b5bbe8e78ea89a19722abb8f88..0ab457b93d82f6e4166a9d3b8bb35727b991d835 100644
--- a/media/audio/simple_sources.h
+++ b/media/audio/simple_sources.h
@@ -9,6 +9,7 @@
#include "base/lock.h"
#include "media/audio/audio_output.h"
+#include "media/base/seekable_buffer.h"
// An audio source that produces a pure sinusoidal tone.
class SineWaveAudioSource : public AudioOutputStream::AudioSourceCallback {
@@ -77,21 +78,12 @@ class PushSource : public AudioOutputStream::AudioSourceCallback,
void ClearAll();
private:
- // Defines the unit of playback. We own the memory pointed by |buffer|.
- struct Packet {
- char* buffer;
- uint32 size;
- };
-
// Free acquired resources.
void CleanUp();
- typedef std::list<Packet> PacketList;
- PacketList packets_;
- uint32 buffered_bytes_;
- uint32 front_buffer_consumed_;
- // Serialize access to packets_ and buffered_bytes_ using this lock.
- Lock lock_;
+ media::SeekableBuffer buffer_;
+ // Serialize access to |buffer_| using this lock.
+ Lock buffer_lock_;
};
#endif // MEDIA_AUDIO_SIMPLE_SOURCES_H_
« no previous file with comments | « no previous file | media/audio/simple_sources.cc » ('j') | media/audio/simple_sources.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698