Forward audio rtp frequency to Rtcp sender and use it for SR packets

Process video rtp frequency in the same way.

Bug: webrtc:6458
Change-Id: Ia22768e1242d686c2b3e2b911f3e5e492cf8b895
Reviewed-on: https://webrtc-review.googlesource.com/c/107651
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25334}
This commit is contained in:
Ilya Nikolaevskiy
2018-10-24 13:34:32 +02:00
committed by Commit Bot
parent ece3c228a2
commit 5e58bcbf29
5 changed files with 45 additions and 13 deletions

View File

@ -82,7 +82,13 @@ class RTCPSender {
void SetTimestampOffset(uint32_t timestamp_offset);
void SetLastRtpTime(uint32_t rtp_timestamp, int64_t capture_time_ms);
// TODO(bugs.webrtc.org/6458): Remove default parameter value when all the
// depending projects are updated to correctly set payload type.
void SetLastRtpTime(uint32_t rtp_timestamp,
int64_t capture_time_ms,
int8_t payload_type = -1);
void SetRtpClockRate(int8_t payload_type, int rtp_clock_rate_hz);
uint32_t SSRC() const;
@ -244,6 +250,11 @@ class RTCPSender {
RTC_GUARDED_BY(critical_section_rtcp_sender_);
bool send_video_bitrate_allocation_
RTC_GUARDED_BY(critical_section_rtcp_sender_);
std::map<int8_t, int> rtp_clock_rates_khz_
RTC_GUARDED_BY(critical_section_rtcp_sender_);
int8_t last_payload_type_ RTC_GUARDED_BY(critical_section_rtcp_sender_);
absl::optional<VideoBitrateAllocation> CheckAndUpdateLayerStructure(
const VideoBitrateAllocation& bitrate) const
RTC_EXCLUSIVE_LOCKS_REQUIRED(critical_section_rtcp_sender_);