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

Unified Diff: webrtc/video/call_perf_tests.cc

Issue 1247293002: Add support for transport wide sequence numbers (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase, again Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/audio_receive_stream.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/call_perf_tests.cc
diff --git a/webrtc/video/call_perf_tests.cc b/webrtc/video/call_perf_tests.cc
index fd159f54cb4ff6e2e49edea4c08858aacd759b18..cf65ea0f859758c1fdccc273507815ddda349f97 100644
--- a/webrtc/video/call_perf_tests.cc
+++ b/webrtc/video/call_perf_tests.cc
@@ -528,6 +528,7 @@ void CallPerfTest::TestMinTransmitBitrate(bool pad_to_min_bitrate) {
static const int kMinAcceptableTransmitBitrate = 130;
static const int kMaxAcceptableTransmitBitrate = 170;
static const int kNumBitrateObservationsInRange = 100;
+ static const int kAcceptableBitrateErrorMargin = 15; // +- 7
class BitrateObserver : public test::EndToEndTest, public PacketReceiver {
public:
explicit BitrateObserver(bool using_min_transmit_bitrate)
@@ -567,8 +568,10 @@ void CallPerfTest::TestMinTransmitBitrate(bool pad_to_min_bitrate) {
}
} else {
// Expect bitrate stats to roughly match the max encode bitrate.
- if (bitrate_kbps > kMaxEncodeBitrateKbps - 5 &&
- bitrate_kbps < kMaxEncodeBitrateKbps + 5) {
+ if (bitrate_kbps > (kMaxEncodeBitrateKbps -
+ kAcceptableBitrateErrorMargin / 2) &&
+ bitrate_kbps < (kMaxEncodeBitrateKbps +
+ kAcceptableBitrateErrorMargin / 2)) {
++num_bitrate_observations_in_range_;
}
}
@@ -629,7 +632,9 @@ TEST_F(CallPerfTest, KeepsHighBitrateWhenReconfiguringSender) {
: EndToEndTest(kDefaultTimeoutMs),
FakeEncoder(Clock::GetRealTimeClock()),
time_to_reconfigure_(webrtc::EventWrapper::Create()),
- encoder_inits_(0) {}
+ encoder_inits_(0),
+ last_set_bitrate_(0),
+ send_stream_(nullptr) {}
int32_t InitEncode(const VideoCodec* config,
int32_t number_of_cores,
« no previous file with comments | « webrtc/video/audio_receive_stream.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698