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

Unified Diff: content/renderer/media/video_capture_impl_unittest.cc

Issue 2045813003: Decouple capture timestamp and reference time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: content/renderer/media/video_capture_impl_unittest.cc
diff --git a/content/renderer/media/video_capture_impl_unittest.cc b/content/renderer/media/video_capture_impl_unittest.cc
index 1fc43c024b8f7d75e7f715688e3ce1cd0baf00cc..ca8ba1d302f2bb4fde4309eb5b283bedf71e4fd0 100644
--- a/content/renderer/media/video_capture_impl_unittest.cc
+++ b/content/renderer/media/video_capture_impl_unittest.cc
@@ -168,8 +168,11 @@ class VideoCaptureImplTest : public ::testing::Test {
}
void BufferReceived(int buffer_id, const gfx::Size& size) {
+ base::TimeTicks now = base::TimeTicks::Now();
+ base::TimeDelta timestamp =
+ base::TimeDelta::FromInternalValue(now.ToInternalValue());
miu 2016/06/07 20:03:47 It'd be a bit cleaner to do this instead: base:
qiangchen 2016/06/08 18:04:30 Done. But with reference time moved into metadata
video_capture_impl_->OnBufferReceived(
- buffer_id, base::TimeTicks::Now(), base::DictionaryValue(),
+ buffer_id, now, timestamp, base::DictionaryValue(),
media::PIXEL_FORMAT_I420, media::VideoFrame::STORAGE_SHMEM, size,
gfx::Rect(size));
}

Powered by Google App Engine
This is Rietveld 408576698