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

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

Issue 1865283002: Use microsecond timestamp in cricket::VideoFrame. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing override, intending to reland. Created 4 years, 8 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/media/base/videobroadcaster_unittest.cc ('k') | webrtc/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videoframe.h
diff --git a/webrtc/media/base/videoframe.h b/webrtc/media/base/videoframe.h
index d1ae9d7bb815fd807b49553bdf10e69c4a135d3c..9e0fbfd6d42ceff6f036935392b06dad54bee4d3 100644
--- a/webrtc/media/base/videoframe.h
+++ b/webrtc/media/base/videoframe.h
@@ -57,8 +57,19 @@ class VideoFrame {
virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer()
const = 0;
- virtual int64_t GetTimeStamp() const = 0;
- virtual void SetTimeStamp(int64_t time_stamp) = 0;
+ // System monotonic clock, same timebase as rtc::TimeMicros().
+ virtual int64_t timestamp_us() const = 0;
+ virtual void set_timestamp_us(int64_t time_us) = 0;
+
+ // Deprecated methods, for backwards compatibility.
+ // TODO(nisse): Delete when usage in Chrome and other applications
+ // have been replaced.
+ virtual int64_t GetTimeStamp() const {
+ return rtc::kNumNanosecsPerMicrosec * timestamp_us();
+ }
+ virtual void SetTimeStamp(int64_t time_ns) {
+ set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec);
+ }
// Indicates the rotation angle in degrees.
virtual webrtc::VideoRotation rotation() const = 0;
@@ -137,8 +148,9 @@ class VideoFrame {
int32_t dst_pitch_v) const;
// Creates an empty frame.
- virtual VideoFrame *CreateEmptyFrame(int w, int h,
- int64_t time_stamp) const = 0;
+ virtual VideoFrame* CreateEmptyFrame(int w,
+ int h,
+ int64_t timestamp_us) const = 0;
virtual void set_rotation(webrtc::VideoRotation rotation) = 0;
};
« no previous file with comments | « webrtc/media/base/videobroadcaster_unittest.cc ('k') | webrtc/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698