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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_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, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 void RTPSender::SetSendPayloadType(int8_t payload_type) { 319 void RTPSender::SetSendPayloadType(int8_t payload_type) {
320 rtc::CritScope lock(&send_critsect_); 320 rtc::CritScope lock(&send_critsect_);
321 payload_type_ = payload_type; 321 payload_type_ = payload_type;
322 } 322 }
323 323
324 int8_t RTPSender::SendPayloadType() const { 324 int8_t RTPSender::SendPayloadType() const {
325 rtc::CritScope lock(&send_critsect_); 325 rtc::CritScope lock(&send_critsect_);
326 return payload_type_; 326 return payload_type_;
327 } 327 }
328 328
329 int RTPSender::SendPayloadFrequency() const {
330 return audio_ != NULL ? audio_->AudioFrequency() : kVideoPayloadTypeFrequency;
331 }
332
333 void RTPSender::SetMaxPayloadLength(size_t max_payload_length) { 329 void RTPSender::SetMaxPayloadLength(size_t max_payload_length) {
334 // Sanity check. 330 // Sanity check.
335 RTC_DCHECK(max_payload_length >= 100 && max_payload_length <= IP_PACKET_SIZE) 331 RTC_DCHECK(max_payload_length >= 100 && max_payload_length <= IP_PACKET_SIZE)
336 << "Invalid max payload length: " << max_payload_length; 332 << "Invalid max payload length: " << max_payload_length;
337 rtc::CritScope lock(&send_critsect_); 333 rtc::CritScope lock(&send_critsect_);
338 max_payload_length_ = max_payload_length; 334 max_payload_length_ = max_payload_length;
339 } 335 }
340 336
341 size_t RTPSender::MaxDataPayloadLength() const { 337 size_t RTPSender::MaxDataPayloadLength() const {
342 if (audio_configured_) { 338 if (audio_configured_) {
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 rtc::CritScope lock(&send_critsect_); 1759 rtc::CritScope lock(&send_critsect_);
1764 1760
1765 RtpState state; 1761 RtpState state;
1766 state.sequence_number = sequence_number_rtx_; 1762 state.sequence_number = sequence_number_rtx_;
1767 state.start_timestamp = timestamp_offset_; 1763 state.start_timestamp = timestamp_offset_;
1768 1764
1769 return state; 1765 return state;
1770 } 1766 }
1771 1767
1772 } // namespace webrtc 1768 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698