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

Unified Diff: media/base/pipeline_impl.h

Issue 6625059: Implementing preload=metadata for video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 9 years, 9 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 41fa234da423332733082743e179cfba45bb2a6d..5dcbcea366bb4b0e6d840256172d926fa3216750 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -114,6 +114,7 @@ class PipelineImpl : public Pipeline, public FilterHost {
virtual void SetPlaybackRate(float playback_rate);
virtual float GetVolume() const;
virtual void SetVolume(float volume);
+ virtual void SetPreload(Preload preload);
virtual base::TimeDelta GetCurrentTime() const;
virtual base::TimeDelta GetBufferedTime();
virtual base::TimeDelta GetMediaDuration() const;
@@ -240,6 +241,12 @@ class PipelineImpl : public Pipeline, public FilterHost {
// Carries out notifying filters that the volume has changed.
void VolumeChangedTask(float volume);
+ // Returns media preload value.
+ virtual Preload GetPreload() const;
+
+ // Carries out notifying filters that the preload value has changed.
+ void PreloadChangedTask(Preload preload);
+
// Carries out notifying filters that we are seeking to a new timestamp.
void SeekTask(base::TimeDelta time, PipelineStatusCallback* seek_callback);
@@ -355,6 +362,11 @@ class PipelineImpl : public Pipeline, public FilterHost {
// filters.
float volume_;
+ // Current value of preload attribute. This value is set immediately via
+ // SetPreload() and a task is dispatched on the message loop to notify the
+ // filters.
+ Preload preload_;
+
// Current playback rate (>= 0.0f). This value is set immediately via
// SetPlaybackRate() and a task is dispatched on the message loop to notify
// the filters.
@@ -423,6 +435,9 @@ class PipelineImpl : public Pipeline, public FilterHost {
scoped_refptr<AudioRenderer> audio_renderer_;
scoped_refptr<VideoRenderer> video_renderer_;
+ // Demuxer reference used for setting the preload value.
+ scoped_refptr<Demuxer> demuxer_;
+
// Helper class that stores filter references during pipeline
// initialization.
class PipelineInitState;
« 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