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; |
}; |