Verify output frame timestamp in VideoProcessingModuleTest.Resampler.
TEST=unit tests BUG=1069 Review URL: https://webrtc-codereview.appspot.com/964014 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3063 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
206532e6e2
commit
2a749d3108
@ -265,6 +265,10 @@ TEST_F(VideoProcessingModuleTest, Resampler)
|
||||
// initiate test timer
|
||||
t0 = TickTime::Now();
|
||||
|
||||
// Init the sourceFrame with a timestamp.
|
||||
sourceFrame.set_render_time_ms(t0.MillisecondTimestamp());
|
||||
sourceFrame.set_timestamp(t0.MillisecondTimestamp() * 90);
|
||||
|
||||
// Test scaling to different sizes: source is of |width|/|height| = 352/288.
|
||||
// Scaling mode in VPM is currently fixed to kScaleBox (mode = 3).
|
||||
TestSize(sourceFrame, 100, 50, 3, 24.0, _vpm);
|
||||
@ -309,6 +313,11 @@ void TestSize(const I420VideoFrame& source_frame, int target_width,
|
||||
ASSERT_EQ(VPM_OK, vpm->SetTargetResolution(target_width, target_height, 30));
|
||||
ASSERT_EQ(VPM_OK, vpm->PreprocessFrame(source_frame, &out_frame));
|
||||
|
||||
if (out_frame) {
|
||||
EXPECT_EQ(source_frame.render_time_ms(), out_frame->render_time_ms());
|
||||
EXPECT_EQ(source_frame.timestamp(), out_frame->timestamp());
|
||||
}
|
||||
|
||||
// If the frame was resampled (scale changed) then:
|
||||
// (1) verify the new size and write out processed frame for viewing.
|
||||
// (2) scale the resampled frame (|out_frame|) back to the original size and
|
||||
|
Loading…
x
Reference in New Issue
Block a user