Wire up VCMTiming in FrameBuffer2.
The VCMTiming class is now used to set the render time for frames. BUG=webrtc:5514 R=stefan@webrtc.org Review URL: https://codereview.webrtc.org/2138873003 . Cr-Commit-Position: refs/heads/master@{#13621}
This commit is contained in:
@ -70,6 +70,7 @@ class VCMJitterEstimatorMock : public VCMJitterEstimator {
|
||||
void(int64_t frameDelayMs,
|
||||
uint32_t frameSizeBytes,
|
||||
bool incompleteFrame));
|
||||
MOCK_METHOD1(GetJitterEstimate, int(double rttMultiplier));
|
||||
};
|
||||
|
||||
class FrameObjectFake : public FrameObject {
|
||||
@ -178,7 +179,7 @@ class TestFrameBuffer2 : public ::testing::Test {
|
||||
|
||||
SimulatedClock clock_;
|
||||
VCMTimingFake timing_;
|
||||
VCMJitterEstimatorMock jitter_estimator_;
|
||||
::testing::NiceMock<VCMJitterEstimatorMock> jitter_estimator_;
|
||||
FrameBuffer buffer_;
|
||||
std::vector<std::unique_ptr<FrameObject>> frames_;
|
||||
Random rand_;
|
||||
@ -336,5 +337,19 @@ TEST_F(TestFrameBuffer2, InsertLateFrame) {
|
||||
CheckNoFrame(2);
|
||||
}
|
||||
|
||||
TEST_F(TestFrameBuffer2, ProtectionMode) {
|
||||
uint16_t pid = Rand();
|
||||
uint32_t ts = Rand();
|
||||
|
||||
EXPECT_CALL(jitter_estimator_, GetJitterEstimate(1.0));
|
||||
InsertFrame(pid, 0, ts, false);
|
||||
ExtractFrame();
|
||||
|
||||
buffer_.SetProtectionMode(kProtectionNackFEC);
|
||||
EXPECT_CALL(jitter_estimator_, GetJitterEstimate(0.0));
|
||||
InsertFrame(pid + 1, 0, ts, false);
|
||||
ExtractFrame();
|
||||
}
|
||||
|
||||
} // namespace video_coding
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user