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_BASE_AUDIO_BUFFER_H_ | 5 #ifndef MEDIA_BASE_AUDIO_BUFFER_H_ |
6 #define MEDIA_BASE_AUDIO_BUFFER_H_ | 6 #define MEDIA_BASE_AUDIO_BUFFER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 #include <memory> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/aligned_memory.h" | 15 #include "base/memory/aligned_memory.h" |
15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "media/base/channel_layout.h" | 18 #include "media/base/channel_layout.h" |
19 #include "media/base/media_export.h" | 19 #include "media/base/media_export.h" |
20 #include "media/base/sample_format.h" | 20 #include "media/base/sample_format.h" |
21 | 21 |
22 namespace mojo { | 22 namespace mojo { |
23 template <typename T, typename U> | 23 template <typename T, typename U> |
24 struct TypeConverter; | 24 struct TypeConverter; |
25 template <typename T> | 25 template <typename T> |
26 class StructPtr; | 26 class StructPtr; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 const ChannelLayout channel_layout_; | 175 const ChannelLayout channel_layout_; |
176 const int channel_count_; | 176 const int channel_count_; |
177 int sample_rate_; | 177 int sample_rate_; |
178 int adjusted_frame_count_; | 178 int adjusted_frame_count_; |
179 int trim_start_; | 179 int trim_start_; |
180 const bool end_of_stream_; | 180 const bool end_of_stream_; |
181 base::TimeDelta timestamp_; | 181 base::TimeDelta timestamp_; |
182 base::TimeDelta duration_; | 182 base::TimeDelta duration_; |
183 | 183 |
184 // Contiguous block of channel data. | 184 // Contiguous block of channel data. |
185 scoped_ptr<uint8_t, base::AlignedFreeDeleter> data_; | 185 std::unique_ptr<uint8_t, base::AlignedFreeDeleter> data_; |
186 size_t data_size_; | 186 size_t data_size_; |
187 | 187 |
188 // For planar data, points to each channels data. | 188 // For planar data, points to each channels data. |
189 std::vector<uint8_t*> channel_data_; | 189 std::vector<uint8_t*> channel_data_; |
190 | 190 |
191 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioBuffer); | 191 DISALLOW_IMPLICIT_CONSTRUCTORS(AudioBuffer); |
192 }; | 192 }; |
193 | 193 |
194 } // namespace media | 194 } // namespace media |
195 | 195 |
196 #endif // MEDIA_BASE_AUDIO_BUFFER_H_ | 196 #endif // MEDIA_BASE_AUDIO_BUFFER_H_ |
OLD | NEW |