Fix RateTracker to set an initial reference time when first updated.

BUG=4442
R=mflodman@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43829004

Cr-Commit-Position: refs/heads/master@{#8751}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8751 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
perkj@webrtc.org
2015-03-17 12:45:15 +00:00
parent e155dbeae9
commit a78a94e838
3 changed files with 14 additions and 17 deletions

View File

@@ -844,17 +844,6 @@ class VideoMediaChannelTest : public testing::Test,
EXPECT_TRUE(WaitAndSendFrame(1000 / fps));
EXPECT_FRAME_WAIT(frame + i * fps, codec.width, codec.height, kTimeout);
}
cricket::VideoMediaInfo info;
EXPECT_TRUE(channel_->GetStats(&info));
// For webrtc, |framerate_sent| and |framerate_rcvd| depend on periodic
// callbacks (1 sec).
// Received |fraction_lost| and |packets_lost| are from sent RTCP packet.
// One sent packet needed (sent about once per second).
// |framerate_input|, |framerate_decoded| and |framerate_output| are using
// RateTracker. RateTracker needs to be called twice (with >1 second in
// b/w calls) before a framerate is calculated.
// Therefore insert frames (and call GetStats each sec) for a few seconds
// before testing stats.
}
rtc::scoped_ptr<const rtc::Buffer> p(GetRtpPacket(0));
EXPECT_EQ(codec.id, GetPayloadType(p.get()));