OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 config.acm_config.neteq_config.enable_fast_accelerate; | 91 config.acm_config.neteq_config.enable_fast_accelerate; |
92 channels_[++last_channel_] = ch; | 92 channels_[++last_channel_] = ch; |
93 return last_channel_; | 93 return last_channel_; |
94 } | 94 } |
95 WEBRTC_FUNC(DeleteChannel, (int channel)) { | 95 WEBRTC_FUNC(DeleteChannel, (int channel)) { |
96 WEBRTC_CHECK_CHANNEL(channel); | 96 WEBRTC_CHECK_CHANNEL(channel); |
97 delete channels_[channel]; | 97 delete channels_[channel]; |
98 channels_.erase(channel); | 98 channels_.erase(channel); |
99 return 0; | 99 return 0; |
100 } | 100 } |
101 WEBRTC_STUB(StartReceive, (int channel)); | |
102 WEBRTC_STUB(StartPlayout, (int channel)); | 101 WEBRTC_STUB(StartPlayout, (int channel)); |
103 WEBRTC_STUB(StartSend, (int channel)); | 102 WEBRTC_STUB(StartSend, (int channel)); |
104 WEBRTC_STUB(StopReceive, (int channel)); | |
105 WEBRTC_STUB(StopPlayout, (int channel)); | 103 WEBRTC_STUB(StopPlayout, (int channel)); |
106 WEBRTC_STUB(StopSend, (int channel)); | 104 WEBRTC_STUB(StopSend, (int channel)); |
107 WEBRTC_STUB(GetVersion, (char version[1024])); | |
108 WEBRTC_STUB(LastError, ()); | |
109 WEBRTC_STUB(AssociateSendChannel, (int channel, | |
110 int accociate_send_channel)); | |
111 | 105 |
112 size_t GetNetEqCapacity() const { | 106 size_t GetNetEqCapacity() const { |
113 auto ch = channels_.find(last_channel_); | 107 auto ch = channels_.find(last_channel_); |
114 RTC_DCHECK(ch != channels_.end()); | 108 RTC_DCHECK(ch != channels_.end()); |
115 return ch->second->neteq_capacity; | 109 return ch->second->neteq_capacity; |
116 } | 110 } |
117 bool GetNetEqFastAccelerate() const { | 111 bool GetNetEqFastAccelerate() const { |
118 auto ch = channels_.find(last_channel_); | 112 auto ch = channels_.find(last_channel_); |
119 RTC_CHECK(ch != channels_.end()); | 113 RTC_CHECK(ch != channels_.end()); |
120 return ch->second->neteq_fast_accelerate; | 114 return ch->second->neteq_fast_accelerate; |
121 } | 115 } |
122 | 116 |
123 private: | 117 private: |
124 bool inited_ = false; | 118 bool inited_ = false; |
125 int last_channel_ = -1; | 119 int last_channel_ = -1; |
126 std::map<int, Channel*> channels_; | 120 std::map<int, Channel*> channels_; |
127 bool fail_create_channel_ = false; | 121 bool fail_create_channel_ = false; |
128 webrtc::voe::TransmitMixer* transmit_mixer_ = nullptr; | 122 webrtc::voe::TransmitMixer* transmit_mixer_ = nullptr; |
129 | 123 |
130 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FakeWebRtcVoiceEngine); | 124 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FakeWebRtcVoiceEngine); |
131 }; | 125 }; |
132 | 126 |
133 } // namespace cricket | 127 } // namespace cricket |
134 | 128 |
135 #endif // MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ | 129 #endif // MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ |
OLD | NEW |