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

Unified Diff: webrtc/media/base/videocapturer.cc

Issue 2325563002: New method TimestampAligner::TranslateTimestamp (Closed)
Patch Set: Minimum inter-frame interval 1ms. Fix clipping logic. 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
« no previous file with comments | « webrtc/base/timestampaligner_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videocapturer.cc
diff --git a/webrtc/media/base/videocapturer.cc b/webrtc/media/base/videocapturer.cc
index 9d297bf9141e51941d606df52a3e9589754545b3..c3407604681c604fbf944e94ad376f2b8ffaa358 100644
--- a/webrtc/media/base/videocapturer.cc
+++ b/webrtc/media/base/videocapturer.cc
@@ -225,11 +225,10 @@ bool VideoCapturer::AdaptFrame(int width,
int* crop_x,
int* crop_y,
int64_t* translated_camera_time_us) {
- int64_t offset_us =
- translated_camera_time_us
- ? timestamp_aligner_.UpdateOffset(camera_time_us, system_time_us)
- : 0;
-
+ if (translated_camera_time_us) {
+ *translated_camera_time_us =
+ timestamp_aligner_.TranslateTimestamp(camera_time_us, system_time_us);
+ }
if (!broadcaster_.frame_wanted()) {
return false;
}
@@ -252,10 +251,6 @@ bool VideoCapturer::AdaptFrame(int width,
*crop_y = 0;
}
- if (translated_camera_time_us) {
- *translated_camera_time_us = timestamp_aligner_.ClipTimestamp(
- camera_time_us + offset_us, system_time_us);
- }
return true;
}
« no previous file with comments | « webrtc/base/timestampaligner_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698