OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 size_t AudioEncoderCopyRed::Max10MsFramesInAPacket() const { | 47 size_t AudioEncoderCopyRed::Max10MsFramesInAPacket() const { |
48 return speech_encoder_->Max10MsFramesInAPacket(); | 48 return speech_encoder_->Max10MsFramesInAPacket(); |
49 } | 49 } |
50 | 50 |
51 int AudioEncoderCopyRed::GetTargetBitrate() const { | 51 int AudioEncoderCopyRed::GetTargetBitrate() const { |
52 return speech_encoder_->GetTargetBitrate(); | 52 return speech_encoder_->GetTargetBitrate(); |
53 } | 53 } |
54 | 54 |
55 AudioEncoder::EncodedInfo AudioEncoderCopyRed::EncodeInternal( | 55 AudioEncoder::EncodedInfo AudioEncoderCopyRed::EncodeImpl( |
56 uint32_t rtp_timestamp, | 56 uint32_t rtp_timestamp, |
57 rtc::ArrayView<const int16_t> audio, | 57 rtc::ArrayView<const int16_t> audio, |
58 rtc::Buffer* encoded) { | 58 rtc::Buffer* encoded) { |
59 | 59 |
60 const size_t primary_offset = encoded->size(); | 60 const size_t primary_offset = encoded->size(); |
61 EncodedInfo info = | 61 EncodedInfo info = |
62 speech_encoder_->Encode(rtp_timestamp, audio, encoded); | 62 speech_encoder_->Encode(rtp_timestamp, audio, encoded); |
63 | 63 |
64 RTC_CHECK(info.redundant.empty()) << "Cannot use nested redundant encoders."; | 64 RTC_CHECK(info.redundant.empty()) << "Cannot use nested redundant encoders."; |
65 RTC_DCHECK_EQ(encoded->size() - primary_offset, info.encoded_bytes); | 65 RTC_DCHECK_EQ(encoded->size() - primary_offset, info.encoded_bytes); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 void AudioEncoderCopyRed::SetProjectedPacketLossRate(double fraction) { | 116 void AudioEncoderCopyRed::SetProjectedPacketLossRate(double fraction) { |
117 speech_encoder_->SetProjectedPacketLossRate(fraction); | 117 speech_encoder_->SetProjectedPacketLossRate(fraction); |
118 } | 118 } |
119 | 119 |
120 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) { | 120 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) { |
121 speech_encoder_->SetTargetBitrate(bits_per_second); | 121 speech_encoder_->SetTargetBitrate(bits_per_second); |
122 } | 122 } |
123 | 123 |
124 } // namespace webrtc | 124 } // namespace webrtc |
OLD | NEW |