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

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: Moved duplicated configuration from constructor to ConfigureStream (previously Reconfigure) 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 #include "webrtc/video/video_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 // Add extension to enable audio send side BWE, and allow audio bit rate 1704 // Add extension to enable audio send side BWE, and allow audio bit rate
1705 // adaptation. 1705 // adaptation.
1706 audio_send_config_.rtp.extensions.clear(); 1706 audio_send_config_.rtp.extensions.clear();
1707 if (params_.call.send_side_bwe) { 1707 if (params_.call.send_side_bwe) {
1708 audio_send_config_.rtp.extensions.push_back( 1708 audio_send_config_.rtp.extensions.push_back(
1709 webrtc::RtpExtension(webrtc::RtpExtension::kTransportSequenceNumberUri, 1709 webrtc::RtpExtension(webrtc::RtpExtension::kTransportSequenceNumberUri,
1710 test::kTransportSequenceNumberExtensionId)); 1710 test::kTransportSequenceNumberExtensionId));
1711 audio_send_config_.min_bitrate_bps = kOpusMinBitrateBps; 1711 audio_send_config_.min_bitrate_bps = kOpusMinBitrateBps;
1712 audio_send_config_.max_bitrate_bps = kOpusBitrateFbBps; 1712 audio_send_config_.max_bitrate_bps = kOpusBitrateFbBps;
1713 } 1713 }
1714 audio_send_config_.send_codec_spec.codec_inst = 1714 audio_send_config_.send_codec_spec =
1715 CodecInst{120, "OPUS", 48000, 960, 2, 64000}; 1715 rtc::Optional<AudioSendStream::Config::SendCodecSpec>(
1716 audio_send_config_.send_codec_spec.enable_opus_dtx = params_.audio.dtx; 1716 {120,
1717 {"OPUS", 48000, 2,
1718 {{"usedtx", (params_.audio.dtx ? "1" : "0")},
1719 {"stereo", "1"}}}});
1720
1717 audio_send_stream_ = call->CreateAudioSendStream(audio_send_config_); 1721 audio_send_stream_ = call->CreateAudioSendStream(audio_send_config_);
1718 1722
1719 AudioReceiveStream::Config audio_config; 1723 AudioReceiveStream::Config audio_config;
1720 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc; 1724 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc;
1721 audio_config.rtcp_send_transport = transport; 1725 audio_config.rtcp_send_transport = transport;
1722 audio_config.voe_channel_id = receive_channel_id; 1726 audio_config.voe_channel_id = receive_channel_id;
1723 audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc; 1727 audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc;
1724 audio_config.rtp.transport_cc = params_.call.send_side_bwe; 1728 audio_config.rtp.transport_cc = params_.call.send_side_bwe;
1725 audio_config.rtp.extensions = audio_send_config_.rtp.extensions; 1729 audio_config.rtp.extensions = audio_send_config_.rtp.extensions;
1726 audio_config.decoder_factory = decoder_factory_; 1730 audio_config.decoder_factory = decoder_factory_;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 if (!params_.video.encoded_frame_base_path.empty()) { 1888 if (!params_.video.encoded_frame_base_path.empty()) {
1885 std::ostringstream str; 1889 std::ostringstream str;
1886 str << receive_logs_++; 1890 str << receive_logs_++;
1887 std::string path = 1891 std::string path =
1888 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1892 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1889 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1893 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1890 10000000); 1894 10000000);
1891 } 1895 }
1892 } 1896 }
1893 } // namespace webrtc 1897 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698