| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_H_ | 5 #ifndef MEDIA_BLINK_MULTIBUFFER_H_ |
| 6 #define MEDIA_BLINK_MULTIBUFFER_H_ | 6 #define MEDIA_BLINK_MULTIBUFFER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 8 #include <stdint.h> | 9 #include <stdint.h> |
| 9 | 10 |
| 10 #include <limits> | 11 #include <limits> |
| 11 #include <map> | 12 #include <map> |
| 12 #include <set> | 13 #include <set> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/callback.h" | 16 #include "base/callback.h" |
| 16 #include "base/containers/hash_tables.h" | 17 #include "base/containers/hash_tables.h" |
| 17 #include "base/macros.h" | 18 #include "base/macros.h" |
| 18 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
| 19 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
| 21 #include "build/build_config.h" |
| 20 #include "media/base/data_buffer.h" | 22 #include "media/base/data_buffer.h" |
| 21 #include "media/blink/interval_map.h" | 23 #include "media/blink/interval_map.h" |
| 22 #include "media/blink/lru.h" | 24 #include "media/blink/lru.h" |
| 23 #include "media/blink/media_blink_export.h" | 25 #include "media/blink/media_blink_export.h" |
| 24 | 26 |
| 25 namespace media { | 27 namespace media { |
| 26 | 28 |
| 27 // Used to identify a block of data in the multibuffer. | 29 // Used to identify a block of data in the multibuffer. |
| 28 // Our blocks are 32kb (1 << 15), so our maximum cacheable file size | 30 // Our blocks are 32kb (1 << 15), so our maximum cacheable file size |
| 29 // is 1 << (15 + 31) = 64Tb | 31 // is 1 << (15 + 31) = 64Tb |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 // and 0 for all blocks that are not. Used to quickly figure out | 318 // and 0 for all blocks that are not. Used to quickly figure out |
| 317 // ranges of available/unavailable blocks without iterating. | 319 // ranges of available/unavailable blocks without iterating. |
| 318 IntervalMap<BlockId, int32_t> present_; | 320 IntervalMap<BlockId, int32_t> present_; |
| 319 | 321 |
| 320 DISALLOW_COPY_AND_ASSIGN(MultiBuffer); | 322 DISALLOW_COPY_AND_ASSIGN(MultiBuffer); |
| 321 }; | 323 }; |
| 322 | 324 |
| 323 } // namespace media | 325 } // namespace media |
| 324 | 326 |
| 325 #endif // MEDIA_BLINK_MULTIBUFFER_H_ | 327 #endif // MEDIA_BLINK_MULTIBUFFER_H_ |
| OLD | NEW |