From 3cead8b0c7980c23171a569ee10b2b9835e4b941 Mon Sep 17 00:00:00 2001 From: "kylep@chromium.org" Date: Mon, 13 Jul 2009 20:39:05 +0000 Subject: 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 --- media/base/buffer_queue.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'media/base/buffer_queue.h') 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 #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(); -- cgit v1.1