Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Side by Side Diff: media/base/audio_buffer.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/audio_block_fifo_unittest.cc ('k') | media/base/audio_buffer_converter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « media/base/audio_block_fifo_unittest.cc ('k') | media/base/audio_buffer_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698