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

Unified Diff: webrtc/api/androidvideotracksource.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 | « no previous file | webrtc/base/timestampaligner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidvideotracksource.cc
diff --git a/webrtc/api/androidvideotracksource.cc b/webrtc/api/androidvideotracksource.cc
index 000337d34d6df8c8ccb46a0b2bd08372c4003f6a..f49cc30c8c975189485005cbb2ad7e4d87c44f0b 100644
--- a/webrtc/api/androidvideotracksource.cc
+++ b/webrtc/api/androidvideotracksource.cc
@@ -237,9 +237,8 @@ bool AndroidVideoTrackSource::AdaptFrame(int width,
RTC_DCHECK(camera_thread_checker_.CalledOnValidThread());
int64_t system_time_us = rtc::TimeMicros();
-
- int64_t offset_us =
- timestamp_aligner_.UpdateOffset(camera_time_us, system_time_us);
+ *translated_camera_time_us =
+ timestamp_aligner_.TranslateTimestamp(camera_time_us, system_time_us);
if (!broadcaster_.frame_wanted()) {
return false;
@@ -254,8 +253,6 @@ bool AndroidVideoTrackSource::AdaptFrame(int width,
*crop_x = (width - *crop_width) / 2;
*crop_y = (height - *crop_height) / 2;
- *translated_camera_time_us = timestamp_aligner_.ClipTimestamp(
- camera_time_us + offset_us, system_time_us);
return true;
}
« no previous file with comments | « no previous file | webrtc/base/timestampaligner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698