Chromium Code Reviews| Index: webkit/glue/media/buffered_data_source.h |
| diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h |
| index 5ab30358d0000481d4c09ae550904ec6478bb6ef..9f637b931545af7b0a2990c2b9450bcf59e716ba 100644 |
| --- a/webkit/glue/media/buffered_data_source.h |
| +++ b/webkit/glue/media/buffered_data_source.h |
| @@ -11,6 +11,7 @@ |
| #include "base/scoped_ptr.h" |
| #include "base/synchronization/lock.h" |
| #include "media/base/filter_factories.h" |
| +#include "media/base/filters.h" |
| #include "webkit/glue/media/buffered_resource_loader.h" |
| namespace webkit_glue { |
| @@ -33,6 +34,10 @@ class BufferedDataSource : public WebDataSource { |
| virtual void Stop(media::FilterCallback* callback); |
| virtual void SetPlaybackRate(float playback_rate); |
| + // Decides which DeferStrategy to used based on the current state of the |
| + // BufferedDataSource. |
| + BufferedResourceLoader::DeferStrategy ChooseDeferStrategy(); |
|
acolwell GONE FROM CHROMIUM
2011/03/25 23:08:14
Move to private:
vrk (LEFT CHROMIUM)
2011/03/29 00:53:00
Done.
|
| + |
| // media::DataSource implementation. |
| // Called from demuxer thread. |
| virtual void Read(int64 position, size_t size, |
| @@ -40,6 +45,7 @@ class BufferedDataSource : public WebDataSource { |
| media::DataSource::ReadCallback* read_callback); |
| virtual bool GetSize(int64* size_out); |
| virtual bool IsStreaming(); |
| + virtual void SetPreload(media::Preload preload); |
| const media::MediaFormat& media_format() { |
| return media_format_; |
| @@ -89,6 +95,7 @@ class BufferedDataSource : public WebDataSource { |
| // to determine whether we are going from pause to play and play to pause, |
| // and signals the buffered resource loader accordingly. |
| void SetPlaybackRateTask(float playback_rate); |
| + void SetPreloadTask(media::Preload preload); |
| // The method that performs actual read. This method can only be executed on |
| // the render thread. |
| @@ -196,6 +203,14 @@ class BufferedDataSource : public WebDataSource { |
| // are in a playing state. |
| bool media_is_paused_; |
| + // This variable is true when the user has requested the video to play at |
| + // least once. |
| + bool media_has_played_; |
| + |
| + // This variable holds the value of the preload attribute for the video |
| + // element. |
| + media::Preload preload_; |
| + |
| // This timer is to run the WatchDogTask repeatedly. We use a timer instead |
| // of doing PostDelayedTask() reduce the extra reference held by the message |
| // loop. The RepeatingTimer does PostDelayedTask() internally, by using it |