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

Unified Diff: webrtc/video/end_to_end_tests.cc

Issue 1698343003: Ignore padding-only RTX packets in test. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 af2c38b542eef60e34a2cbc7192bc71469dfa202..1c804098e886587182f2e85e2ec4f9582f2dd917 100644
--- a/webrtc/video/end_to_end_tests.cc
+++ b/webrtc/video/end_to_end_tests.cc
@@ -702,9 +702,7 @@ TEST_F(EndToEndTest, DISABLED_ReceivedFecPacketsNotNacked) {
// This test drops second RTP packet with a marker bit set, makes sure it's
// retransmitted and renders. Retransmission SSRCs are also checked.
void EndToEndTest::DecodesRetransmittedFrame(bool enable_rtx, bool enable_red) {
- // Must be set high enough to allow the bitrate probing to finish.
- static const int kMinProbePackets = 100;
- static const int kDroppedFrameNumber = kMinProbePackets + 1;
+ static const int kDroppedFrameNumber = 10;
class RetransmissionObserver : public test::EndToEndTest,
public I420FrameCallback {
public:
@@ -716,7 +714,6 @@ void EndToEndTest::DecodesRetransmittedFrame(bool enable_rtx, bool enable_red) {
retransmission_payload_type_(GetPayloadType(enable_rtx, enable_red)),
encoder_(VideoEncoder::Create(VideoEncoder::EncoderType::kVp8)),
marker_bits_observed_(0),
- num_packets_observed_(0),
retransmitted_timestamp_(0),
frame_retransmitted_(false) {}
@@ -726,14 +723,13 @@ void EndToEndTest::DecodesRetransmittedFrame(bool enable_rtx, bool enable_red) {
RTPHeader header;
EXPECT_TRUE(parser_->Parse(packet, length, &header));
- // We accept some padding or RTX packets in the beginning to enable
- // bitrate probing.
- if (num_packets_observed_++ < kMinProbePackets &&
- header.payloadType != payload_type_) {
- EXPECT_TRUE(retransmission_payload_type_ == header.payloadType ||
- length == header.headerLength + header.paddingLength);
- return SEND_PACKET;
+ // Ignore padding-only packets over RTX.
+ if (header.payloadType != payload_type_) {
+ EXPECT_EQ(retransmission_ssrc_, header.ssrc);
+ if (length == header.headerLength + header.paddingLength)
+ return SEND_PACKET;
}
+
if (header.timestamp == retransmitted_timestamp_) {
EXPECT_EQ(retransmission_ssrc_, header.ssrc);
EXPECT_EQ(retransmission_payload_type_, header.payloadType);
@@ -823,7 +819,6 @@ void EndToEndTest::DecodesRetransmittedFrame(bool enable_rtx, bool enable_red) {
rtc::scoped_ptr<VideoEncoder> encoder_;
const std::string payload_name_;
int marker_bits_observed_;
- int num_packets_observed_;
uint32_t retransmitted_timestamp_ GUARDED_BY(&crit_);
bool frame_retransmitted_;
} test(enable_rtx, enable_red);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698