summaryrefslogtreecommitdiffstats
path: root/media/base/pipeline_impl.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 20:36:37 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 20:36:37 +0000
commit46564213965397d01fb87975f3bddd597985fcbf (patch)
tree346f9cf4005fcb9865196622f13462065f52a83f /media/base/pipeline_impl.h
parentc2972193bd0d0c2354d0862444b7ce4662d52d77 (diff)
downloadchromium_src-46564213965397d01fb87975f3bddd597985fcbf.zip
chromium_src-46564213965397d01fb87975f3bddd597985fcbf.tar.gz
chromium_src-46564213965397d01fb87975f3bddd597985fcbf.tar.bz2
Implemented a proper clock for audio/video synchronization.
More or less a change to pull out time management from PipelineImpl into a new class ClockImpl. Biggest difference is ClockImpl will use the system clock + linear interpolation to provide a more "precise" representation of the current playback position. BUG=16508 TEST=a/v sync should remain the same, currentTime should report more precise values Review URL: http://codereview.chromium.org/159517 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/pipeline_impl.h')
-rw-r--r--media/base/pipeline_impl.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index be3ad28..5c84e26 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -16,6 +16,7 @@
#include "base/ref_counted.h"
#include "base/thread.h"
#include "base/time.h"
+#include "media/base/clock_impl.h"
#include "media/base/filter_host.h"
#include "media/base/pipeline.h"
@@ -282,8 +283,10 @@ class PipelineImpl : public Pipeline, public FilterHost {
// the filters.
float playback_rate_;
- // Current playback time. Set by filters.
- base::TimeDelta time_;
+ // Reference clock. Keeps track of current playback time. Uses system
+ // clock and linear interpolation, but can have its time manually set
+ // by filters.
+ ClockImpl clock_;
// Status of the pipeline. Initialized to PIPELINE_OK which indicates that
// the pipeline is operating correctly. Any other value indicates that the