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

Unified Diff: webrtc/media/base/videoframefactory.h

Issue 2017443003: Implement timestamp translation/filter in VideoCapturer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Simplify filter reset. Drop hack to detect if camera time and system time are the same. 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: webrtc/media/base/videoframefactory.h
diff --git a/webrtc/media/base/videoframefactory.h b/webrtc/media/base/videoframefactory.h
index 985199f646f12d8285547e8eeadefe8b07ed3890..5564ff95ef987d8f550f120b3fe436e3670f74d5 100644
--- a/webrtc/media/base/videoframefactory.h
+++ b/webrtc/media/base/videoframefactory.h
@@ -25,7 +25,7 @@ class VideoFrame;
// depending on the subclass of VideoFrameFactory.
class VideoFrameFactory {
public:
- VideoFrameFactory() : apply_rotation_(false) {}
+ VideoFrameFactory() : apply_rotation_(false), timestamp_offset_us_(0) {}
virtual ~VideoFrameFactory() {}
// The returned frame aliases the aliased_frame if the input color
@@ -48,9 +48,15 @@ class VideoFrameFactory {
int output_height) const;
void SetApplyRotation(bool enable) { apply_rotation_ = enable; }
+ // TODO(nisse): Delete this method? Not much use in extending this
+ // class, which we'de like to delete.
+ void SetTimestampOffset(int64_t offset) { timestamp_offset_us_ = offset; }
protected:
bool apply_rotation_;
+ // Offset added to the capture timestamp, to translate it to the
+ // system monotonic time attached to the produced VideoFrame.
+ int64_t timestamp_offset_us_;
private:
// An internal pool to avoid reallocations. It is mutable because it

Powered by Google App Engine
This is Rietveld 408576698