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

Side by Side Diff: media/cdm/cdm_adapter.h

Issue 2788483003: Introduce AudioBufferMemoryPool to avoid thrashing on audio buffers. (Closed)
Patch Set: Add class comments. Created 3 years, 8 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_buffer_unittest.cc ('k') | media/cdm/cdm_adapter.cc » ('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 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_CDM_CDM_ADAPTER_H_ 5 #ifndef MEDIA_CDM_CDM_ADAPTER_H_
6 #define MEDIA_CDM_CDM_ADAPTER_H_ 6 #define MEDIA_CDM_CDM_ADAPTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "base/memory/weak_ptr.h" 19 #include "base/memory/weak_ptr.h"
20 #include "base/scoped_native_library.h" 20 #include "base/scoped_native_library.h"
21 #include "base/threading/thread.h" 21 #include "base/threading/thread.h"
22 #include "media/base/audio_buffer.h"
22 #include "media/base/cdm_config.h" 23 #include "media/base/cdm_config.h"
23 #include "media/base/cdm_context.h" 24 #include "media/base/cdm_context.h"
24 #include "media/base/cdm_factory.h" 25 #include "media/base/cdm_factory.h"
25 #include "media/base/cdm_promise_adapter.h" 26 #include "media/base/cdm_promise_adapter.h"
26 #include "media/base/content_decryption_module.h" 27 #include "media/base/content_decryption_module.h"
27 #include "media/base/decryptor.h" 28 #include "media/base/decryptor.h"
28 #include "media/base/media_export.h" 29 #include "media/base/media_export.h"
29 #include "media/cdm/api/content_decryption_module.h" 30 #include "media/cdm/api/content_decryption_module.h"
30 #include "ui/gfx/geometry/size.h" 31 #include "ui/gfx/geometry/size.h"
31 32
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 218
218 // Keep track of audio parameters. 219 // Keep track of audio parameters.
219 int audio_samples_per_second_; 220 int audio_samples_per_second_;
220 ChannelLayout audio_channel_layout_; 221 ChannelLayout audio_channel_layout_;
221 222
222 std::unique_ptr<CdmAllocator> allocator_; 223 std::unique_ptr<CdmAllocator> allocator_;
223 CreateCdmFileIOCB create_cdm_file_io_cb_; 224 CreateCdmFileIOCB create_cdm_file_io_cb_;
224 225
225 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 226 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
226 227
228 scoped_refptr<AudioBufferMemoryPool> pool_;
229
227 // NOTE: Weak pointers must be invalidated before all other member variables. 230 // NOTE: Weak pointers must be invalidated before all other member variables.
228 base::WeakPtrFactory<CdmAdapter> weak_factory_; 231 base::WeakPtrFactory<CdmAdapter> weak_factory_;
229 232
230 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); 233 DISALLOW_COPY_AND_ASSIGN(CdmAdapter);
231 }; 234 };
232 235
233 } // namespace media 236 } // namespace media
234 237
235 #endif // MEDIA_CDM_CDM_ADAPTER_H_ 238 #endif // MEDIA_CDM_CDM_ADAPTER_H_
OLDNEW
« no previous file with comments | « media/base/audio_buffer_unittest.cc ('k') | media/cdm/cdm_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698