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 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 for (size_t i = 0; i < receive_streams_.size(); ++i) { | 2332 for (size_t i = 0; i < receive_streams_.size(); ++i) { |
2333 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats(); | 2333 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats(); |
2334 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc); | 2334 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc); |
2335 | 2335 |
2336 // Make sure all fields have been populated. | 2336 // Make sure all fields have been populated. |
2337 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are | 2337 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are |
2338 // always filled for all receivers. | 2338 // always filled for all receivers. |
2339 receive_stats_filled_["IncomingRate"] |= | 2339 receive_stats_filled_["IncomingRate"] |= |
2340 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0; | 2340 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0; |
2341 | 2341 |
| 2342 send_stats_filled_["DecoderImplementationName"] |= |
| 2343 stats.decoder_implementation_name == |
| 2344 test::FakeDecoder::kImplementationName; |
2342 receive_stats_filled_["RenderDelayAsHighAsExpected"] |= | 2345 receive_stats_filled_["RenderDelayAsHighAsExpected"] |= |
2343 stats.render_delay_ms >= kExpectedRenderDelayMs; | 2346 stats.render_delay_ms >= kExpectedRenderDelayMs; |
2344 | 2347 |
2345 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0; | 2348 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0; |
2346 | 2349 |
2347 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0; | 2350 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0; |
2348 | 2351 |
2349 receive_stats_filled_["StatisticsUpdated"] |= | 2352 receive_stats_filled_["StatisticsUpdated"] |= |
2350 stats.rtcp_stats.cumulative_lost != 0 || | 2353 stats.rtcp_stats.cumulative_lost != 0 || |
2351 stats.rtcp_stats.extended_max_sequence_number != 0 || | 2354 stats.rtcp_stats.extended_max_sequence_number != 0 || |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 bool CheckSendStats() { | 2390 bool CheckSendStats() { |
2388 RTC_DCHECK(send_stream_ != nullptr); | 2391 RTC_DCHECK(send_stream_ != nullptr); |
2389 VideoSendStream::Stats stats = send_stream_->GetStats(); | 2392 VideoSendStream::Stats stats = send_stream_->GetStats(); |
2390 | 2393 |
2391 send_stats_filled_["NumStreams"] |= | 2394 send_stats_filled_["NumStreams"] |= |
2392 stats.substreams.size() == expected_send_ssrcs_.size(); | 2395 stats.substreams.size() == expected_send_ssrcs_.size(); |
2393 | 2396 |
2394 send_stats_filled_["CpuOveruseMetrics"] |= | 2397 send_stats_filled_["CpuOveruseMetrics"] |= |
2395 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; | 2398 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; |
2396 | 2399 |
| 2400 send_stats_filled_["EncoderImplementationName"] |= |
| 2401 stats.encoder_implementation_name == |
| 2402 test::FakeEncoder::kImplementationName; |
| 2403 |
2397 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = | 2404 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = |
2398 stats.substreams.begin(); | 2405 stats.substreams.begin(); |
2399 it != stats.substreams.end(); ++it) { | 2406 it != stats.substreams.end(); ++it) { |
2400 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != | 2407 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != |
2401 expected_send_ssrcs_.end()); | 2408 expected_send_ssrcs_.end()); |
2402 | 2409 |
2403 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= | 2410 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= |
2404 stats.input_frame_rate != 0; | 2411 stats.input_frame_rate != 0; |
2405 | 2412 |
2406 const VideoSendStream::StreamStats& stream_stats = it->second; | 2413 const VideoSendStream::StreamStats& stream_stats = it->second; |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3164 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) | 3171 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) |
3165 << "Enabling RTX requires rtpmap: rtx negotiation."; | 3172 << "Enabling RTX requires rtpmap: rtx negotiation."; |
3166 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) | 3173 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) |
3167 << "Enabling RTP extensions require negotiation."; | 3174 << "Enabling RTP extensions require negotiation."; |
3168 | 3175 |
3169 VerifyEmptyNackConfig(default_receive_config.rtp.nack); | 3176 VerifyEmptyNackConfig(default_receive_config.rtp.nack); |
3170 VerifyEmptyFecConfig(default_receive_config.rtp.fec); | 3177 VerifyEmptyFecConfig(default_receive_config.rtp.fec); |
3171 } | 3178 } |
3172 | 3179 |
3173 } // namespace webrtc | 3180 } // namespace webrtc |
OLD | NEW |