| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |