OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_ |
| 7 |
| 8 #include "content/common/content_export.h" |
| 9 #include "content/renderer/media/buffered_data_source.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class CONTENT_EXPORT BufferedDataSourceHostImpl |
| 14 : public BufferedDataSourceHost { |
| 15 public: |
| 16 BufferedDataSourceHostImpl(media::Pipeline pipeline); |
| 17 ~BufferedDataSourceHostImpl() {}; |
| 18 |
| 19 // BufferedDataSourceHost implementation. |
| 20 virtual void SetTotalBytes(int64 total_bytes) OVERRIDE; |
| 21 virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE; |
| 22 |
| 23 // Combined time ranges from the BufferedDataSource and the demuxer. |
| 24 const blink::WebTimeRanges& BufferedTimeRanges(); |
| 25 |
| 26 // Combined loading progress. |
| 27 // TODO(sandersd): Change this to non-const along with WMPI's version. |
| 28 // http://crbug.com/360251 |
| 29 bool DidLoadingProgress() const; |
| 30 |
| 31 private: |
| 32 // TODO(sandersd): Remove this cache. http://crbug.com/360254 |
| 33 blink::WebTimeRanges buffered_; |
| 34 |
| 35 // Total size of the data source. |
| 36 int64 total_bytes_; |
| 37 |
| 38 // List of buffered byte ranges for estimating buffered time. |
| 39 media::Ranges<int64> buffered_byte_ranges_; |
| 40 |
| 41 // True when AddBufferedByteRange() has been called more recently than |
| 42 // didLoadingProgress(). |
| 43 mutable bool did_loading_progress_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceHostImpl); |
| 46 }; |
| 47 |
| 48 } // namespace content |
| 49 |
| 50 #endif // CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_ |
OLD | NEW |