Remove chain of methods in RtpRtcp module to get current payload frequency for RTCP SRs, which anyway was stuck to defaults for video/audio.

BUG=webrtc:2795,webrtc:6458

Review-Url: https://codereview.webrtc.org/2362373002
Cr-Commit-Position: refs/heads/master@{#14476}
This commit is contained in:
solenberg
2016-10-03 06:22:25 -07:00
committed by Commit bot
parent 71ca74798a
commit b19d288c94
9 changed files with 7 additions and 24 deletions

View File

@ -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_);