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

Unified Diff: media/base/pipeline_impl.h

Issue 2085012: Reporting a more accurate buffered time for the video tag (Closed)
Patch Set: Added checks to fix some edgecase bugs. Created 10 years, 6 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
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/pipeline_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl.h
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index 27ce43f6756de15b686be6d96b2ebbc043555c95..61f360bd221aa9c0ba7075c5eb9a40b62548d82a 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -79,7 +79,7 @@ class PipelineImpl : public Pipeline, public FilterHost {
virtual float GetVolume() const;
virtual void SetVolume(float volume);
virtual base::TimeDelta GetCurrentTime() const;
- virtual base::TimeDelta GetBufferedTime() const;
+ virtual base::TimeDelta GetBufferedTime();
virtual base::TimeDelta GetMediaDuration() const;
virtual int64 GetBufferedBytes() const;
virtual int64 GetTotalBytes() const;
@@ -153,6 +153,8 @@ class PipelineImpl : public Pipeline, public FilterHost {
virtual void SetNetworkActivity(bool network_activity);
virtual void NotifyEnded();
virtual void DisableAudioRenderer();
+ virtual void SetCurrentReadPosition(int64 offset);
+ virtual int64 GetCurrentReadPosition();
// Method called during initialization to insert a mime type into the
// |rendered_mime_types_| set.
@@ -357,6 +359,15 @@ class PipelineImpl : public Pipeline, public FilterHost {
// replies.
base::TimeDelta seek_timestamp_;
+ // For GetCurrentBytes()/SetCurrentBytes() we need to know what byte we are
+ // currently reading.
+ int64 current_bytes_;
+
+ // Keep track of the maximum buffered position so the buffering appears
+ // smooth.
+ // TODO(vrk): This is a hack.
+ double max_buffered_time_;
+
// Filter factory as passed in by Start().
scoped_refptr<FilterFactory> filter_factory_;
« no previous file with comments | « media/base/pipeline.h ('k') | media/base/pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698