diff options
author | kylep@chromium.org <kylep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 00:56:01 +0000 |
---|---|---|
committer | kylep@chromium.org <kylep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 00:56:01 +0000 |
commit | 27d4a38d7a4f692b18a8ea3bec0660804f2b96ea (patch) | |
tree | 759a3de26926afaef06fa514d899fc1460dcc5f0 /media/base/buffer_queue.h | |
parent | efc4e843e0889aaddb65989f6695e313d46e6f83 (diff) | |
download | chromium_src-27d4a38d7a4f692b18a8ea3bec0660804f2b96ea.zip chromium_src-27d4a38d7a4f692b18a8ea3bec0660804f2b96ea.tar.gz chromium_src-27d4a38d7a4f692b18a8ea3bec0660804f2b96ea.tar.bz2 |
Replace the guts of AudioRendererBase with calls to scaling algorithm.
BUG=16011
TEST=audio_renderer_base_unittest.cc and buffer_queue_unittest.cc
Review URL: http://codereview.chromium.org/155695
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/buffer_queue.h')
-rw-r--r-- | media/base/buffer_queue.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/media/base/buffer_queue.h b/media/base/buffer_queue.h index 39e1976..e6018c9 100644 --- a/media/base/buffer_queue.h +++ b/media/base/buffer_queue.h @@ -39,9 +39,8 @@ class BufferQueue { // Enqueues |buffer_in| and adds a reference. void Enqueue(Buffer* buffer_in); - // Returns the timestamp of the first buffer plus |data_offset_| in - // microseconds, calculated using the conversion |bytes_to_sec|. - base::TimeDelta GetTime(double bytes_to_sec); + // Returns the current timestamp, taking into account |data_offset_|. + base::TimeDelta GetTime(); // Returns true if the |queue_| is empty. bool IsEmpty(); @@ -59,6 +58,10 @@ class BufferQueue { // Keeps track of the |queue_| size in bytes. size_t size_in_bytes_; + // Keeps track of the most recent time we've seen in case the |queue_| is + // empty when our owner asks what time it is. + base::TimeDelta most_recent_time_; + DISALLOW_COPY_AND_ASSIGN(BufferQueue); }; |