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

Side by Side Diff: webrtc/call/call_perf_tests.cc

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: Rebase (and removed 'virtual' from Channel::ModifyEncoder) Created 3 years, 8 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include <algorithm> 11 #include <algorithm>
12 #include <limits> 12 #include <limits>
13 #include <memory> 13 #include <memory>
14 #include <string> 14 #include <string>
15 15
16 #include "webrtc/base/checks.h" 16 #include "webrtc/base/checks.h"
17 #include "webrtc/base/constructormagic.h" 17 #include "webrtc/base/constructormagic.h"
18 #include "webrtc/base/thread_annotations.h" 18 #include "webrtc/base/thread_annotations.h"
19 #include "webrtc/call/call.h" 19 #include "webrtc/call/call.h"
20 #include "webrtc/config.h" 20 #include "webrtc/config.h"
21 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" 21 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
22 #include "webrtc/modules/audio_coding/codecs/builtin_audio_encoder_factory.h"
22 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" 23 #include "webrtc/modules/audio_coding/include/audio_coding_module.h"
23 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h" 24 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
24 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 25 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
25 #include "webrtc/system_wrappers/include/metrics_default.h" 26 #include "webrtc/system_wrappers/include/metrics_default.h"
26 #include "webrtc/test/call_test.h" 27 #include "webrtc/test/call_test.h"
27 #include "webrtc/test/direct_transport.h" 28 #include "webrtc/test/direct_transport.h"
28 #include "webrtc/test/drifting_clock.h" 29 #include "webrtc/test/drifting_clock.h"
29 #include "webrtc/test/encoder_settings.h" 30 #include "webrtc/test/encoder_settings.h"
30 #include "webrtc/test/fake_audio_device.h" 31 #include "webrtc/test/fake_audio_device.h"
31 #include "webrtc/test/fake_decoder.h" 32 #include "webrtc/test/fake_decoder.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 receive_transport.SetReceiver(sender_call_->Receiver()); 215 receive_transport.SetReceiver(sender_call_->Receiver());
215 216
216 test::FakeDecoder fake_decoder; 217 test::FakeDecoder fake_decoder;
217 218
218 CreateSendConfig(1, 0, 0, &video_send_transport); 219 CreateSendConfig(1, 0, 0, &video_send_transport);
219 CreateMatchingReceiveConfigs(&receive_transport); 220 CreateMatchingReceiveConfigs(&receive_transport);
220 221
221 AudioSendStream::Config audio_send_config(&audio_send_transport); 222 AudioSendStream::Config audio_send_config(&audio_send_transport);
222 audio_send_config.voe_channel_id = send_channel_id; 223 audio_send_config.voe_channel_id = send_channel_id;
223 audio_send_config.rtp.ssrc = kAudioSendSsrc; 224 audio_send_config.rtp.ssrc = kAudioSendSsrc;
224 audio_send_config.send_codec_spec.codec_inst = 225 audio_send_config.send_codec_spec =
225 CodecInst{103, "ISAC", 16000, 480, 1, 32000}; 226 rtc::Optional<AudioSendStream::Config::SendCodecSpec>(
227 {103, {"ISAC", 16000, 1}});
228 audio_send_config.encoder_factory = CreateBuiltinAudioEncoderFactory();
226 AudioSendStream* audio_send_stream = 229 AudioSendStream* audio_send_stream =
227 sender_call_->CreateAudioSendStream(audio_send_config); 230 sender_call_->CreateAudioSendStream(audio_send_config);
228 231
229 video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 232 video_send_config_.rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
230 if (fec == FecMode::kOn) { 233 if (fec == FecMode::kOn) {
231 video_send_config_.rtp.ulpfec.red_payload_type = kRedPayloadType; 234 video_send_config_.rtp.ulpfec.red_payload_type = kRedPayloadType;
232 video_send_config_.rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType; 235 video_send_config_.rtp.ulpfec.ulpfec_payload_type = kUlpfecPayloadType;
233 video_receive_configs_[0].rtp.ulpfec.red_payload_type = kRedPayloadType; 236 video_receive_configs_[0].rtp.ulpfec.red_payload_type = kRedPayloadType;
234 video_receive_configs_[0].rtp.ulpfec.ulpfec_payload_type = 237 video_receive_configs_[0].rtp.ulpfec.ulpfec_payload_type =
235 kUlpfecPayloadType; 238 kUlpfecPayloadType;
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 uint32_t last_set_bitrate_kbps_; 766 uint32_t last_set_bitrate_kbps_;
764 VideoSendStream* send_stream_; 767 VideoSendStream* send_stream_;
765 test::FrameGeneratorCapturer* frame_generator_; 768 test::FrameGeneratorCapturer* frame_generator_;
766 VideoEncoderConfig encoder_config_; 769 VideoEncoderConfig encoder_config_;
767 } test; 770 } test;
768 771
769 RunBaseTest(&test); 772 RunBaseTest(&test);
770 } 773 }
771 774
772 } // namespace webrtc 775 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/audio_send_stream.cc ('k') | webrtc/media/BUILD.gn » ('j') | webrtc/media/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698