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

Unified Diff: webrtc/media/engine/webrtcvideoframe_unittest.cc

Issue 2306953002: Revert of Delete cricket::VideoFrame::GetTimeStamp. (Closed)
Patch Set: Created 4 years, 3 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
Index: webrtc/media/engine/webrtcvideoframe_unittest.cc
diff --git a/webrtc/media/engine/webrtcvideoframe_unittest.cc b/webrtc/media/engine/webrtcvideoframe_unittest.cc
index 3743e8789958d3c07e46216fa1f43055b7d375ca..37153bb47b84c2d62565e5f185dad18f7a441afc 100644
--- a/webrtc/media/engine/webrtcvideoframe_unittest.cc
+++ b/webrtc/media/engine/webrtcvideoframe_unittest.cc
@@ -186,13 +186,15 @@
webrtc::NativeHandleBuffer* buffer =
new rtc::RefCountedObject<webrtc::test::FakeNativeHandleBuffer>(
dummy_handle, 640, 480);
-
- WebRtcVideoFrame frame(buffer, webrtc::kVideoRotation_0, 20);
+ // Timestamp is converted from ns to us, so last three digits are lost.
+ WebRtcVideoFrame frame(buffer, 20000, webrtc::kVideoRotation_0);
EXPECT_EQ(dummy_handle, frame.video_frame_buffer()->native_handle());
EXPECT_EQ(640, frame.width());
EXPECT_EQ(480, frame.height());
+ EXPECT_EQ(20000, frame.GetTimeStamp());
EXPECT_EQ(20, frame.timestamp_us());
frame.set_timestamp_us(40);
+ EXPECT_EQ(40000, frame.GetTimeStamp());
EXPECT_EQ(40, frame.timestamp_us());
}
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/sdk/objc/Framework/Classes/RTCVideoRendererAdapter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698