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; |
}; |