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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 } | 529 } |
530 } | 530 } |
531 | 531 |
532 RTPFragmentationHeader my_fragmentation; | 532 RTPFragmentationHeader my_fragmentation; |
533 ConvertEncodedInfoToFragmentationHeader(encoded_info, &my_fragmentation); | 533 ConvertEncodedInfoToFragmentationHeader(encoded_info, &my_fragmentation); |
534 FrameType frame_type; | 534 FrameType frame_type; |
535 if (encode_buffer_.size() == 0 && encoded_info.send_even_if_empty) { | 535 if (encode_buffer_.size() == 0 && encoded_info.send_even_if_empty) { |
536 frame_type = kEmptyFrame; | 536 frame_type = kEmptyFrame; |
537 encoded_info.payload_type = previous_pltype; | 537 encoded_info.payload_type = previous_pltype; |
538 } else { | 538 } else { |
539 RTC_DCHECK_GT(encode_buffer_.size(), 0u); | 539 RTC_DCHECK_GT(encode_buffer_.size(), 0); |
540 frame_type = encoded_info.speech ? kAudioFrameSpeech : kAudioFrameCN; | 540 frame_type = encoded_info.speech ? kAudioFrameSpeech : kAudioFrameCN; |
541 } | 541 } |
542 | 542 |
543 { | 543 { |
544 rtc::CritScope lock(&callback_crit_sect_); | 544 rtc::CritScope lock(&callback_crit_sect_); |
545 if (packetization_callback_) { | 545 if (packetization_callback_) { |
546 packetization_callback_->SendData( | 546 packetization_callback_->SendData( |
547 frame_type, encoded_info.payload_type, encoded_info.encoded_timestamp, | 547 frame_type, encoded_info.payload_type, encoded_info.encoded_timestamp, |
548 encode_buffer_.data(), encode_buffer_.size(), | 548 encode_buffer_.data(), encode_buffer_.size(), |
549 my_fragmentation.fragmentationVectorSize > 0 ? &my_fragmentation | 549 my_fragmentation.fragmentationVectorSize > 0 ? &my_fragmentation |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 // Checks the validity of the parameters of the given codec | 1381 // Checks the validity of the parameters of the given codec |
1382 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { | 1382 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { |
1383 bool valid = acm2::RentACodec::IsCodecValid(codec); | 1383 bool valid = acm2::RentACodec::IsCodecValid(codec); |
1384 if (!valid) | 1384 if (!valid) |
1385 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1, | 1385 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1, |
1386 "Invalid codec setting"); | 1386 "Invalid codec setting"); |
1387 return valid; | 1387 return valid; |
1388 } | 1388 } |
1389 | 1389 |
1390 } // namespace webrtc | 1390 } // namespace webrtc |
OLD | NEW |