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

Unified Diff: media/base/filters.h

Issue 9155003: Fix media timeline so that thumb never exceeds buffered data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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
Index: media/base/filters.h
diff --git a/media/base/filters.h b/media/base/filters.h
index 8f186d676ad8608e1cc66f4f5029c469c5e0bd5e..c5a12982c9605a3703894bca5bd889b68d9b1b26 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -200,10 +200,15 @@ class MEDIA_EXPORT AudioDecoder : public Filter {
class MEDIA_EXPORT VideoRenderer : public Filter {
public:
+ // Used to update the pipeline's clock time. The parameter is the time that
+ // the clock should not exceed.
+ typedef base::Callback<void(base::TimeDelta)> VideoTimeCB;
+
// Initialize a VideoRenderer with the given VideoDecoder, executing the
- // callback upon completion.
- virtual void Initialize(VideoDecoder* decoder, const base::Closure& callback,
- const StatisticsCallback& stats_callback) = 0;
+ // |init_cb| upon completion.
+ virtual void Initialize(VideoDecoder* decoder, const base::Closure& init_cb,
+ const StatisticsCallback& stats_callback,
+ const VideoTimeCB& time_cb) = 0;
// Returns true if this filter has received and processed an end-of-stream
// buffer.
@@ -213,6 +218,11 @@ class MEDIA_EXPORT VideoRenderer : public Filter {
class MEDIA_EXPORT AudioRenderer : public Filter {
public:
+ // Used to update the pipeline's clock time. The first parameter is the
+ // current time, and the second parameter is the time that the clock must not
+ // exceed.
+ typedef base::Callback<void(base::TimeDelta, base::TimeDelta)> AudioTimeCB;
+
// Initialize a AudioRenderer with the given AudioDecoder, executing the
// |init_callback| upon completion. |underflow_callback| is called when the
// renderer runs out of data to pass to the audio card during playback.
@@ -221,7 +231,8 @@ class MEDIA_EXPORT AudioRenderer : public Filter {
// condition.
virtual void Initialize(AudioDecoder* decoder,
const base::Closure& init_callback,
- const base::Closure& underflow_callback) = 0;
+ const base::Closure& underflow_callback,
+ const AudioTimeCB& time_cb) = 0;
// Returns true if this filter has received and processed an end-of-stream
// buffer.

Powered by Google App Engine
This is Rietveld 408576698