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

Side by Side Diff: webrtc/modules/audio_processing/processing_component.h

Issue 1410833002: Lock scheme #4: Introduced the render sample queue for the aec and aecm (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@aec_error_report_CL
Patch Set: Merge with latest master Created 5 years, 1 month 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 | « webrtc/modules/audio_processing/echo_control_mobile_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H_ 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H_
13 13
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/common.h" 16 #include "webrtc/common.h"
17 17
18 namespace webrtc { 18 namespace webrtc {
19 19
20 // Functor to use when supplying a verifier function for the queue item
21 // verifcation.
22 template <typename T>
23 class RenderQueueItemVerifier {
24 public:
25 explicit RenderQueueItemVerifier(size_t minimum_capacity)
26 : minimum_capacity_(minimum_capacity) {}
27
28 bool operator()(const std::vector<T>& v) const {
29 return v.capacity() >= minimum_capacity_;
30 }
31
32 private:
33 size_t minimum_capacity_;
34 };
35
20 class ProcessingComponent { 36 class ProcessingComponent {
21 public: 37 public:
22 ProcessingComponent(); 38 ProcessingComponent();
23 virtual ~ProcessingComponent(); 39 virtual ~ProcessingComponent();
24 40
25 virtual int Initialize(); 41 virtual int Initialize();
26 virtual void SetExtraOptions(const Config& config) {} 42 virtual void SetExtraOptions(const Config& config) {}
27 virtual int Destroy(); 43 virtual int Destroy();
28 44
29 bool is_component_enabled() const; 45 bool is_component_enabled() const;
(...skipping 14 matching lines...) Expand all
44 60
45 std::vector<void*> handles_; 61 std::vector<void*> handles_;
46 bool initialized_; 62 bool initialized_;
47 bool enabled_; 63 bool enabled_;
48 int num_handles_; 64 int num_handles_;
49 }; 65 };
50 66
51 } // namespace webrtc 67 } // namespace webrtc
52 68
53 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H__ 69 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H__
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/echo_control_mobile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698