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

Unified Diff: webrtc/media/engine/fakewebrtcvoiceengine.h

Issue 2307533004: Moving/renaming webrtc/common.h. (Closed)
Patch Set: Comments+small fixes Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/media/engine/fakewebrtcvoiceengine.h
diff --git a/webrtc/media/engine/fakewebrtcvoiceengine.h b/webrtc/media/engine/fakewebrtcvoiceengine.h
index 9b5440c17b1f5b421626987050478fd893568c85..477c2381f331e729fd568db5a9107096d47ceaf4 100644
--- a/webrtc/media/engine/fakewebrtcvoiceengine.h
+++ b/webrtc/media/engine/fakewebrtcvoiceengine.h
@@ -154,7 +154,7 @@ class FakeWebRtcVoiceEngine
int associate_send_channel = -1;
std::vector<webrtc::CodecInst> recv_codecs;
webrtc::CodecInst send_codec;
- int neteq_capacity = -1;
+ size_t neteq_capacity = -1;
tommi 2016/09/02 07:59:52 assigning a negative value to an unsigned type doe
kwiberg-webrtc 2016/09/02 08:05:51 Now, sing with me: ♪ rtc::Optional, rtc::Optiona
the sun 2016/09/02 08:54:40 In this context, setting it to zero will work fine
bool neteq_fast_accelerate = false;
};
@@ -190,18 +190,15 @@ class FakeWebRtcVoiceEngine
void set_fail_create_channel(bool fail_create_channel) {
fail_create_channel_ = fail_create_channel;
}
- int AddChannel(const webrtc::Config& config) {
+ int AddChannel(const webrtc::AudioCodingModule::Config& acm_config) {
if (fail_create_channel_) {
return -1;
}
Channel* ch = new Channel();
auto db = webrtc::acm2::RentACodec::Database();
ch->recv_codecs.assign(db.begin(), db.end());
- if (config.Get<webrtc::NetEqCapacityConfig>().enabled) {
- ch->neteq_capacity = config.Get<webrtc::NetEqCapacityConfig>().capacity;
- }
- ch->neteq_fast_accelerate =
- config.Get<webrtc::NetEqFastAccelerate>().enabled;
+ ch->neteq_capacity = acm_config.neteq_config.max_packets_in_buffer;
+ ch->neteq_fast_accelerate = acm_config.neteq_config.enable_fast_accelerate;
channels_[++last_channel_] = ch;
return last_channel_;
}
@@ -237,11 +234,11 @@ class FakeWebRtcVoiceEngine
return nullptr;
}
WEBRTC_FUNC(CreateChannel, ()) {
- webrtc::Config empty_config;
- return AddChannel(empty_config);
+ return AddChannel(webrtc::AudioCodingModule::Config());
}
- WEBRTC_FUNC(CreateChannel, (const webrtc::Config& config)) {
- return AddChannel(config);
+ WEBRTC_FUNC(CreateChannel,
+ (const webrtc::AudioCodingModule::Config& acm_config)) {
+ return AddChannel(acm_config);
}
WEBRTC_FUNC(DeleteChannel, (int channel)) {
WEBRTC_CHECK_CHANNEL(channel);
@@ -547,7 +544,7 @@ class FakeWebRtcVoiceEngine
void EnableStereoChannelSwapping(bool enable) override {
stereo_swapping_enabled_ = enable;
}
- int GetNetEqCapacity() const {
+ size_t GetNetEqCapacity() const {
auto ch = channels_.find(last_channel_);
ASSERT(ch != channels_.end());
return ch->second->neteq_capacity;

Powered by Google App Engine
This is Rietveld 408576698