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

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: Fixes based on code review 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/pipeline.h » ('j') | webkit/glue/webmediaplayer_impl.cc » ('J')
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 d6b962d64bb4775857662f3bbb62059ba10326a2..67a246bad3b30298e86f41cbb3b139d3c00b6ac6 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -43,6 +43,18 @@ 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.
+enum Preload {
+ PRELOAD_NONE,
acolwell GONE FROM CHROMIUM 2011/03/29 05:52:03 nit: How about dropping the PRELOAD_ prefix now th
vrk (LEFT CHROMIUM) 2011/03/30 17:41:44 Done.
+ PRELOAD_METADATA,
+ PRELOAD_AUTO,
+};
+
// Used for completing asynchronous methods.
typedef Callback0::Type FilterCallback;
@@ -127,6 +139,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> {
@@ -180,6 +195,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/pipeline.h » ('j') | webkit/glue/webmediaplayer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698