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

Side by Side Diff: voice_engine/voe_base_impl.h

Issue 3020493002: Remove AudioDeviceObserver and make ADM not inherit from the Module interface.
Patch Set: linux build error Created 3 years, 2 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
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 VOICE_ENGINE_VOE_BASE_IMPL_H_ 11 #ifndef VOICE_ENGINE_VOE_BASE_IMPL_H_
12 #define VOICE_ENGINE_VOE_BASE_IMPL_H_ 12 #define VOICE_ENGINE_VOE_BASE_IMPL_H_
13 13
14 #include "voice_engine/include/voe_base.h" 14 #include "voice_engine/include/voe_base.h"
15 15
16 #include "modules/include/module_common_types.h" 16 #include "modules/include/module_common_types.h"
17 #include "rtc_base/criticalsection.h" 17 #include "rtc_base/criticalsection.h"
18 #include "voice_engine/shared_data.h" 18 #include "voice_engine/shared_data.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 class ProcessThread; 22 class ProcessThread;
23 23
24 class VoEBaseImpl : public VoEBase, 24 class VoEBaseImpl : public VoEBase,
25 public AudioTransport, 25 public AudioTransport {
26 public AudioDeviceObserver {
27 public: 26 public:
28 int Init( 27 int Init(
29 AudioDeviceModule* external_adm, 28 AudioDeviceModule* external_adm,
30 AudioProcessing* audio_processing, 29 AudioProcessing* audio_processing,
31 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) override; 30 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) override;
32 AudioDeviceModule* audio_device_module() override { 31 AudioDeviceModule* audio_device_module() override {
33 return shared_->audio_device(); 32 return shared_->audio_device();
34 } 33 }
35 voe::TransmitMixer* transmit_mixer() override { 34 voe::TransmitMixer* transmit_mixer() override {
36 return shared_->transmit_mixer(); 35 return shared_->transmit_mixer();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 size_t number_of_channels, 73 size_t number_of_channels,
75 size_t number_of_frames) override; 74 size_t number_of_frames) override;
76 RTC_DEPRECATED void PullRenderData(int bits_per_sample, 75 RTC_DEPRECATED void PullRenderData(int bits_per_sample,
77 int sample_rate, 76 int sample_rate,
78 size_t number_of_channels, 77 size_t number_of_channels,
79 size_t number_of_frames, 78 size_t number_of_frames,
80 void* audio_data, 79 void* audio_data,
81 int64_t* elapsed_time_ms, 80 int64_t* elapsed_time_ms,
82 int64_t* ntp_time_ms) override; 81 int64_t* ntp_time_ms) override;
83 82
84 // AudioDeviceObserver
85 void OnErrorIsReported(const ErrorCode error) override;
86 void OnWarningIsReported(const WarningCode warning) override;
87
88 protected: 83 protected:
89 VoEBaseImpl(voe::SharedData* shared); 84 VoEBaseImpl(voe::SharedData* shared);
90 ~VoEBaseImpl() override; 85 ~VoEBaseImpl() override;
91 86
92 private: 87 private:
93 int32_t StartPlayout(); 88 int32_t StartPlayout();
94 int32_t StopPlayout(); 89 int32_t StopPlayout();
95 int32_t StartSend(); 90 int32_t StartSend();
96 int32_t StopSend(); 91 int32_t StopSend();
97 int32_t TerminateInternal(); 92 int32_t TerminateInternal();
98 93
99 void GetPlayoutData(int sample_rate, size_t number_of_channels, 94 void GetPlayoutData(int sample_rate, size_t number_of_channels,
100 size_t number_of_frames, bool feed_data_to_apm, 95 size_t number_of_frames, bool feed_data_to_apm,
101 void* audio_data, int64_t* elapsed_time_ms, 96 void* audio_data, int64_t* elapsed_time_ms,
102 int64_t* ntp_time_ms); 97 int64_t* ntp_time_ms);
103 98
104 // Initialize channel by setting Engine Information then initializing 99 // Initialize channel by setting Engine Information then initializing
105 // channel. 100 // channel.
106 int InitializeChannel(voe::ChannelOwner* channel_owner); 101 int InitializeChannel(voe::ChannelOwner* channel_owner);
107 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 102 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
108 103
109 AudioFrame audioFrame_; 104 AudioFrame audioFrame_;
110 voe::SharedData* shared_; 105 voe::SharedData* shared_;
111 }; 106 };
112 107
113 } // namespace webrtc 108 } // namespace webrtc
114 109
115 #endif // VOICE_ENGINE_VOE_BASE_IMPL_H_ 110 #endif // VOICE_ENGINE_VOE_BASE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698