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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 dtmf_duration_samples, | 201 dtmf_duration_samples, |
202 !dtmf_event_first_packet_sent_)) { | 202 !dtmf_event_first_packet_sent_)) { |
203 return false; | 203 return false; |
204 } | 204 } |
205 dtmf_event_first_packet_sent_ = true; | 205 dtmf_event_first_packet_sent_ = true; |
206 return true; | 206 return true; |
207 } | 207 } |
208 } | 208 } |
209 return true; | 209 return true; |
210 } | 210 } |
211 if (payload_size == 0 || payload_data == NULL) { | 211 if (payload_size == 0 || payload_data == nullptr) { |
212 if (frame_type == kEmptyFrame) { | 212 if (frame_type == kEmptyFrame) { |
213 // we don't send empty audio RTP packets | 213 // we don't send empty audio RTP packets |
214 // no error since we use it to drive DTMF when we use VAD | 214 // no error since we use it to drive DTMF when we use VAD |
215 return true; | 215 return true; |
216 } | 216 } |
217 return false; | 217 return false; |
218 } | 218 } |
219 | 219 |
220 std::unique_ptr<RtpPacketToSend> packet = rtp_sender_->AllocatePacket(); | 220 std::unique_ptr<RtpPacketToSend> packet = rtp_sender_->AllocatePacket(); |
221 packet->SetMarker(MarkerBit(frame_type, payload_type)); | 221 packet->SetMarker(MarkerBit(frame_type, payload_type)); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "Audio::SendTelephoneEvent", | 340 TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "Audio::SendTelephoneEvent", |
341 "timestamp", packet->Timestamp(), "seqnum", packet->SequenceNumber()); | 341 "timestamp", packet->Timestamp(), "seqnum", packet->SequenceNumber()); |
342 result = rtp_sender_->SendToNetwork(std::move(packet), kAllowRetransmission, | 342 result = rtp_sender_->SendToNetwork(std::move(packet), kAllowRetransmission, |
343 RtpPacketSender::kHighPriority); | 343 RtpPacketSender::kHighPriority); |
344 send_count--; | 344 send_count--; |
345 } while (send_count > 0 && result); | 345 } while (send_count > 0 && result); |
346 | 346 |
347 return result; | 347 return result; |
348 } | 348 } |
349 } // namespace webrtc | 349 } // namespace webrtc |
OLD | NEW |