diff options
author | kylep@chromium.org <kylep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 20:39:05 +0000 |
---|---|---|
committer | kylep@chromium.org <kylep@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-13 20:39:05 +0000 |
commit | 3cead8b0c7980c23171a569ee10b2b9835e4b941 (patch) | |
tree | a48ff765f755bc9cd00514bbcdcde4f63079f6c3 /media/base/buffer_queue.h | |
parent | 2933580fcac85dbd0ad6eb5ccb5fe88fef40a128 (diff) | |
download | chromium_src-3cead8b0c7980c23171a569ee10b2b9835e4b941.zip chromium_src-3cead8b0c7980c23171a569ee10b2b9835e4b941.tar.gz chromium_src-3cead8b0c7980c23171a569ee10b2b9835e4b941.tar.bz2 |
Add methods to ARAB and BufferQueue to allow owners to query it for the timestamp of our next byte.
BUG=16011
TEST=src/media/base/buffer_queue_unittest.cc
Review URL: http://codereview.chromium.org/149494
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/buffer_queue.h')
-rw-r--r-- | media/base/buffer_queue.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/base/buffer_queue.h b/media/base/buffer_queue.h index 363b136..39e1976 100644 --- a/media/base/buffer_queue.h +++ b/media/base/buffer_queue.h @@ -14,6 +14,7 @@ #include <deque> #include "base/ref_counted.h" +#include "base/time.h" namespace media { @@ -38,6 +39,10 @@ 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 true if the |queue_| is empty. bool IsEmpty(); |