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

Unified Diff: webrtc/audio/test/low_bandwidth_audio_test.cc

Issue 2794243002: Making FakeNetworkPipe demux audio and video packets. (Closed)
Patch Set: fixing android 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/call/bitrate_estimator_tests.cc » ('j') | webrtc/test/direct_transport.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/test/low_bandwidth_audio_test.cc
diff --git a/webrtc/audio/test/low_bandwidth_audio_test.cc b/webrtc/audio/test/low_bandwidth_audio_test.cc
index de955f75e19c936b98e61692f832d62254d8ffcc..65f28fa6a3385ccc2c30dbbac9ad332910202f54 100644
--- a/webrtc/audio/test/low_bandwidth_audio_test.cc
+++ b/webrtc/audio/test/low_bandwidth_audio_test.cc
@@ -20,12 +20,9 @@ namespace {
// Wait half a second between stopping sending and stopping receiving audio.
constexpr int kExtraRecordTimeMs = 500;
-// Large bitrate by default.
-const webrtc::CodecInst kDefaultCodec{120, "OPUS", 48000, 960, 2, 64000};
-
// The best that can be done with PESQ.
constexpr int kAudioFileBitRate = 16000;
-}
+} // namespace
namespace webrtc {
namespace test {
@@ -79,20 +76,20 @@ test::PacketTransport* AudioQualityTest::CreateSendTransport(
Call* sender_call) {
return new test::PacketTransport(
sender_call, this, test::PacketTransport::kSender,
- MediaType::AUDIO,
- GetNetworkPipeConfig());
+ test::CallTest::payload_type_map_, GetNetworkPipeConfig());
}
test::PacketTransport* AudioQualityTest::CreateReceiveTransport() {
- return new test::PacketTransport(nullptr, this,
- test::PacketTransport::kReceiver, MediaType::AUDIO,
- GetNetworkPipeConfig());
+ return new test::PacketTransport(
+ nullptr, this, test::PacketTransport::kReceiver,
+ test::CallTest::payload_type_map_, GetNetworkPipeConfig());
}
void AudioQualityTest::ModifyAudioConfigs(
AudioSendStream::Config* send_config,
std::vector<AudioReceiveStream::Config>* receive_configs) {
- send_config->send_codec_spec.codec_inst = kDefaultCodec;
+ send_config->send_codec_spec.codec_inst = webrtc::CodecInst{
+ test::CallTest::kAudioSendPayloadType, "OPUS", 48000, 960, 2, 64000};
}
void AudioQualityTest::PerformTest() {
@@ -125,12 +122,12 @@ class Mobile2GNetworkTest : public AudioQualityTest {
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
std::vector<AudioReceiveStream::Config>* receive_configs) override {
send_config->send_codec_spec.codec_inst = CodecInst{
- 120, // pltype
- "OPUS", // plname
- 48000, // plfreq
- 2880, // pacsize
- 1, // channels
- 6000 // rate bits/sec
+ test::CallTest::kAudioSendPayloadType, // pltype
+ "OPUS", // plname
+ 48000, // plfreq
+ 2880, // pacsize
+ 1, // channels
+ 6000 // rate bits/sec
};
}
« no previous file with comments | « no previous file | webrtc/call/bitrate_estimator_tests.cc » ('j') | webrtc/test/direct_transport.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698