New method RtpReceiver::GetLatestTimestamps.
The two timestamps, rtp time and corresponding system time, are always
used together, for audio/video sync. The new method reads both
timestamps, without releasing a lock in between. Ensures that the
caller gets values corresponding to the same packet.
Bug: webrtc:7135
Change-Id: I25bdcbe9ad620016bfad39841b339c266efade14
Reviewed-on: https://webrtc-review.googlesource.com/4062
Commit-Queue: Niels Moller <nisse@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20120}
diff --git a/modules/rtp_rtcp/source/rtp_receiver_impl.h b/modules/rtp_rtcp/source/rtp_receiver_impl.h
index 0ce23dd..e8adc3b 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_impl.h
+++ b/modules/rtp_rtcp/source/rtp_receiver_impl.h
@@ -47,9 +47,8 @@
PayloadUnion payload_specific,
bool in_order) override;
- // Returns the last received timestamp.
- bool Timestamp(uint32_t* timestamp) const override;
- bool LastReceivedTimeMs(int64_t* receive_time_ms) const override;
+ bool GetLatestTimestamps(uint32_t* timestamp,
+ int64_t* receive_time_ms) const override;
uint32_t SSRC() const override;
@@ -70,9 +69,6 @@
}
private:
- bool HaveReceivedFrame() const
- RTC_EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtp_receiver_);
-
void CheckSSRCChanged(const RTPHeader& rtp_header);
void CheckCSRC(const WebRtcRTPHeader& rtp_header);
int32_t CheckPayloadChanged(const RTPHeader& rtp_header,