From 7e9a619599ee6542f5cfcccf383ef8f4abd194df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Tue, 19 Jun 2018 16:45:40 +0200 Subject: [PATCH] Add setter method EncodedFrame::SetTimestamp. Similar to the getter method (see https://webrtc-review.googlesource.com/83123), this is a preparation for inheriting the method from the base class, and delete the corresponding redundant timestamp member. Bug: webrtc:9378 Change-Id: Idbb48e7058c94d6d4aa9a2b19e608ef08c2e35b4 Reviewed-on: https://webrtc-review.googlesource.com/83726 Commit-Queue: Niels Moller Reviewed-by: Philip Eliasson Cr-Commit-Position: refs/heads/master@{#23665} --- api/video/encoded_frame.cc | 4 ++++ api/video/encoded_frame.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/video/encoded_frame.cc b/api/video/encoded_frame.cc index ec8877cb36..f9152b23f1 100644 --- a/api/video/encoded_frame.cc +++ b/api/video/encoded_frame.cc @@ -21,5 +21,9 @@ uint32_t EncodedFrame::Timestamp() const { return timestamp; } +void EncodedFrame::SetTimestamp(uint32_t rtp_timestamp) { + timestamp = rtp_timestamp; +} + } // namespace video_coding } // namespace webrtc diff --git a/api/video/encoded_frame.h b/api/video/encoded_frame.h index 8bfa61e2cc..1b0a26a5fc 100644 --- a/api/video/encoded_frame.h +++ b/api/video/encoded_frame.h @@ -58,8 +58,9 @@ class EncodedFrame : public webrtc::VCMEncodedFrame { virtual bool GetBitstream(uint8_t* destination) const = 0; - // The capture timestamp of this frame. + // The capture timestamp of this frame, using the 90 kHz RTP clock. virtual uint32_t Timestamp() const; + virtual void SetTimestamp(uint32_t rtp_timestamp); // When this frame was received. virtual int64_t ReceivedTime() const = 0;