OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 int AcmReceiver::last_output_sample_rate_hz() const { | 71 int AcmReceiver::last_output_sample_rate_hz() const { |
72 return neteq_->last_output_sample_rate_hz(); | 72 return neteq_->last_output_sample_rate_hz(); |
73 } | 73 } |
74 | 74 |
75 int AcmReceiver::InsertPacket(const WebRtcRTPHeader& rtp_header, | 75 int AcmReceiver::InsertPacket(const WebRtcRTPHeader& rtp_header, |
76 rtc::ArrayView<const uint8_t> incoming_payload) { | 76 rtc::ArrayView<const uint8_t> incoming_payload) { |
77 uint32_t receive_timestamp = 0; | 77 uint32_t receive_timestamp = 0; |
78 const RTPHeader* header = &rtp_header.header; // Just a shorthand. | 78 const RTPHeader* header = &rtp_header.header; // Just a shorthand. |
79 | 79 |
| 80 if (incoming_payload.empty()) { |
| 81 neteq_->InsertEmptyPacket(rtp_header.header); |
| 82 return 0; |
| 83 } |
| 84 |
80 { | 85 { |
81 rtc::CritScope lock(&crit_sect_); | 86 rtc::CritScope lock(&crit_sect_); |
82 | 87 |
83 const rtc::Optional<CodecInst> ci = | 88 const rtc::Optional<CodecInst> ci = |
84 RtpHeaderToDecoder(*header, incoming_payload[0]); | 89 RtpHeaderToDecoder(*header, incoming_payload[0]); |
85 if (!ci) { | 90 if (!ci) { |
86 LOG_F(LS_ERROR) << "Payload-type " | 91 LOG_F(LS_ERROR) << "Payload-type " |
87 << static_cast<int>(header->payloadType) | 92 << static_cast<int>(header->payloadType) |
88 << " is not registered."; | 93 << " is not registered."; |
89 return -1; | 94 return -1; |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 396 |
392 void AcmReceiver::GetDecodingCallStatistics( | 397 void AcmReceiver::GetDecodingCallStatistics( |
393 AudioDecodingCallStats* stats) const { | 398 AudioDecodingCallStats* stats) const { |
394 rtc::CritScope lock(&crit_sect_); | 399 rtc::CritScope lock(&crit_sect_); |
395 *stats = call_stats_.GetDecodingStatistics(); | 400 *stats = call_stats_.GetDecodingStatistics(); |
396 } | 401 } |
397 | 402 |
398 } // namespace acm2 | 403 } // namespace acm2 |
399 | 404 |
400 } // namespace webrtc | 405 } // namespace webrtc |
OLD | NEW |