| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 | 99 |
| 100 // Wraps a raw AudioEncoder pointer. The idea is that you can put one of these | 100 // Wraps a raw AudioEncoder pointer. The idea is that you can put one of these |
| 101 // in a unique_ptr, to protect the contained raw pointer from being deleted | 101 // in a unique_ptr, to protect the contained raw pointer from being deleted |
| 102 // when the unique_ptr expires. (This is of course a bad idea in general, but | 102 // when the unique_ptr expires. (This is of course a bad idea in general, but |
| 103 // backwards compatibility.) | 103 // backwards compatibility.) |
| 104 class RawAudioEncoderWrapper final : public AudioEncoder { | 104 class RawAudioEncoderWrapper final : public AudioEncoder { |
| 105 public: | 105 public: |
| 106 RawAudioEncoderWrapper(AudioEncoder* enc) : enc_(enc) {} | 106 RawAudioEncoderWrapper(AudioEncoder* enc) : enc_(enc) {} |
| 107 size_t MaxEncodedBytes() const override { return enc_->MaxEncodedBytes(); } | |
| 108 int SampleRateHz() const override { return enc_->SampleRateHz(); } | 107 int SampleRateHz() const override { return enc_->SampleRateHz(); } |
| 109 size_t NumChannels() const override { return enc_->NumChannels(); } | 108 size_t NumChannels() const override { return enc_->NumChannels(); } |
| 110 int RtpTimestampRateHz() const override { return enc_->RtpTimestampRateHz(); } | 109 int RtpTimestampRateHz() const override { return enc_->RtpTimestampRateHz(); } |
| 111 size_t Num10MsFramesInNextPacket() const override { | 110 size_t Num10MsFramesInNextPacket() const override { |
| 112 return enc_->Num10MsFramesInNextPacket(); | 111 return enc_->Num10MsFramesInNextPacket(); |
| 113 } | 112 } |
| 114 size_t Max10MsFramesInAPacket() const override { | 113 size_t Max10MsFramesInAPacket() const override { |
| 115 return enc_->Max10MsFramesInAPacket(); | 114 return enc_->Max10MsFramesInAPacket(); |
| 116 } | 115 } |
| 117 int GetTargetBitrate() const override { return enc_->GetTargetBitrate(); } | 116 int GetTargetBitrate() const override { return enc_->GetTargetBitrate(); } |
| 118 EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 117 EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
| 119 rtc::ArrayView<const int16_t> audio, | 118 rtc::ArrayView<const int16_t> audio, |
| 120 rtc::Buffer* encoded) override { | 119 rtc::Buffer* encoded) override { |
| 121 return enc_->Encode(rtp_timestamp, audio, encoded); | 120 return enc_->Encode(rtp_timestamp, audio, encoded); |
| 122 } | 121 } |
| 123 EncodedInfo EncodeInternal(uint32_t rtp_timestamp, | |
| 124 rtc::ArrayView<const int16_t> audio, | |
| 125 size_t max_encoded_bytes, | |
| 126 uint8_t* encoded) override { | |
| 127 return enc_->EncodeInternal(rtp_timestamp, audio, max_encoded_bytes, | |
| 128 encoded); | |
| 129 } | |
| 130 void Reset() override { return enc_->Reset(); } | 122 void Reset() override { return enc_->Reset(); } |
| 131 bool SetFec(bool enable) override { return enc_->SetFec(enable); } | 123 bool SetFec(bool enable) override { return enc_->SetFec(enable); } |
| 132 bool SetDtx(bool enable) override { return enc_->SetDtx(enable); } | 124 bool SetDtx(bool enable) override { return enc_->SetDtx(enable); } |
| 133 bool SetApplication(Application application) override { | 125 bool SetApplication(Application application) override { |
| 134 return enc_->SetApplication(application); | 126 return enc_->SetApplication(application); |
| 135 } | 127 } |
| 136 void SetMaxPlaybackRate(int frequency_hz) override { | 128 void SetMaxPlaybackRate(int frequency_hz) override { |
| 137 return enc_->SetMaxPlaybackRate(frequency_hz); | 129 return enc_->SetMaxPlaybackRate(frequency_hz); |
| 138 } | 130 } |
| 139 void SetProjectedPacketLossRate(double fraction) override { | 131 void SetProjectedPacketLossRate(double fraction) override { |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 return receiver_.LeastRequiredDelayMs(); | 936 return receiver_.LeastRequiredDelayMs(); |
| 945 } | 937 } |
| 946 | 938 |
| 947 void AudioCodingModuleImpl::GetDecodingCallStatistics( | 939 void AudioCodingModuleImpl::GetDecodingCallStatistics( |
| 948 AudioDecodingCallStats* call_stats) const { | 940 AudioDecodingCallStats* call_stats) const { |
| 949 receiver_.GetDecodingCallStatistics(call_stats); | 941 receiver_.GetDecodingCallStatistics(call_stats); |
| 950 } | 942 } |
| 951 | 943 |
| 952 } // namespace acm2 | 944 } // namespace acm2 |
| 953 } // namespace webrtc | 945 } // namespace webrtc |
| OLD | NEW |