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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_audio.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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 inband_vad_active_(false), 43 inband_vad_active_(false),
44 cngnb_payload_type_(-1), 44 cngnb_payload_type_(-1),
45 cngwb_payload_type_(-1), 45 cngwb_payload_type_(-1),
46 cngswb_payload_type_(-1), 46 cngswb_payload_type_(-1),
47 cngfb_payload_type_(-1), 47 cngfb_payload_type_(-1),
48 last_payload_type_(-1), 48 last_payload_type_(-1),
49 audio_level_dbov_(0) {} 49 audio_level_dbov_(0) {}
50 50
51 RTPSenderAudio::~RTPSenderAudio() {} 51 RTPSenderAudio::~RTPSenderAudio() {}
52 52
53 int RTPSenderAudio::AudioFrequency() const {
54 return kDtmfFrequencyHz;
55 }
56
57 // set audio packet size, used to determine when it's time to send a DTMF packet 53 // set audio packet size, used to determine when it's time to send a DTMF packet
58 // in silence (CNG) 54 // in silence (CNG)
59 int32_t RTPSenderAudio::SetAudioPacketSize(uint16_t packet_size_samples) { 55 int32_t RTPSenderAudio::SetAudioPacketSize(uint16_t packet_size_samples) {
60 rtc::CritScope cs(&send_audio_critsect_); 56 rtc::CritScope cs(&send_audio_critsect_);
61 packet_size_samples_ = packet_size_samples; 57 packet_size_samples_ = packet_size_samples;
62 return 0; 58 return 0;
63 } 59 }
64 60
65 int32_t RTPSenderAudio::RegisterAudioPayload( 61 int32_t RTPSenderAudio::RegisterAudioPayload(
66 const char payloadName[RTP_PAYLOAD_NAME_SIZE], 62 const char payloadName[RTP_PAYLOAD_NAME_SIZE],
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "Audio::SendTelephoneEvent", 361 TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "Audio::SendTelephoneEvent",
366 "timestamp", packet->Timestamp(), "seqnum", packet->SequenceNumber()); 362 "timestamp", packet->Timestamp(), "seqnum", packet->SequenceNumber());
367 result = rtp_sender_->SendToNetwork(std::move(packet), kAllowRetransmission, 363 result = rtp_sender_->SendToNetwork(std::move(packet), kAllowRetransmission,
368 RtpPacketSender::kHighPriority); 364 RtpPacketSender::kHighPriority);
369 send_count--; 365 send_count--;
370 } while (send_count > 0 && result); 366 } while (send_count > 0 && result);
371 367
372 return result; 368 return result;
373 } 369 }
374 } // namespace webrtc 370 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698