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

Unified Diff: webrtc/test/call_test.cc

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: audio_send_spec made optional<>, EnableAudioNetworkAdapter now called directly on encoder, VAD supp… Created 3 years, 9 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/test/call_test.cc
diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc
index 5bfcb4d1a15f0fa358f72afc803b062acd0fe31c..1b5c1b369eac8a74641a11c6f82ee8e4b54e0e70 100644
--- a/webrtc/test/call_test.cc
+++ b/webrtc/test/call_test.cc
@@ -15,6 +15,7 @@
#include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
#include "webrtc/base/checks.h"
#include "webrtc/config.h"
+#include "webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory.h"
#include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
#include "webrtc/test/testsupport/fileutils.h"
#include "webrtc/voice_engine/include/voe_base.h"
@@ -37,6 +38,7 @@ CallTest::CallTest()
num_audio_streams_(0),
num_flexfec_streams_(0),
decoder_factory_(CreateBuiltinAudioDecoderFactory()),
+ encoder_factory_(CreateBuiltinAudioEncoderFactory()),
fake_send_audio_device_(nullptr),
fake_recv_audio_device_(nullptr) {}
@@ -214,8 +216,10 @@ void CallTest::CreateSendConfig(size_t num_video_streams,
audio_send_config_ = AudioSendStream::Config(send_transport);
audio_send_config_.voe_channel_id = voe_send_.channel_id;
audio_send_config_.rtp.ssrc = kAudioSendSsrc;
- audio_send_config_.send_codec_spec.codec_inst =
- CodecInst{kAudioSendPayloadType, "OPUS", 48000, 960, 2, 64000};
+ audio_send_config_.send_codec_spec =
+ rtc::Optional<AudioSendStream::Config::SendCodecSpec>(
+ {kAudioSendPayloadType, {"OPUS", 48000, 2, {{"stereo", "1"}}}});
+ audio_send_config_.encoder_factory = encoder_factory_;
}
// TODO(brandtr): Update this when we support multistream protection.

Powered by Google App Engine
This is Rietveld 408576698