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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc

Issue 2241193002: StartTimestamp generated randomly in RtpSender constructor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Renames start_timestamp->timestamp_offset in RtcpSender Created 4 years, 4 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
Index: webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
index 23da9cac9586304c2de204a3916dbeaba62f4684..f02a1c4a4b055fe2a69662ebf051537bae60fec8 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -161,7 +161,7 @@ RTCPSender::RTCPSender(
sending_(false),
remb_enabled_(false),
next_time_to_send_rtcp_(0),
- start_timestamp_(0),
+ timestamp_offset_(0),
last_rtp_timestamp_(0),
last_frame_capture_time_ms_(-1),
ssrc_(0),
@@ -288,9 +288,9 @@ void RTCPSender::SetMaxPayloadLength(size_t max_payload_length) {
max_payload_length_ = max_payload_length;
}
-void RTCPSender::SetStartTimestamp(uint32_t start_timestamp) {
+void RTCPSender::SetTimestampOffset(uint32_t timestamp_offset) {
rtc::CritScope lock(&critical_section_rtcp_sender_);
- start_timestamp_ = start_timestamp;
+ timestamp_offset_ = timestamp_offset;
}
void RTCPSender::SetLastRtpTime(uint32_t rtp_timestamp,
@@ -444,7 +444,7 @@ std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildSR(const RtcpContext& ctx) {
// timestamp as the last frame's timestamp + the time since the last frame
// was captured.
uint32_t rtp_timestamp =
- start_timestamp_ + last_rtp_timestamp_ +
+ timestamp_offset_ + last_rtp_timestamp_ +
(clock_->TimeInMilliseconds() - last_frame_capture_time_ms_) *
(ctx.feedback_state_.frequency_hz / 1000);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698