OLD | NEW |
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 28 matching lines...) Expand all Loading... |
39 #include "webrtc/voice_engine/include/voe_base.h" | 39 #include "webrtc/voice_engine/include/voe_base.h" |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 constexpr int kSendStatsPollingIntervalMs = 1000; | 43 constexpr int kSendStatsPollingIntervalMs = 1000; |
44 constexpr int kPayloadTypeH264 = 122; | 44 constexpr int kPayloadTypeH264 = 122; |
45 constexpr int kPayloadTypeVP8 = 123; | 45 constexpr int kPayloadTypeVP8 = 123; |
46 constexpr int kPayloadTypeVP9 = 124; | 46 constexpr int kPayloadTypeVP9 = 124; |
47 constexpr size_t kMaxComparisons = 10; | 47 constexpr size_t kMaxComparisons = 10; |
48 constexpr char kSyncGroup[] = "av_sync"; | 48 constexpr char kSyncGroup[] = "av_sync"; |
49 constexpr int kOpusMinBitrate = 6000; | 49 constexpr int kOpusMinBitrateBps = 6000; |
50 constexpr int kOpusBitrateFb = 32000; | 50 constexpr int kOpusBitrateFbBps = 32000; |
51 | 51 |
52 struct VoiceEngineState { | 52 struct VoiceEngineState { |
53 VoiceEngineState() | 53 VoiceEngineState() |
54 : voice_engine(nullptr), | 54 : voice_engine(nullptr), |
55 base(nullptr), | 55 base(nullptr), |
56 send_channel_id(-1), | 56 send_channel_id(-1), |
57 receive_channel_id(-1) {} | 57 receive_channel_id(-1) {} |
58 | 58 |
59 webrtc::VoiceEngine* voice_engine; | 59 webrtc::VoiceEngine* voice_engine; |
60 webrtc::VoEBase* base; | 60 webrtc::VoEBase* base; |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 audio_send_config_.voe_channel_id = send_channel_id; | 1257 audio_send_config_.voe_channel_id = send_channel_id; |
1258 audio_send_config_.rtp.ssrc = kAudioSendSsrc; | 1258 audio_send_config_.rtp.ssrc = kAudioSendSsrc; |
1259 | 1259 |
1260 // Add extension to enable audio send side BWE, and allow audio bit rate | 1260 // Add extension to enable audio send side BWE, and allow audio bit rate |
1261 // adaptation. | 1261 // adaptation. |
1262 audio_send_config_.rtp.extensions.clear(); | 1262 audio_send_config_.rtp.extensions.clear(); |
1263 if (params_.call.send_side_bwe) { | 1263 if (params_.call.send_side_bwe) { |
1264 audio_send_config_.rtp.extensions.push_back( | 1264 audio_send_config_.rtp.extensions.push_back( |
1265 webrtc::RtpExtension(webrtc::RtpExtension::kTransportSequenceNumberUri, | 1265 webrtc::RtpExtension(webrtc::RtpExtension::kTransportSequenceNumberUri, |
1266 test::kTransportSequenceNumberExtensionId)); | 1266 test::kTransportSequenceNumberExtensionId)); |
1267 audio_send_config_.min_bitrate_kbps = kOpusMinBitrate / 1000; | 1267 audio_send_config_.min_bitrate_bps = kOpusMinBitrateBps; |
1268 audio_send_config_.max_bitrate_kbps = kOpusBitrateFb / 1000; | 1268 audio_send_config_.max_bitrate_bps = kOpusBitrateFbBps; |
1269 } | 1269 } |
1270 audio_send_config_.send_codec_spec.codec_inst = | 1270 audio_send_config_.send_codec_spec.codec_inst = |
1271 CodecInst{120, "OPUS", 48000, 960, 2, 64000}; | 1271 CodecInst{120, "OPUS", 48000, 960, 2, 64000}; |
1272 | 1272 |
1273 audio_send_stream_ = call->CreateAudioSendStream(audio_send_config_); | 1273 audio_send_stream_ = call->CreateAudioSendStream(audio_send_config_); |
1274 | 1274 |
1275 AudioReceiveStream::Config audio_config; | 1275 AudioReceiveStream::Config audio_config; |
1276 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc; | 1276 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc; |
1277 audio_config.rtcp_send_transport = transport; | 1277 audio_config.rtcp_send_transport = transport; |
1278 audio_config.voe_channel_id = receive_channel_id; | 1278 audio_config.voe_channel_id = receive_channel_id; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 std::ostringstream str; | 1445 std::ostringstream str; |
1446 str << receive_logs_++; | 1446 str << receive_logs_++; |
1447 std::string path = | 1447 std::string path = |
1448 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1448 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
1449 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1449 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
1450 10000000); | 1450 10000000); |
1451 } | 1451 } |
1452 } | 1452 } |
1453 | 1453 |
1454 } // namespace webrtc | 1454 } // namespace webrtc |
OLD | NEW |