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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 | 1072 |
1073 rtc::Optional<SdpAudioFormat> AudioCodingModuleImpl::ReceiveFormat() const { | 1073 rtc::Optional<SdpAudioFormat> AudioCodingModuleImpl::ReceiveFormat() const { |
1074 rtc::CritScope lock(&acm_crit_sect_); | 1074 rtc::CritScope lock(&acm_crit_sect_); |
1075 return receiver_.LastAudioFormat(); | 1075 return receiver_.LastAudioFormat(); |
1076 } | 1076 } |
1077 | 1077 |
1078 // Incoming packet from network parsed and ready for decode. | 1078 // Incoming packet from network parsed and ready for decode. |
1079 int AudioCodingModuleImpl::IncomingPacket(const uint8_t* incoming_payload, | 1079 int AudioCodingModuleImpl::IncomingPacket(const uint8_t* incoming_payload, |
1080 const size_t payload_length, | 1080 const size_t payload_length, |
1081 const WebRtcRTPHeader& rtp_header) { | 1081 const WebRtcRTPHeader& rtp_header) { |
| 1082 RTC_DCHECK_EQ(payload_length == 0, incoming_payload == nullptr); |
1082 return receiver_.InsertPacket( | 1083 return receiver_.InsertPacket( |
1083 rtp_header, | 1084 rtp_header, |
1084 rtc::ArrayView<const uint8_t>(incoming_payload, payload_length)); | 1085 rtc::ArrayView<const uint8_t>(incoming_payload, payload_length)); |
1085 } | 1086 } |
1086 | 1087 |
1087 // Minimum playout delay (Used for lip-sync). | 1088 // Minimum playout delay (Used for lip-sync). |
1088 int AudioCodingModuleImpl::SetMinimumPlayoutDelay(int time_ms) { | 1089 int AudioCodingModuleImpl::SetMinimumPlayoutDelay(int time_ms) { |
1089 if ((time_ms < 0) || (time_ms > 10000)) { | 1090 if ((time_ms < 0) || (time_ms > 10000)) { |
1090 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, | 1091 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, id_, |
1091 "Delay must be in the range of 0-1000 milliseconds."); | 1092 "Delay must be in the range of 0-1000 milliseconds."); |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 // Checks the validity of the parameters of the given codec | 1363 // Checks the validity of the parameters of the given codec |
1363 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { | 1364 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { |
1364 bool valid = acm2::RentACodec::IsCodecValid(codec); | 1365 bool valid = acm2::RentACodec::IsCodecValid(codec); |
1365 if (!valid) | 1366 if (!valid) |
1366 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1, | 1367 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1, |
1367 "Invalid codec setting"); | 1368 "Invalid codec setting"); |
1368 return valid; | 1369 return valid; |
1369 } | 1370 } |
1370 | 1371 |
1371 } // namespace webrtc | 1372 } // namespace webrtc |
OLD | NEW |