| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 5 #ifndef MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
| 6 #define MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 6 #define MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Cancels any open network connections once reaching the deferred state. If | 95 // Cancels any open network connections once reaching the deferred state. If |
| 96 // |always_cancel| is false this is done only for preload=metadata, non- | 96 // |always_cancel| is false this is done only for preload=metadata, non- |
| 97 // streaming resources that have not started playback. If |always_cancel| is | 97 // streaming resources that have not started playback. If |always_cancel| is |
| 98 // true, all resource types will have their connections canceled. If already | 98 // true, all resource types will have their connections canceled. If already |
| 99 // deferred, connections will be immediately closed. | 99 // deferred, connections will be immediately closed. |
| 100 void OnBufferingHaveEnough(bool always_cancel) override; | 100 void OnBufferingHaveEnough(bool always_cancel) override; |
| 101 | 101 |
| 102 int64_t GetMemoryUsage() const override; | 102 int64_t GetMemoryUsage() const override; |
| 103 | 103 |
| 104 GURL GetUrlAfterRedirects() const override; |
| 105 |
| 104 // DataSource implementation. | 106 // DataSource implementation. |
| 105 // Called from demuxer thread. | 107 // Called from demuxer thread. |
| 106 void Stop() override; | 108 void Stop() override; |
| 107 | 109 |
| 108 void Read(int64_t position, | 110 void Read(int64_t position, |
| 109 int size, | 111 int size, |
| 110 uint8_t* data, | 112 uint8_t* data, |
| 111 const DataSource::ReadCB& read_cb) override; | 113 const DataSource::ReadCB& read_cb) override; |
| 112 bool GetSize(int64_t* size_out) override; | 114 bool GetSize(int64_t* size_out) override; |
| 113 bool IsStreaming() override; | 115 bool IsStreaming() override; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // reaching into this class from multiple threads to attain a WeakPtr. | 244 // reaching into this class from multiple threads to attain a WeakPtr. |
| 243 base::WeakPtr<MultibufferDataSource> weak_ptr_; | 245 base::WeakPtr<MultibufferDataSource> weak_ptr_; |
| 244 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; | 246 base::WeakPtrFactory<MultibufferDataSource> weak_factory_; |
| 245 | 247 |
| 246 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); | 248 DISALLOW_COPY_AND_ASSIGN(MultibufferDataSource); |
| 247 }; | 249 }; |
| 248 | 250 |
| 249 } // namespace media | 251 } // namespace media |
| 250 | 252 |
| 251 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ | 253 #endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_ |
| OLD | NEW |