Chromium Code Reviews| Index: webrtc/media/base/videoframe.h |
| diff --git a/webrtc/media/base/videoframe.h b/webrtc/media/base/videoframe.h |
| index 6045bc08b4704982788c93656db9c688a3ae9405..2c21cda9195229c45169e2f6275739646c0a2497 100644 |
| --- a/webrtc/media/base/videoframe.h |
| +++ b/webrtc/media/base/videoframe.h |
| @@ -57,8 +57,20 @@ class VideoFrame { |
| virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> GetVideoFrameBuffer() |
| 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; |
|
perkj_webrtc
2016/04/08 08:22:49
no need for set_timestamp. See motivation below.
|
| + |
| + // 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(); |
| + } |
| + // Also used as a helper method for WebRtcVideoFrame methods with ns input. |
| + virtual void SetTimeStamp(int64_t time_ns) { |
|
perkj_webrtc
2016/04/08 08:22:49
Can we deprecate this? Creating VideoFrames is ver
nisse-webrtc
2016/04/08 09:15:43
Typical use, in videoframefactory,
output_fra
|
| + set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); |
| + } |
| // Indicates the rotation angle in degrees. |
| virtual webrtc::VideoRotation GetVideoRotation() const = 0; |
| @@ -138,7 +150,7 @@ class VideoFrame { |
| // Creates an empty frame. |
| virtual VideoFrame *CreateEmptyFrame(int w, int h, |
| - int64_t time_stamp) const = 0; |
| + int64_t timestamp_us) const = 0; |
| virtual void SetRotation(webrtc::VideoRotation rotation) = 0; |
| }; |