| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 int AudioEncoderCopyRed::Num10MsFramesInNextPacket() const { | 44 int AudioEncoderCopyRed::Num10MsFramesInNextPacket() const { |
| 45 return speech_encoder_->Num10MsFramesInNextPacket(); | 45 return speech_encoder_->Num10MsFramesInNextPacket(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 int AudioEncoderCopyRed::Max10MsFramesInAPacket() const { | 48 int AudioEncoderCopyRed::Max10MsFramesInAPacket() const { |
| 49 return speech_encoder_->Max10MsFramesInAPacket(); | 49 return speech_encoder_->Max10MsFramesInAPacket(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 int AudioEncoderCopyRed::GetTargetBitrate() const { |
| 53 return speech_encoder_->GetTargetBitrate(); |
| 54 } |
| 55 |
| 52 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) { | 56 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) { |
| 53 speech_encoder_->SetTargetBitrate(bits_per_second); | 57 speech_encoder_->SetTargetBitrate(bits_per_second); |
| 54 } | 58 } |
| 55 | 59 |
| 56 void AudioEncoderCopyRed::SetProjectedPacketLossRate(double fraction) { | 60 void AudioEncoderCopyRed::SetProjectedPacketLossRate(double fraction) { |
| 57 DCHECK_GE(fraction, 0.0); | 61 DCHECK_GE(fraction, 0.0); |
| 58 DCHECK_LE(fraction, 1.0); | 62 DCHECK_LE(fraction, 1.0); |
| 59 speech_encoder_->SetProjectedPacketLossRate(fraction); | 63 speech_encoder_->SetProjectedPacketLossRate(fraction); |
| 60 } | 64 } |
| 61 | 65 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 info.payload_type = red_payload_type_; | 97 info.payload_type = red_payload_type_; |
| 94 info.encoded_bytes = 0; | 98 info.encoded_bytes = 0; |
| 95 for (std::vector<EncodedInfoLeaf>::const_iterator it = info.redundant.begin(); | 99 for (std::vector<EncodedInfoLeaf>::const_iterator it = info.redundant.begin(); |
| 96 it != info.redundant.end(); ++it) { | 100 it != info.redundant.end(); ++it) { |
| 97 info.encoded_bytes += it->encoded_bytes; | 101 info.encoded_bytes += it->encoded_bytes; |
| 98 } | 102 } |
| 99 return info; | 103 return info; |
| 100 } | 104 } |
| 101 | 105 |
| 102 } // namespace webrtc | 106 } // namespace webrtc |
| OLD | NEW |