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

Unified Diff: media/capture/video/win/sink_input_pin_win.cc

Issue 1324683004: Win Video Capture: Sending the timestamps provided by the driver to the capture pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fallback to old code path in case no timestamp Created 5 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: media/capture/video/win/sink_input_pin_win.cc
diff --git a/media/capture/video/win/sink_input_pin_win.cc b/media/capture/video/win/sink_input_pin_win.cc
index 9c515a3422e722790a7cfc051d8ff9150e91bdaf..50c3c99cebaff1adf8ed318410eaaf364eb8e80a 100644
--- a/media/capture/video/win/sink_input_pin_win.cc
+++ b/media/capture/video/win/sink_input_pin_win.cc
@@ -182,7 +182,16 @@ HRESULT SinkInputPin::Receive(IMediaSample* sample) {
if (FAILED(sample->GetPointer(&buffer)))
return S_FALSE;
- observer_->FrameReceived(buffer, length);
+ REFERENCE_TIME start_time, end_time;
+
mcasas 2015/09/10 20:03:20 no blank line
qiangchen 2015/09/10 21:37:45 Done.
+ if (FAILED(sample->GetTime(&start_time, &end_time))) {
+ start_time = -1;
+ end_time = -1;
mcasas 2015/09/10 20:03:20 Hmmm, the assignment and the use of |start_time| a
qiangchen 2015/09/10 21:37:45 Done.
+ }
+
+ DCHECK(start_time <= end_time);
+
+ observer_->FrameReceived(buffer, length, start_time);
return S_OK;
}
« no previous file with comments | « media/capture/video/win/sink_filter_observer_win.h ('k') | media/capture/video/win/video_capture_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698