Fixes a bug where the render buffer size (and indirectly the non-continuous duration) was computed incorrectly.
BUG=1769 R=mflodman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1473004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4026 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -263,6 +263,41 @@ TEST_F(TestVCMReceiver, NonDecodableDuration_NoTrigger) {
|
||||
EXPECT_EQ(kNackOk, ret);
|
||||
}
|
||||
|
||||
TEST_F(TestVCMReceiver, NonDecodableDuration_NoTrigger2) {
|
||||
// Enable NACK and with no RTT thresholds for disabling retransmission delay.
|
||||
receiver_.SetNackMode(kNack, -1, -1);
|
||||
const size_t kMaxNackListSize = 1000;
|
||||
const int kMaxPacketAgeToNack = 1000;
|
||||
const int kMaxNonDecodableDuration = 500;
|
||||
const int kMaxNonDecodableDurationFrames = (kDefaultFrameRate *
|
||||
kMaxNonDecodableDuration + 500) / 1000;
|
||||
const int kMinDelayMs = 500;
|
||||
receiver_.SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack,
|
||||
kMaxNonDecodableDuration);
|
||||
receiver_.SetMinReceiverDelay(kMinDelayMs);
|
||||
int64_t key_frame_inserted = clock_->TimeInMilliseconds();
|
||||
EXPECT_GE(InsertFrame(kVideoFrameKey, true), kNoError);
|
||||
// Insert enough frames to have too long non-decodable sequence, except that
|
||||
// we don't have any losses.
|
||||
for (int i = 0; i < kMaxNonDecodableDurationFrames;
|
||||
++i) {
|
||||
EXPECT_GE(InsertFrame(kVideoFrameDelta, true), kNoError);
|
||||
}
|
||||
// Insert an incomplete frame.
|
||||
EXPECT_GE(InsertFrame(kVideoFrameDelta, false), kNoError);
|
||||
// Advance time until it's time to decode the key frame.
|
||||
clock_->AdvanceTimeMilliseconds(kMinDelayMs - clock_->TimeInMilliseconds() -
|
||||
key_frame_inserted);
|
||||
EXPECT_TRUE(DecodeNextFrame());
|
||||
// Make sure we don't get a key frame request since the non-decodable duration
|
||||
// is only one frame.
|
||||
uint16_t nack_list[kMaxNackListSize];
|
||||
uint16_t nack_list_length = 0;
|
||||
VCMNackStatus ret = receiver_.NackList(nack_list, kMaxNackListSize,
|
||||
&nack_list_length);
|
||||
EXPECT_EQ(kNackOk, ret);
|
||||
}
|
||||
|
||||
TEST_F(TestVCMReceiver, NonDecodableDuration_KeyFrameAfterIncompleteFrames) {
|
||||
// Enable NACK and with no RTT thresholds for disabling retransmission delay.
|
||||
receiver_.SetNackMode(kNack, -1, -1);
|
||||
|
||||
Reference in New Issue
Block a user