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_DATA_BUFFER_H_ | 5 #ifndef MEDIA_BASE_DATA_BUFFER_H_ |
6 #define MEDIA_BASE_DATA_BUFFER_H_ | 6 #define MEDIA_BASE_DATA_BUFFER_H_ |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/time.h" | 11 #include "base/time/time.h" |
12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
16 // A simple buffer that takes ownership of the given data pointer or allocates | 16 // A simple buffer that takes ownership of the given data pointer or allocates |
17 // as necessary. | 17 // as necessary. |
18 // | 18 // |
19 // Unlike DecoderBuffer, allocations are assumed to be allocated with the | 19 // Unlike DecoderBuffer, allocations are assumed to be allocated with the |
20 // default memory allocator (i.e., new uint8[]). | 20 // default memory allocator (i.e., new uint8[]). |
21 // | 21 // |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 scoped_ptr<uint8[]> data_; | 104 scoped_ptr<uint8[]> data_; |
105 int buffer_size_; | 105 int buffer_size_; |
106 int data_size_; | 106 int data_size_; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(DataBuffer); | 108 DISALLOW_COPY_AND_ASSIGN(DataBuffer); |
109 }; | 109 }; |
110 | 110 |
111 } // namespace media | 111 } // namespace media |
112 | 112 |
113 #endif // MEDIA_BASE_DATA_BUFFER_H_ | 113 #endif // MEDIA_BASE_DATA_BUFFER_H_ |
OLD | NEW |