| 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 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 assert(decoder); // At this point, we must have a decoder object. | 1264 assert(decoder); // At this point, we must have a decoder object. |
| 1265 // The number of channels in the |sync_buffer_| should be the same as the | 1265 // The number of channels in the |sync_buffer_| should be the same as the |
| 1266 // number decoder channels. | 1266 // number decoder channels. |
| 1267 assert(sync_buffer_->Channels() == decoder->Channels()); | 1267 assert(sync_buffer_->Channels() == decoder->Channels()); |
| 1268 assert(decoded_buffer_length_ >= kMaxFrameSize * decoder->Channels()); | 1268 assert(decoded_buffer_length_ >= kMaxFrameSize * decoder->Channels()); |
| 1269 assert(*operation == kNormal || *operation == kAccelerate || | 1269 assert(*operation == kNormal || *operation == kAccelerate || |
| 1270 *operation == kFastAccelerate || *operation == kMerge || | 1270 *operation == kFastAccelerate || *operation == kMerge || |
| 1271 *operation == kPreemptiveExpand); | 1271 *operation == kPreemptiveExpand); |
| 1272 packet_list->pop_front(); | 1272 packet_list->pop_front(); |
| 1273 size_t payload_length = packet->payload_length; | 1273 size_t payload_length = packet->payload_length; |
| 1274 int decode_length; | 1274 int16_t decode_length; |
| 1275 if (packet->sync_packet) { | 1275 if (packet->sync_packet) { |
| 1276 // Decode to silence with the same frame size as the last decode. | 1276 // Decode to silence with the same frame size as the last decode. |
| 1277 LOG(LS_VERBOSE) << "Decoding sync-packet: " << | 1277 LOG(LS_VERBOSE) << "Decoding sync-packet: " << |
| 1278 " ts=" << packet->header.timestamp << | 1278 " ts=" << packet->header.timestamp << |
| 1279 ", sn=" << packet->header.sequenceNumber << | 1279 ", sn=" << packet->header.sequenceNumber << |
| 1280 ", pt=" << static_cast<int>(packet->header.payloadType) << | 1280 ", pt=" << static_cast<int>(packet->header.payloadType) << |
| 1281 ", ssrc=" << packet->header.ssrc << | 1281 ", ssrc=" << packet->header.ssrc << |
| 1282 ", len=" << packet->payload_length; | 1282 ", len=" << packet->payload_length; |
| 1283 memset(&decoded_buffer_[*decoded_length], 0, | 1283 memset(&decoded_buffer_[*decoded_length], 0, |
| 1284 decoder_frame_length_ * decoder->Channels() * | 1284 decoder_frame_length_ * decoder->Channels() * |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1985 | 1985 |
| 1986 void NetEqImpl::CreateDecisionLogic() { | 1986 void NetEqImpl::CreateDecisionLogic() { |
| 1987 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, | 1987 decision_logic_.reset(DecisionLogic::Create(fs_hz_, output_size_samples_, |
| 1988 playout_mode_, | 1988 playout_mode_, |
| 1989 decoder_database_.get(), | 1989 decoder_database_.get(), |
| 1990 *packet_buffer_.get(), | 1990 *packet_buffer_.get(), |
| 1991 delay_manager_.get(), | 1991 delay_manager_.get(), |
| 1992 buffer_level_filter_.get())); | 1992 buffer_level_filter_.get())); |
| 1993 } | 1993 } |
| 1994 } // namespace webrtc | 1994 } // namespace webrtc |
| OLD | NEW |