| Index: content/renderer/media/buffered_data_source.h
|
| diff --git a/content/renderer/media/buffered_data_source.h b/content/renderer/media/buffered_data_source.h
|
| index 40e549d900f7cb0688c280c797c6446890ab7358..77b62788f1b7878857b4e9babf223e47adf939d5 100644
|
| --- a/content/renderer/media/buffered_data_source.h
|
| +++ b/content/renderer/media/buffered_data_source.h
|
| @@ -36,11 +36,14 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource {
|
| public:
|
| typedef base::Callback<void(bool)> DownloadingCB;
|
|
|
| - // |downloading_cb| will be called whenever the downloading/paused state of
|
| - // the source changes.
|
| + // Buffered byte range changes will be reported to |host|. |downloading_cb|
|
| + // will be called whenever the downloading/paused state of the source changes.
|
| + // TODO(sandersd): Move media::DataSourceHost to
|
| + // content::BufferedDataSourceHost.
|
| BufferedDataSource(const scoped_refptr<base::MessageLoopProxy>& render_loop,
|
| blink::WebFrame* frame,
|
| media::MediaLog* media_log,
|
| + media::DataSourceHost* host,
|
| const DownloadingCB& downloading_cb);
|
| virtual ~BufferedDataSource();
|
|
|
| @@ -81,7 +84,6 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource {
|
|
|
| // media::DataSource implementation.
|
| // Called from demuxer thread.
|
| - virtual void set_host(media::DataSourceHost* host) OVERRIDE;
|
| virtual void Stop(const base::Closure& closure) OVERRIDE;
|
|
|
| virtual void Read(int64 position, int size, uint8* data,
|
| @@ -129,12 +131,6 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource {
|
| void LoadingStateChangedCallback(BufferedResourceLoader::LoadingState state);
|
| void ProgressCallback(int64 position);
|
|
|
| - // Report a buffered byte range [start,end] or queue it for later
|
| - // reporting if set_host() hasn't been called yet.
|
| - void ReportOrQueueBufferedBytes(int64 start, int64 end);
|
| -
|
| - void UpdateHostState_Locked();
|
| -
|
| // Update |loader_|'s deferring strategy in response to a play/pause, or
|
| // change in playback rate.
|
| void UpdateDeferStrategy(bool paused);
|
| @@ -207,11 +203,11 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource {
|
| // Current playback rate.
|
| float playback_rate_;
|
|
|
| - // Buffered byte ranges awaiting set_host() being called to report to host().
|
| - media::Ranges<int64> queued_buffered_byte_ranges_;
|
| -
|
| scoped_refptr<media::MediaLog> media_log_;
|
|
|
| + // Host object to report buffered byte range changes to.
|
| + media::DataSourceHost* host_;
|
| +
|
| DownloadingCB downloading_cb_;
|
|
|
| // NOTE: Weak pointers must be invalidated before all other member variables.
|
|
|