OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_RANGES_H_ | 5 #ifndef MEDIA_BASE_RANGES_H_ |
6 #define MEDIA_BASE_RANGES_H_ | 6 #define MEDIA_BASE_RANGES_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <ostream> | 9 #include <ostream> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/time.h" | 14 #include "base/time/time.h" |
15 #include "media/base/media_export.h" | 15 #include "media/base/media_export.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 // Ranges allows holding an ordered list of ranges of [start,end) intervals. | 19 // Ranges allows holding an ordered list of ranges of [start,end) intervals. |
20 // The canonical example use-case is holding the list of ranges of buffered | 20 // The canonical example use-case is holding the list of ranges of buffered |
21 // bytes or times in a <video> tag. | 21 // bytes or times in a <video> tag. |
22 template<class T> // Endpoint type; typically a base::TimeDelta or an int64. | 22 template<class T> // Endpoint type; typically a base::TimeDelta or an int64. |
23 class Ranges { | 23 class Ranges { |
24 public: | 24 public: |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 else | 153 else |
154 ++j; | 154 ++j; |
155 } | 155 } |
156 | 156 |
157 return result; | 157 return result; |
158 } | 158 } |
159 | 159 |
160 } // namespace media | 160 } // namespace media |
161 | 161 |
162 #endif // MEDIA_BASE_RANGES_H_ | 162 #endif // MEDIA_BASE_RANGES_H_ |
OLD | NEW |