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

Unified Diff: media/base/filters.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 | « no previous file | media/base/mock_filters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/filters.h
diff --git a/media/base/filters.h b/media/base/filters.h
index ebe46e5981e9db9685ea565a37e88dd94df2f2da..7d56114ab1af793461215cbbda90dfb1e3cf5abf 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -45,6 +45,19 @@ class FilterHost;
struct PipelineStatistics;
+// Used to specify video preload states. They are "hints" to the browser about
+// how aggressively the browser should load and buffer data.
+// Please see the HTML5 spec for the descriptions of these values:
+// http://www.w3.org/TR/html5/video.html#attr-media-preload
+//
+// Enum values must match the values in WebCore::MediaPlayer::Preload and
+// there will be assertions at compile time if they do not match.
+enum Preload {
+ NONE,
+ METADATA,
+ AUTO,
+};
+
// Used for completing asynchronous methods.
typedef Callback0::Type FilterCallback;
@@ -129,6 +142,9 @@ class DataSource : public Filter {
// Returns true if we are performing streaming. In this case seeking is
// not possible.
virtual bool IsStreaming() = 0;
+
+ // Alert the DataSource that the video preload value has been changed.
+ virtual void SetPreload(Preload preload) = 0;
};
class DemuxerStream : public base::RefCountedThreadSafe<DemuxerStream> {
@@ -166,6 +182,9 @@ class Demuxer : public Filter {
public:
// Returns the given stream type, or NULL if that type is not present.
virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type) = 0;
+
+ // Alert the Demuxer that the video preload value has been changed.
+ virtual void SetPreload(Preload preload) = 0;
};
« no previous file with comments | « no previous file | media/base/mock_filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698