From 09eabcb4fbf78aa8eb817c2b566b8984a199f965 Mon Sep 17 00:00:00 2001 From: "niklas.enbom" Date: Wed, 13 Apr 2016 10:45:47 -0700 Subject: [PATCH] Revert of Use microsecond timestamp in cricket::VideoFrame. (patchset #13 id:240001 of https://codereview.webrtc.org/1865283002/ ) Reason for revert: This CL breaks Chrome FYI bots compile: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/4942/steps/compile/logs/stdio Original issue's description: > Use microsecond timestamp in cricket::VideoFrame. > > BUG=webrtc:5740 > > Committed: https://crrev.com/f30ba114bb33dd1d8643bc640dda2e0c86dbbd32 > Cr-Commit-Position: refs/heads/master@{#12348} TBR=perkj@webrtc.org,pbos@webrtc.org,nisse@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:5740 Review URL: https://codereview.webrtc.org/1884863004 Cr-Commit-Position: refs/heads/master@{#12350} --- webrtc/media/base/fakevideocapturer.h | 6 +-- webrtc/media/base/videobroadcaster.cc | 8 +-- .../media/base/videobroadcaster_unittest.cc | 12 ++--- webrtc/media/base/videoframe.h | 20 ++----- webrtc/media/engine/webrtcvideoengine2.cc | 16 +++--- webrtc/media/engine/webrtcvideoengine2.h | 2 +- .../engine/webrtcvideoengine2_unittest.cc | 6 +-- webrtc/media/engine/webrtcvideoframe.cc | 53 ++++++++----------- webrtc/media/engine/webrtcvideoframe.h | 39 +++++--------- .../media/engine/webrtcvideoframe_unittest.cc | 21 +++----- .../webrtcvideoframefactory_unittest.cc | 2 +- 11 files changed, 72 insertions(+), 113 deletions(-) diff --git a/webrtc/media/base/fakevideocapturer.h b/webrtc/media/base/fakevideocapturer.h index 026bf80a7b..89dcf652f1 100644 --- a/webrtc/media/base/fakevideocapturer.h +++ b/webrtc/media/base/fakevideocapturer.h @@ -31,7 +31,7 @@ class FakeVideoCapturer : public cricket::VideoCapturer { public: FakeVideoCapturer(bool is_screencast) : running_(false), - initial_timestamp_(rtc::TimeNanos()), + initial_unix_timestamp_(time(NULL) * rtc::kNumNanosecsPerSec), next_timestamp_(rtc::kNumNanosecsPerMillisec), is_screencast_(is_screencast), rotation_(webrtc::kVideoRotation_0) { @@ -99,7 +99,7 @@ class FakeVideoCapturer : public cricket::VideoCapturer { frame.height = height; frame.fourcc = fourcc; frame.data_size = size; - frame.time_stamp = initial_timestamp_ + next_timestamp_; + frame.time_stamp = initial_unix_timestamp_ + next_timestamp_; next_timestamp_ += timestamp_interval; std::unique_ptr data(new char[size]); @@ -153,7 +153,7 @@ class FakeVideoCapturer : public cricket::VideoCapturer { private: bool running_; - int64_t initial_timestamp_; + int64_t initial_unix_timestamp_; int64_t next_timestamp_; const bool is_screencast_; webrtc::VideoRotation rotation_; diff --git a/webrtc/media/base/videobroadcaster.cc b/webrtc/media/base/videobroadcaster.cc index 18c38b731d..c9a2d99ab5 100644 --- a/webrtc/media/base/videobroadcaster.cc +++ b/webrtc/media/base/videobroadcaster.cc @@ -99,13 +99,13 @@ const cricket::VideoFrame& VideoBroadcaster::GetBlackFrame( if (black_frame_ && black_frame_->width() == frame.width() && black_frame_->height() == frame.height() && black_frame_->rotation() == frame.rotation()) { - black_frame_->set_timestamp_us(frame.timestamp_us()); + black_frame_->SetTimeStamp(frame.GetTimeStamp()); return *black_frame_; } black_frame_.reset(new cricket::WebRtcVideoFrame( - new rtc::RefCountedObject(frame.width(), - frame.height()), - frame.rotation(), frame.timestamp_us())); + new rtc::RefCountedObject( + frame.width(), frame.height()), + frame.GetTimeStamp(), frame.rotation())); black_frame_->SetToBlack(); return *black_frame_; } diff --git a/webrtc/media/base/videobroadcaster_unittest.cc b/webrtc/media/base/videobroadcaster_unittest.cc index 0299d0ee36..c6a4df0e66 100644 --- a/webrtc/media/base/videobroadcaster_unittest.cc +++ b/webrtc/media/base/videobroadcaster_unittest.cc @@ -135,14 +135,14 @@ TEST(VideoBroadcasterTest, SinkWantsBlackFrames) { broadcaster.AddOrUpdateSink(&sink2, wants2); cricket::WebRtcVideoFrame frame1; - frame1.InitToBlack(100, 200, 10000 /*ts*/); + frame1.InitToBlack(100, 200, 10 /*ts*/); // Make it not all-black frame1.GetUPlane()[0] = 0; broadcaster.OnFrame(frame1); EXPECT_TRUE(sink1.black_frame()); - EXPECT_EQ(10000, sink1.timestamp()); + EXPECT_EQ(10, sink1.timestamp()); EXPECT_FALSE(sink2.black_frame()); - EXPECT_EQ(10000, sink2.timestamp()); + EXPECT_EQ(10, sink2.timestamp()); // Switch the sink wants. wants1.black_frames = false; @@ -151,12 +151,12 @@ TEST(VideoBroadcasterTest, SinkWantsBlackFrames) { broadcaster.AddOrUpdateSink(&sink2, wants2); cricket::WebRtcVideoFrame frame2; - frame2.InitToBlack(100, 200, 30000 /*ts*/); + frame2.InitToBlack(100, 200, 30 /*ts*/); // Make it not all-black frame2.GetUPlane()[0] = 0; broadcaster.OnFrame(frame2); EXPECT_FALSE(sink1.black_frame()); - EXPECT_EQ(30000, sink1.timestamp()); + EXPECT_EQ(30, sink1.timestamp()); EXPECT_TRUE(sink2.black_frame()); - EXPECT_EQ(30000, sink2.timestamp()); + EXPECT_EQ(30, sink2.timestamp()); } diff --git a/webrtc/media/base/videoframe.h b/webrtc/media/base/videoframe.h index 9e0fbfd6d4..d1ae9d7bb8 100644 --- a/webrtc/media/base/videoframe.h +++ b/webrtc/media/base/videoframe.h @@ -57,19 +57,8 @@ class VideoFrame { virtual rtc::scoped_refptr video_frame_buffer() const = 0; - // System monotonic clock, same timebase as rtc::TimeMicros(). - virtual int64_t timestamp_us() const = 0; - virtual void set_timestamp_us(int64_t time_us) = 0; - - // Deprecated methods, for backwards compatibility. - // TODO(nisse): Delete when usage in Chrome and other applications - // have been replaced. - virtual int64_t GetTimeStamp() const { - return rtc::kNumNanosecsPerMicrosec * timestamp_us(); - } - virtual void SetTimeStamp(int64_t time_ns) { - set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); - } + virtual int64_t GetTimeStamp() const = 0; + virtual void SetTimeStamp(int64_t time_stamp) = 0; // Indicates the rotation angle in degrees. virtual webrtc::VideoRotation rotation() const = 0; @@ -148,9 +137,8 @@ class VideoFrame { int32_t dst_pitch_v) const; // Creates an empty frame. - virtual VideoFrame* CreateEmptyFrame(int w, - int h, - int64_t timestamp_us) const = 0; + virtual VideoFrame *CreateEmptyFrame(int w, int h, + int64_t time_stamp) const = 0; virtual void set_rotation(webrtc::VideoRotation rotation) = 0; }; diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc index 4914d9f51d..bafa79d7b1 100644 --- a/webrtc/media/engine/webrtcvideoengine2.cc +++ b/webrtc/media/engine/webrtcvideoengine2.cc @@ -1511,6 +1511,7 @@ WebRtcVideoChannel2::WebRtcVideoSendStream::WebRtcVideoSendStream( pending_encoder_reconfiguration_(false), allocated_encoder_(nullptr, webrtc::kVideoCodecUnknown, false), sending_(false), + first_frame_timestamp_ms_(0), last_frame_timestamp_ms_(0) { parameters_.config.rtp.max_packet_size = kVideoMtu; parameters_.conference_mode = send_params.conference_mode; @@ -1569,15 +1570,12 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame( } int64_t frame_delta_ms = frame.GetTimeStamp() / rtc::kNumNanosecsPerMillisec; - // frame->GetTimeStamp() is essentially a delta, align to webrtc time - if (!first_frame_timestamp_ms_) { - first_frame_timestamp_ms_ = - rtc::Optional(rtc::Time() - frame_delta_ms); + if (first_frame_timestamp_ms_ == 0) { + first_frame_timestamp_ms_ = rtc::Time() - frame_delta_ms; } - last_frame_timestamp_ms_ = *first_frame_timestamp_ms_ + frame_delta_ms; - + last_frame_timestamp_ms_ = first_frame_timestamp_ms_ + frame_delta_ms; video_frame.set_render_time_ms(last_frame_timestamp_ms_); // Reconfigure codec if necessary. SetDimensions(video_frame.width(), video_frame.height()); @@ -1607,7 +1605,7 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::SetSource( // Reset timestamps to realign new incoming frames to a webrtc timestamp. A // new capturer may have a different timestamp delta than the previous one. - first_frame_timestamp_ms_ = rtc::Optional(); + first_frame_timestamp_ms_ = 0; if (source == NULL) { if (stream_ != NULL) { @@ -2391,8 +2389,8 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::OnFrame( last_height_ = frame.height(); const WebRtcVideoFrame render_frame( - frame.video_frame_buffer(), frame.rotation(), - frame.render_time_ms() * rtc::kNumNanosecsPerMicrosec); + frame.video_frame_buffer(), + frame.render_time_ms() * rtc::kNumNanosecsPerMillisec, frame.rotation()); sink_->OnFrame(render_frame); } diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h index 438953b9af..b9ab0b71ed 100644 --- a/webrtc/media/engine/webrtcvideoengine2.h +++ b/webrtc/media/engine/webrtcvideoengine2.h @@ -395,7 +395,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { // The timestamp of the first frame received // Used to generate the timestamps of subsequent frames - rtc::Optional first_frame_timestamp_ms_ GUARDED_BY(lock_); + int64_t first_frame_timestamp_ms_ GUARDED_BY(lock_); // The timestamp of the last frame received // Used to generate timestamp for the black frame when source is removed diff --git a/webrtc/media/engine/webrtcvideoengine2_unittest.cc b/webrtc/media/engine/webrtcvideoengine2_unittest.cc index d765f8232e..c0bb461d13 100644 --- a/webrtc/media/engine/webrtcvideoengine2_unittest.cc +++ b/webrtc/media/engine/webrtcvideoengine2_unittest.cc @@ -512,8 +512,8 @@ TEST_F(WebRtcVideoEngine2Test, std::unique_ptr data(new char[frame.data_size]); frame.data = data.get(); memset(frame.data, 1, frame.data_size); - int64_t initial_timestamp = rtc::TimeNanos(); - frame.time_stamp = initial_timestamp; + const int kInitialTimestamp = 123456; + frame.time_stamp = kInitialTimestamp; // Deliver initial frame. capturer1.SignalCapturedFrame(&frame); @@ -531,7 +531,7 @@ TEST_F(WebRtcVideoEngine2Test, rtc::Thread::Current()->SleepMs(1); // Deliver with a timestamp (10 seconds) before the previous initial one, // these should not be related at all anymore and it should still work fine. - frame.time_stamp = initial_timestamp - 10 * rtc::kNumNanosecsPerSec; + frame.time_stamp = kInitialTimestamp - 10000; capturer2.SignalCapturedFrame(&frame); // New timestamp should be at least 1ms in the future and not old. diff --git a/webrtc/media/engine/webrtcvideoframe.cc b/webrtc/media/engine/webrtcvideoframe.cc index 9c18235bb6..b7d87a5bde 100644 --- a/webrtc/media/engine/webrtcvideoframe.cc +++ b/webrtc/media/engine/webrtcvideoframe.cc @@ -22,24 +22,18 @@ using webrtc::kVPlane; namespace cricket { -WebRtcVideoFrame::WebRtcVideoFrame() - : timestamp_us_(0), rotation_(webrtc::kVideoRotation_0) {} - -WebRtcVideoFrame::WebRtcVideoFrame( - const rtc::scoped_refptr& buffer, - webrtc::VideoRotation rotation, - int64_t timestamp_us) - : video_frame_buffer_(buffer), - timestamp_us_(timestamp_us), - rotation_(rotation) {} +WebRtcVideoFrame::WebRtcVideoFrame(): + time_stamp_ns_(0), + rotation_(webrtc::kVideoRotation_0) {} WebRtcVideoFrame::WebRtcVideoFrame( const rtc::scoped_refptr& buffer, int64_t time_stamp_ns, webrtc::VideoRotation rotation) - : WebRtcVideoFrame(buffer, - rotation, - time_stamp_ns / rtc::kNumNanosecsPerMicrosec) {} + : video_frame_buffer_(buffer), + time_stamp_ns_(time_stamp_ns), + rotation_(rotation) { +} WebRtcVideoFrame::~WebRtcVideoFrame() {} @@ -53,7 +47,7 @@ bool WebRtcVideoFrame::Init(uint32_t format, int64_t time_stamp_ns, webrtc::VideoRotation rotation) { return Reset(format, w, h, dw, dh, sample, sample_size, - time_stamp_ns / rtc::kNumNanosecsPerMicrosec, rotation, + time_stamp_ns, rotation, true /*apply_rotation*/); } @@ -61,7 +55,7 @@ bool WebRtcVideoFrame::Init(const CapturedFrame* frame, int dw, int dh, bool apply_rotation) { return Reset(frame->fourcc, frame->width, frame->height, dw, dh, static_cast(frame->data), frame->data_size, - frame->time_stamp / rtc::kNumNanosecsPerMicrosec, + frame->time_stamp, frame->rotation, apply_rotation); } @@ -132,7 +126,9 @@ WebRtcVideoFrame::video_frame_buffer() const { } VideoFrame* WebRtcVideoFrame::Copy() const { - return new WebRtcVideoFrame(video_frame_buffer_, rotation_, timestamp_us_); + WebRtcVideoFrame* new_frame = new WebRtcVideoFrame( + video_frame_buffer_, time_stamp_ns_, rotation_); + return new_frame; } size_t WebRtcVideoFrame::ConvertToRgbBuffer(uint32_t to_fourcc, @@ -151,7 +147,7 @@ bool WebRtcVideoFrame::Reset(uint32_t format, int dh, uint8_t* sample, size_t sample_size, - int64_t timestamp_us, + int64_t time_stamp_ns, webrtc::VideoRotation rotation, bool apply_rotation) { if (!Validate(format, w, h, sample, sample_size)) { @@ -170,7 +166,8 @@ bool WebRtcVideoFrame::Reset(uint32_t format, new_height = dw; } - InitToEmptyBuffer(new_width, new_height); + InitToEmptyBuffer(new_width, new_height, + time_stamp_ns); rotation_ = apply_rotation ? webrtc::kVideoRotation_0 : rotation; int horiz_crop = ((w - dw) / 2) & ~1; @@ -195,27 +192,21 @@ bool WebRtcVideoFrame::Reset(uint32_t format, << " return code : " << r; return false; } - timestamp_us_ = timestamp_us; return true; } -VideoFrame* WebRtcVideoFrame::CreateEmptyFrame(int w, - int h, - int64_t timestamp_us) const { +VideoFrame* WebRtcVideoFrame::CreateEmptyFrame( + int w, int h, + int64_t time_stamp_ns) const { WebRtcVideoFrame* frame = new WebRtcVideoFrame(); - frame->InitToEmptyBuffer(w, h, rtc::kNumNanosecsPerMicrosec * timestamp_us); + frame->InitToEmptyBuffer(w, h, time_stamp_ns); return frame; } -void WebRtcVideoFrame::InitToEmptyBuffer(int w, int h) { - video_frame_buffer_ = new rtc::RefCountedObject(w, h); - rotation_ = webrtc::kVideoRotation_0; -} - void WebRtcVideoFrame::InitToEmptyBuffer(int w, int h, int64_t time_stamp_ns) { video_frame_buffer_ = new rtc::RefCountedObject(w, h); - SetTimeStamp(time_stamp_ns); + time_stamp_ns_ = time_stamp_ns; rotation_ = webrtc::kVideoRotation_0; } @@ -246,8 +237,8 @@ const VideoFrame* WebRtcVideoFrame::GetCopyWithRotationApplied() const { rotated_height = orig_width; } - rotated_frame_.reset( - CreateEmptyFrame(rotated_width, rotated_height, timestamp_us_)); + rotated_frame_.reset(CreateEmptyFrame(rotated_width, rotated_height, + GetTimeStamp())); // TODO(guoweis): Add a function in webrtc_libyuv.cc to convert from // VideoRotation to libyuv::RotationMode. diff --git a/webrtc/media/engine/webrtcvideoframe.h b/webrtc/media/engine/webrtcvideoframe.h index 7a7dc57c21..0e1d8099bc 100644 --- a/webrtc/media/engine/webrtcvideoframe.h +++ b/webrtc/media/engine/webrtcvideoframe.h @@ -27,13 +27,6 @@ struct CapturedFrame; class WebRtcVideoFrame : public VideoFrame { public: WebRtcVideoFrame(); - - // Preferred construction, with microsecond timestamp. - WebRtcVideoFrame(const rtc::scoped_refptr& buffer, - webrtc::VideoRotation rotation, - int64_t timestamp_us); - - // TODO(nisse): Deprecate/delete. WebRtcVideoFrame(const rtc::scoped_refptr& buffer, int64_t time_stamp_ns, webrtc::VideoRotation rotation); @@ -54,13 +47,8 @@ class WebRtcVideoFrame : public VideoFrame { int64_t time_stamp_ns, webrtc::VideoRotation rotation); - // The timestamp of the captured frame is expected to use the same - // timescale and epoch as rtc::Time. - // TODO(nisse): Consider adding a warning message, or even an RTC_DCHECK, if - // the time is too far off. bool Init(const CapturedFrame* frame, int dw, int dh, bool apply_rotation); - void InitToEmptyBuffer(int w, int h); void InitToEmptyBuffer(int w, int h, int64_t time_stamp_ns); bool InitToBlack(int w, int h, int64_t time_stamp_ns); @@ -81,9 +69,10 @@ class WebRtcVideoFrame : public VideoFrame { rtc::scoped_refptr video_frame_buffer() const override; - /* System monotonic clock */ - int64_t timestamp_us() const override { return timestamp_us_; } - void set_timestamp_us(int64_t time_us) { timestamp_us_ = time_us; }; + int64_t GetTimeStamp() const override { return time_stamp_ns_; } + void SetTimeStamp(int64_t time_stamp_ns) override { + time_stamp_ns_ = time_stamp_ns; + } webrtc::VideoRotation rotation() const override { return rotation_; } @@ -106,15 +95,15 @@ class WebRtcVideoFrame : public VideoFrame { // |dh| is destination height, like |dw|, but must be a positive number. // Returns whether the function succeeded or failed. bool Reset(uint32_t format, - int w, - int h, - int dw, - int dh, - uint8_t* sample, - size_t sample_size, - int64_t timestamp_us, - webrtc::VideoRotation rotation, - bool apply_rotation); + int w, + int h, + int dw, + int dh, + uint8_t* sample, + size_t sample_size, + int64_t time_stamp_ns, + webrtc::VideoRotation rotation, + bool apply_rotation); private: VideoFrame* CreateEmptyFrame(int w, int h, @@ -122,7 +111,7 @@ class WebRtcVideoFrame : public VideoFrame { // An opaque reference counted handle that stores the pixel data. rtc::scoped_refptr video_frame_buffer_; - int64_t timestamp_us_; + int64_t time_stamp_ns_; webrtc::VideoRotation rotation_; // This is mutable as the calculation is expensive but once calculated, it diff --git a/webrtc/media/engine/webrtcvideoframe_unittest.cc b/webrtc/media/engine/webrtcvideoframe_unittest.cc index 7849de61b0..12c8bfe741 100644 --- a/webrtc/media/engine/webrtcvideoframe_unittest.cc +++ b/webrtc/media/engine/webrtcvideoframe_unittest.cc @@ -20,7 +20,6 @@ namespace { class WebRtcVideoTestFrame : public cricket::WebRtcVideoFrame { public: - // The ApplyRotationToFrame test needs this as a public method. using cricket::WebRtcVideoFrame::set_rotation; virtual VideoFrame* CreateEmptyFrame(int w, @@ -48,7 +47,7 @@ class WebRtcVideoFrameTest : public VideoFrameTest { // Build the CapturedFrame. cricket::CapturedFrame captured_frame; captured_frame.fourcc = cricket::FOURCC_I420; - captured_frame.time_stamp = rtc::TimeNanos(); + captured_frame.time_stamp = 5678; captured_frame.rotation = frame_rotation; captured_frame.width = frame_width; captured_frame.height = frame_height; @@ -67,8 +66,7 @@ class WebRtcVideoFrameTest : public VideoFrameTest { apply_rotation)); // Verify the new frame. - EXPECT_EQ(captured_frame.time_stamp / rtc::kNumNanosecsPerMicrosec, - frame.timestamp_us()); + EXPECT_EQ(5678, frame.GetTimeStamp()); if (apply_rotation) EXPECT_EQ(webrtc::kVideoRotation_0, frame.rotation()); else @@ -273,16 +271,13 @@ TEST_F(WebRtcVideoFrameTest, TextureInitialValues) { webrtc::NativeHandleBuffer* buffer = new rtc::RefCountedObject( dummy_handle, 640, 480); - // Timestamp is converted from ns to us, so last three digits are lost. - cricket::WebRtcVideoFrame frame(buffer, 20000, webrtc::kVideoRotation_0); + cricket::WebRtcVideoFrame frame(buffer, 200, webrtc::kVideoRotation_0); EXPECT_EQ(dummy_handle, frame.GetNativeHandle()); 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()); + EXPECT_EQ(200, frame.GetTimeStamp()); + frame.SetTimeStamp(400); + EXPECT_EQ(400, frame.GetTimeStamp()); } TEST_F(WebRtcVideoFrameTest, CopyTextureFrame) { @@ -291,14 +286,12 @@ TEST_F(WebRtcVideoFrameTest, CopyTextureFrame) { webrtc::NativeHandleBuffer* buffer = new rtc::RefCountedObject( dummy_handle, 640, 480); - // Timestamp is converted from ns to us, so last three digits are lost. - cricket::WebRtcVideoFrame frame1(buffer, 20000, webrtc::kVideoRotation_0); + cricket::WebRtcVideoFrame frame1(buffer, 200, webrtc::kVideoRotation_0); cricket::VideoFrame* frame2 = frame1.Copy(); EXPECT_EQ(frame1.GetNativeHandle(), frame2->GetNativeHandle()); EXPECT_EQ(frame1.width(), frame2->width()); EXPECT_EQ(frame1.height(), frame2->height()); EXPECT_EQ(frame1.GetTimeStamp(), frame2->GetTimeStamp()); - EXPECT_EQ(frame1.timestamp_us(), frame2->timestamp_us()); delete frame2; } diff --git a/webrtc/media/engine/webrtcvideoframefactory_unittest.cc b/webrtc/media/engine/webrtcvideoframefactory_unittest.cc index dd7e7d6d32..45de453f8b 100644 --- a/webrtc/media/engine/webrtcvideoframefactory_unittest.cc +++ b/webrtc/media/engine/webrtcvideoframefactory_unittest.cc @@ -29,7 +29,7 @@ class WebRtcVideoFrameFactoryTest captured_frame_.fourcc = cricket::FOURCC_I420; captured_frame_.pixel_width = 1; captured_frame_.pixel_height = 1; - captured_frame_.time_stamp = rtc::TimeNanos(); + captured_frame_.time_stamp = 5678; captured_frame_.rotation = frame_rotation; captured_frame_.width = frame_width; captured_frame_.height = frame_height;