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

Side by Side Diff: webrtc/voice_engine/shared_data.h

Issue 2961723004: Allow an external audio processing module to be used in WebRTC (Closed)
Patch Set: Moved creation of APMs from CreateVoiceEngines Created 3 years, 5 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 | « webrtc/voice_engine/include/voe_base.h ('k') | webrtc/voice_engine/shared_data.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 /* 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
(...skipping 25 matching lines...) Expand all
36 class SharedData 36 class SharedData
37 { 37 {
38 public: 38 public:
39 // Public accessors. 39 // Public accessors.
40 uint32_t instance_id() const { return _instanceId; } 40 uint32_t instance_id() const { return _instanceId; }
41 Statistics& statistics() { return _engineStatistics; } 41 Statistics& statistics() { return _engineStatistics; }
42 ChannelManager& channel_manager() { return _channelManager; } 42 ChannelManager& channel_manager() { return _channelManager; }
43 AudioDeviceModule* audio_device() { return _audioDevicePtr.get(); } 43 AudioDeviceModule* audio_device() { return _audioDevicePtr.get(); }
44 void set_audio_device( 44 void set_audio_device(
45 const rtc::scoped_refptr<AudioDeviceModule>& audio_device); 45 const rtc::scoped_refptr<AudioDeviceModule>& audio_device);
46 AudioProcessing* audio_processing() { return audioproc_.get(); }
47 void set_audio_processing(AudioProcessing* audio_processing); 46 void set_audio_processing(AudioProcessing* audio_processing);
48 TransmitMixer* transmit_mixer() { return _transmitMixerPtr; } 47 TransmitMixer* transmit_mixer() { return _transmitMixerPtr; }
49 OutputMixer* output_mixer() { return _outputMixerPtr; } 48 OutputMixer* output_mixer() { return _outputMixerPtr; }
50 rtc::CriticalSection* crit_sec() { return &_apiCritPtr; } 49 rtc::CriticalSection* crit_sec() { return &_apiCritPtr; }
51 ProcessThread* process_thread() { return _moduleProcessThreadPtr.get(); } 50 ProcessThread* process_thread() { return _moduleProcessThreadPtr.get(); }
52 rtc::TaskQueue* encoder_queue(); 51 rtc::TaskQueue* encoder_queue();
53 52
54 int NumOfSendingChannels(); 53 int NumOfSendingChannels();
55 int NumOfPlayingChannels(); 54 int NumOfPlayingChannels();
56 55
57 // Convenience methods for calling statistics().SetLastError(). 56 // Convenience methods for calling statistics().SetLastError().
58 void SetLastError(int32_t error) const; 57 void SetLastError(int32_t error) const;
59 void SetLastError(int32_t error, TraceLevel level) const; 58 void SetLastError(int32_t error, TraceLevel level) const;
60 void SetLastError(int32_t error, TraceLevel level, 59 void SetLastError(int32_t error, TraceLevel level,
61 const char* msg) const; 60 const char* msg) const;
62 61
63 protected: 62 protected:
64 rtc::ThreadChecker construction_thread_; 63 rtc::ThreadChecker construction_thread_;
65 const uint32_t _instanceId; 64 const uint32_t _instanceId;
66 rtc::CriticalSection _apiCritPtr; 65 rtc::CriticalSection _apiCritPtr;
67 ChannelManager _channelManager; 66 ChannelManager _channelManager;
68 Statistics _engineStatistics; 67 Statistics _engineStatistics;
69 rtc::scoped_refptr<AudioDeviceModule> _audioDevicePtr; 68 rtc::scoped_refptr<AudioDeviceModule> _audioDevicePtr;
70 OutputMixer* _outputMixerPtr; 69 OutputMixer* _outputMixerPtr;
71 TransmitMixer* _transmitMixerPtr; 70 TransmitMixer* _transmitMixerPtr;
72 std::unique_ptr<AudioProcessing> audioproc_;
73 std::unique_ptr<ProcessThread> _moduleProcessThreadPtr; 71 std::unique_ptr<ProcessThread> _moduleProcessThreadPtr;
74 // |encoder_queue| is defined last to ensure all pending tasks are cancelled 72 // |encoder_queue| is defined last to ensure all pending tasks are cancelled
75 // and deleted before any other members. 73 // and deleted before any other members.
76 rtc::TaskQueue encoder_queue_ ACCESS_ON(construction_thread_); 74 rtc::TaskQueue encoder_queue_ ACCESS_ON(construction_thread_);
77 75
78 SharedData(); 76 SharedData();
79 virtual ~SharedData(); 77 virtual ~SharedData();
80 }; 78 };
81 79
82 } // namespace voe 80 } // namespace voe
83 } // namespace webrtc 81 } // namespace webrtc
84 #endif // WEBRTC_VOICE_ENGINE_SHARED_DATA_H 82 #endif // WEBRTC_VOICE_ENGINE_SHARED_DATA_H
OLDNEW
« no previous file with comments | « webrtc/voice_engine/include/voe_base.h ('k') | webrtc/voice_engine/shared_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698