| Index: content/renderer/media/buffered_data_source_host_impl.h
|
| diff --git a/content/renderer/media/buffered_data_source_host_impl.h b/content/renderer/media/buffered_data_source_host_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9c95d8d9d94d87f88db7ed1773e863bec75761ed
|
| --- /dev/null
|
| +++ b/content/renderer/media/buffered_data_source_host_impl.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
|
| +#define CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
|
| +
|
| +#include "content/common/content_export.h"
|
| +#include "content/renderer/media/buffered_data_source.h"
|
| +
|
| +namespace content {
|
| +
|
| +class CONTENT_EXPORT BufferedDataSourceHostImpl
|
| + : public BufferedDataSourceHost {
|
| + public:
|
| + BufferedDataSourceHostImpl(media::Pipeline pipeline);
|
| + ~BufferedDataSourceHostImpl() {};
|
| +
|
| + // BufferedDataSourceHost implementation.
|
| + virtual void SetTotalBytes(int64 total_bytes) OVERRIDE;
|
| + virtual void AddBufferedByteRange(int64 start, int64 end) OVERRIDE;
|
| +
|
| + // Combined time ranges from the BufferedDataSource and the demuxer.
|
| + const blink::WebTimeRanges& BufferedTimeRanges();
|
| +
|
| + // Combined loading progress.
|
| + // TODO(sandersd): Change this to non-const along with WMPI's version.
|
| + // http://crbug.com/360251
|
| + bool DidLoadingProgress() const;
|
| +
|
| + private:
|
| + // TODO(sandersd): Remove this cache. http://crbug.com/360254
|
| + blink::WebTimeRanges buffered_;
|
| +
|
| + // Total size of the data source.
|
| + int64 total_bytes_;
|
| +
|
| + // List of buffered byte ranges for estimating buffered time.
|
| + media::Ranges<int64> buffered_byte_ranges_;
|
| +
|
| + // True when AddBufferedByteRange() has been called more recently than
|
| + // didLoadingProgress().
|
| + mutable bool did_loading_progress_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(BufferedDataSourceHostImpl);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
|
|
|