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

Unified Diff: webrtc/video/video_capture_input.cc

Issue 1534233002: Incorrect timestamps used by video analyzer with real camera Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use RenderFrame callback instead of IncomingCapturedFrame Created 5 years 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
« no previous file with comments | « no previous file | webrtc/video/video_quality_test.cc » ('j') | webrtc/video/video_quality_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_capture_input.cc
diff --git a/webrtc/video/video_capture_input.cc b/webrtc/video/video_capture_input.cc
index 8cbacc13445a428b62767832dc6870ef60687451..0f2b5d4adc6682bf892d394b1906a78f3753ed95 100644
--- a/webrtc/video/video_capture_input.cc
+++ b/webrtc/video/video_capture_input.cc
@@ -68,11 +68,6 @@ VideoCaptureInput::~VideoCaptureInput() {
}
void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) {
- // TODO(pbos): Remove local rendering, it should be handled by the client code
- // if required.
- if (local_renderer_)
- local_renderer_->RenderFrame(video_frame, 0);
-
stats_proxy_->OnIncomingFrame(video_frame.width(), video_frame.height());
VideoFrame incoming_frame = video_frame;
@@ -95,6 +90,11 @@ void VideoCaptureInput::IncomingCapturedFrame(const VideoFrame& video_frame) {
incoming_frame.set_timestamp(
kMsToRtpTimestamp * static_cast<uint32_t>(incoming_frame.ntp_time_ms()));
+ // TODO(pbos): Remove local rendering, it should be handled by the client code
+ // if required.
+ if (local_renderer_)
+ local_renderer_->RenderFrame(incoming_frame, 0);
+
CriticalSectionScoped cs(capture_cs_.get());
if (incoming_frame.ntp_time_ms() <= last_captured_timestamp_) {
// We don't allow the same capture time for two frames, drop this one.
« no previous file with comments | « no previous file | webrtc/video/video_quality_test.cc » ('j') | webrtc/video/video_quality_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698