OLD | NEW |
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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 for (size_t i = 0; i < receive_streams_.size(); ++i) { | 2376 for (size_t i = 0; i < receive_streams_.size(); ++i) { |
2377 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats(); | 2377 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats(); |
2378 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc); | 2378 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc); |
2379 | 2379 |
2380 // Make sure all fields have been populated. | 2380 // Make sure all fields have been populated. |
2381 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are | 2381 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are |
2382 // always filled for all receivers. | 2382 // always filled for all receivers. |
2383 receive_stats_filled_["IncomingRate"] |= | 2383 receive_stats_filled_["IncomingRate"] |= |
2384 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0; | 2384 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0; |
2385 | 2385 |
| 2386 send_stats_filled_["DecoderImplementationName"] |= |
| 2387 stats.decoder_implementation_name == |
| 2388 test::FakeDecoder::kImplementationName; |
2386 receive_stats_filled_["RenderDelayAsHighAsExpected"] |= | 2389 receive_stats_filled_["RenderDelayAsHighAsExpected"] |= |
2387 stats.render_delay_ms >= kExpectedRenderDelayMs; | 2390 stats.render_delay_ms >= kExpectedRenderDelayMs; |
2388 | 2391 |
2389 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0; | 2392 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0; |
2390 | 2393 |
2391 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0; | 2394 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0; |
2392 | 2395 |
2393 receive_stats_filled_["StatisticsUpdated"] |= | 2396 receive_stats_filled_["StatisticsUpdated"] |= |
2394 stats.rtcp_stats.cumulative_lost != 0 || | 2397 stats.rtcp_stats.cumulative_lost != 0 || |
2395 stats.rtcp_stats.extended_max_sequence_number != 0 || | 2398 stats.rtcp_stats.extended_max_sequence_number != 0 || |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 bool CheckSendStats() { | 2434 bool CheckSendStats() { |
2432 RTC_DCHECK(send_stream_ != nullptr); | 2435 RTC_DCHECK(send_stream_ != nullptr); |
2433 VideoSendStream::Stats stats = send_stream_->GetStats(); | 2436 VideoSendStream::Stats stats = send_stream_->GetStats(); |
2434 | 2437 |
2435 send_stats_filled_["NumStreams"] |= | 2438 send_stats_filled_["NumStreams"] |= |
2436 stats.substreams.size() == expected_send_ssrcs_.size(); | 2439 stats.substreams.size() == expected_send_ssrcs_.size(); |
2437 | 2440 |
2438 send_stats_filled_["CpuOveruseMetrics"] |= | 2441 send_stats_filled_["CpuOveruseMetrics"] |= |
2439 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; | 2442 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; |
2440 | 2443 |
| 2444 send_stats_filled_["EncoderImplementationName"] |= |
| 2445 stats.encoder_implementation_name == |
| 2446 test::FakeEncoder::kImplementationName; |
| 2447 |
2441 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = | 2448 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = |
2442 stats.substreams.begin(); | 2449 stats.substreams.begin(); |
2443 it != stats.substreams.end(); ++it) { | 2450 it != stats.substreams.end(); ++it) { |
2444 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != | 2451 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != |
2445 expected_send_ssrcs_.end()); | 2452 expected_send_ssrcs_.end()); |
2446 | 2453 |
2447 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= | 2454 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= |
2448 stats.input_frame_rate != 0; | 2455 stats.input_frame_rate != 0; |
2449 | 2456 |
2450 const VideoSendStream::StreamStats& stream_stats = it->second; | 2457 const VideoSendStream::StreamStats& stream_stats = it->second; |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3213 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) | 3220 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) |
3214 << "Enabling RTX requires rtpmap: rtx negotiation."; | 3221 << "Enabling RTX requires rtpmap: rtx negotiation."; |
3215 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) | 3222 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) |
3216 << "Enabling RTP extensions require negotiation."; | 3223 << "Enabling RTP extensions require negotiation."; |
3217 | 3224 |
3218 VerifyEmptyNackConfig(default_receive_config.rtp.nack); | 3225 VerifyEmptyNackConfig(default_receive_config.rtp.nack); |
3219 VerifyEmptyFecConfig(default_receive_config.rtp.fec); | 3226 VerifyEmptyFecConfig(default_receive_config.rtp.fec); |
3220 } | 3227 } |
3221 | 3228 |
3222 } // namespace webrtc | 3229 } // namespace webrtc |
OLD | NEW |