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

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

Issue 2362373002: Remove chain of methods in RtpRtcp module to get current payload frequency for RTCP SRs (Closed)
Patch Set: comment Created 4 years, 3 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17a610d2807344c5942aebad5e8fa04b4f1be8b0..9882d3db513837ed3a0cb4350634a21a3c9f6530 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -73,7 +73,6 @@ std::string NACKStringBuilder::GetResult() {
RTCPSender::FeedbackState::FeedbackState()
: send_payload_type(0),
- frequency_hz(0),
packets_sent(0),
media_bytes_sent(0),
send_bitrate(0),
@@ -443,10 +442,11 @@ std::unique_ptr<rtcp::RtcpPacket> RTCPSender::BuildSR(const RtcpContext& ctx) {
// the frame being captured at this moment. We are calculating that
// timestamp as the last frame's timestamp + the time since the last frame
// was captured.
+ uint32_t rtp_rate =
+ (audio_ ? kBogusRtpRateForAudioRtcp : kVideoPayloadTypeFrequency) / 1000;
uint32_t rtp_timestamp =
timestamp_offset_ + last_rtp_timestamp_ +
- (clock_->TimeInMilliseconds() - last_frame_capture_time_ms_) *
- (ctx.feedback_state_.frequency_hz / 1000);
+ (clock_->TimeInMilliseconds() - last_frame_capture_time_ms_) * rtp_rate;
rtcp::SenderReport* report = new rtcp::SenderReport();
report->SetSenderSsrc(ssrc_);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698