Index: webrtc/video/end_to_end_tests.cc |
diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc |
index 21a6654a833a88398fe886aafcafba737b3b9b3a..8e3105f7411d9af37012cb7ea6635ef7edf4b79a 100644 |
--- a/webrtc/video/end_to_end_tests.cc |
+++ b/webrtc/video/end_to_end_tests.cc |
@@ -26,7 +26,6 @@ |
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
#include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h" |
-#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
#include "webrtc/modules/video_coding/codecs/h264/include/h264.h" |
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" |
#include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" |
@@ -1528,8 +1527,7 @@ |
: EndToEndTest(::webrtc::EndToEndTest::kDefaultTimeoutMs), |
feedback_enabled_(feedback_enabled), |
num_video_streams_(num_video_streams), |
- num_audio_streams_(num_audio_streams), |
- receiver_call_(nullptr) { |
+ num_audio_streams_(num_audio_streams) { |
// Only one stream of each supported for now. |
EXPECT_LE(num_video_streams, 1u); |
EXPECT_LE(num_audio_streams, 1u); |
@@ -2541,16 +2539,6 @@ |
private: |
Action OnSendRtp(const uint8_t* packet, size_t length) override { |
- // Drop every 25th packet => 4% loss. |
- static const int kPacketLossFrac = 25; |
- RTPHeader header; |
- RtpUtility::RtpHeaderParser parser(packet, length); |
- if (parser.Parse(&header) && |
- expected_send_ssrcs_.find(header.ssrc) != |
- expected_send_ssrcs_.end() && |
- header.sequenceNumber % kPacketLossFrac == 0) { |
- return DROP_PACKET; |
- } |
check_stats_event_.Set(); |
return SEND_PACKET; |
} |
@@ -2651,8 +2639,8 @@ |
for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = |
stats.substreams.begin(); |
it != stats.substreams.end(); ++it) { |
- if (expected_send_ssrcs_.find(it->first) == expected_send_ssrcs_.end()) |
- continue; // Probably RTX. |
+ EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != |
+ expected_send_ssrcs_.end()); |
send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= |
stats.input_frame_rate != 0; |
@@ -2670,13 +2658,9 @@ |
stream_stats.rtp_stats.retransmitted.packets != 0 || |
stream_stats.rtp_stats.transmitted.packets != 0; |
- send_stats_filled_[CompoundKey("BitrateStatisticsObserver.Total", |
+ send_stats_filled_[CompoundKey("BitrateStatisticsObserver", |
it->first)] |= |
stream_stats.total_bitrate_bps != 0; |
- |
- send_stats_filled_[CompoundKey("BitrateStatisticsObserver.Retransmit", |
- it->first)] |= |
- stream_stats.retransmit_bitrate_bps != 0; |
send_stats_filled_[CompoundKey("FrameCountObserver", it->first)] |= |
stream_stats.frame_counts.delta_frames != 0 || |
@@ -2708,8 +2692,10 @@ |
} |
bool AllStatsFilled(const std::map<std::string, bool>& stats_map) { |
- for (const auto& stat : stats_map) { |
- if (!stat.second) |
+ for (std::map<std::string, bool>::const_iterator it = stats_map.begin(); |
+ it != stats_map.end(); |
+ ++it) { |
+ if (!it->second) |
return false; |
} |
return true; |
@@ -2732,17 +2718,8 @@ |
VideoSendStream::Config* send_config, |
std::vector<VideoReceiveStream::Config>* receive_configs, |
VideoEncoderConfig* encoder_config) override { |
- // Set low rates to avoid waiting for rampup. |
- for (size_t i = 0; i < encoder_config->streams.size(); ++i) { |
- encoder_config->streams[i].min_bitrate_bps = 10000; |
- encoder_config->streams[i].target_bitrate_bps = 15000; |
- encoder_config->streams[i].max_bitrate_bps = 20000; |
- } |
send_config->pre_encode_callback = this; // Used to inject delay. |
expected_cname_ = send_config->rtp.c_name = "SomeCName"; |
- |
- send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
- send_config->rtp.rtx.payload_type = kSendRtxPayloadType; |
const std::vector<uint32_t>& ssrcs = send_config->rtp.ssrcs; |
for (size_t i = 0; i < ssrcs.size(); ++i) { |
@@ -2751,17 +2728,7 @@ |
(*receive_configs)[i].rtp.remote_ssrc); |
(*receive_configs)[i].render_delay_ms = kExpectedRenderDelayMs; |
(*receive_configs)[i].renderer = &receive_stream_renderer_; |
- (*receive_configs)[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; |
- |
- (*receive_configs)[i].rtp.rtx[kFakeVideoSendPayloadType].ssrc = |
- kSendRtxSsrcs[i]; |
- (*receive_configs)[i].rtp.rtx[kFakeVideoSendPayloadType].payload_type = |
- kSendRtxPayloadType; |
- } |
- |
- for (size_t i = 0; i < kNumSsrcs; ++i) |
- send_config->rtp.rtx.ssrcs.push_back(kSendRtxSsrcs[i]); |
- |
+ } |
// Use a delayed encoder to make sure we see CpuOveruseMetrics stats that |
// are non-zero. |
send_config->encoder_settings.encoder = &encoder_; |