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

Side by Side Diff: webrtc/media/engine/webrtcvoe.h

Issue 2539213003: Support external audio mixer. (Closed)
Patch Set: Review response Created 4 years 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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 private: 67 private:
68 T* ptr; 68 T* ptr;
69 }; 69 };
70 70
71 // Utility class for aggregating the various WebRTC interface. 71 // Utility class for aggregating the various WebRTC interface.
72 // Fake implementations can also be injected for testing. 72 // Fake implementations can also be injected for testing.
73 class VoEWrapper { 73 class VoEWrapper {
74 public: 74 public:
75 VoEWrapper() 75 VoEWrapper(rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer)
the sun 2016/12/07 15:56:08 AudioMixer has no business here.
GeorgeZ 2016/12/07 18:28:17 Done.
76 : engine_(webrtc::VoiceEngine::Create()), processing_(engine_), 76 : engine_(webrtc::VoiceEngine::Create()),
77 base_(engine_), codec_(engine_), hw_(engine_), 77 processing_(engine_),
78 volume_(engine_) { 78 base_(engine_),
79 } 79 codec_(engine_),
80 hw_(engine_),
81 volume_(engine_),
82 audio_mixer_(audio_mixer) {}
80 VoEWrapper(webrtc::VoEAudioProcessing* processing, 83 VoEWrapper(webrtc::VoEAudioProcessing* processing,
81 webrtc::VoEBase* base, 84 webrtc::VoEBase* base,
82 webrtc::VoECodec* codec, 85 webrtc::VoECodec* codec,
83 webrtc::VoEHardware* hw, 86 webrtc::VoEHardware* hw,
84 webrtc::VoEVolumeControl* volume) 87 webrtc::VoEVolumeControl* volume)
85 : engine_(NULL), 88 : engine_(NULL),
86 processing_(processing), 89 processing_(processing),
87 base_(base), 90 base_(base),
88 codec_(codec), 91 codec_(codec),
89 hw_(hw), 92 hw_(hw),
90 volume_(volume) { 93 volume_(volume) {
91 } 94 }
92 ~VoEWrapper() {} 95 ~VoEWrapper() {}
93 webrtc::VoiceEngine* engine() const { return engine_.get(); } 96 webrtc::VoiceEngine* engine() const { return engine_.get(); }
94 webrtc::VoEAudioProcessing* processing() const { return processing_.get(); } 97 webrtc::VoEAudioProcessing* processing() const { return processing_.get(); }
95 webrtc::VoEBase* base() const { return base_.get(); } 98 webrtc::VoEBase* base() const { return base_.get(); }
96 webrtc::VoECodec* codec() const { return codec_.get(); } 99 webrtc::VoECodec* codec() const { return codec_.get(); }
97 webrtc::VoEHardware* hw() const { return hw_.get(); } 100 webrtc::VoEHardware* hw() const { return hw_.get(); }
98 webrtc::VoEVolumeControl* volume() const { return volume_.get(); } 101 webrtc::VoEVolumeControl* volume() const { return volume_.get(); }
99 int error() { return base_->LastError(); } 102 int error() { return base_->LastError(); }
103 rtc::scoped_refptr<webrtc::AudioMixer> AudioMixer() const {
104 return audio_mixer_;
105 }
100 106
101 private: 107 private:
102 scoped_voe_engine engine_; 108 scoped_voe_engine engine_;
103 scoped_voe_ptr<webrtc::VoEAudioProcessing> processing_; 109 scoped_voe_ptr<webrtc::VoEAudioProcessing> processing_;
104 scoped_voe_ptr<webrtc::VoEBase> base_; 110 scoped_voe_ptr<webrtc::VoEBase> base_;
105 scoped_voe_ptr<webrtc::VoECodec> codec_; 111 scoped_voe_ptr<webrtc::VoECodec> codec_;
106 scoped_voe_ptr<webrtc::VoEHardware> hw_; 112 scoped_voe_ptr<webrtc::VoEHardware> hw_;
107 scoped_voe_ptr<webrtc::VoEVolumeControl> volume_; 113 scoped_voe_ptr<webrtc::VoEVolumeControl> volume_;
114 rtc::scoped_refptr<webrtc::AudioMixer> audio_mixer_ = nullptr;
108 }; 115 };
109 } // namespace cricket 116 } // namespace cricket
110 117
111 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOE_H_ 118 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698