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(); } |
107 int SampleRateHz() const override { return enc_->SampleRateHz(); } | 108 int SampleRateHz() const override { return enc_->SampleRateHz(); } |
108 size_t NumChannels() const override { return enc_->NumChannels(); } | 109 size_t NumChannels() const override { return enc_->NumChannels(); } |
109 int RtpTimestampRateHz() const override { return enc_->RtpTimestampRateHz(); } | 110 int RtpTimestampRateHz() const override { return enc_->RtpTimestampRateHz(); } |
110 size_t Num10MsFramesInNextPacket() const override { | 111 size_t Num10MsFramesInNextPacket() const override { |
111 return enc_->Num10MsFramesInNextPacket(); | 112 return enc_->Num10MsFramesInNextPacket(); |
112 } | 113 } |
113 size_t Max10MsFramesInAPacket() const override { | 114 size_t Max10MsFramesInAPacket() const override { |
114 return enc_->Max10MsFramesInAPacket(); | 115 return enc_->Max10MsFramesInAPacket(); |
115 } | 116 } |
116 int GetTargetBitrate() const override { return enc_->GetTargetBitrate(); } | 117 int GetTargetBitrate() const override { return enc_->GetTargetBitrate(); } |
117 EncodedInfo EncodeImpl(uint32_t rtp_timestamp, | 118 EncodedInfo EncodeImpl(uint32_t rtp_timestamp, |
118 rtc::ArrayView<const int16_t> audio, | 119 rtc::ArrayView<const int16_t> audio, |
119 rtc::Buffer* encoded) override { | 120 rtc::Buffer* encoded) override { |
120 return enc_->Encode(rtp_timestamp, audio, encoded); | 121 return enc_->Encode(rtp_timestamp, audio, encoded); |
121 } | 122 } |
| 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 } |
122 void Reset() override { return enc_->Reset(); } | 130 void Reset() override { return enc_->Reset(); } |
123 bool SetFec(bool enable) override { return enc_->SetFec(enable); } | 131 bool SetFec(bool enable) override { return enc_->SetFec(enable); } |
124 bool SetDtx(bool enable) override { return enc_->SetDtx(enable); } | 132 bool SetDtx(bool enable) override { return enc_->SetDtx(enable); } |
125 bool SetApplication(Application application) override { | 133 bool SetApplication(Application application) override { |
126 return enc_->SetApplication(application); | 134 return enc_->SetApplication(application); |
127 } | 135 } |
128 void SetMaxPlaybackRate(int frequency_hz) override { | 136 void SetMaxPlaybackRate(int frequency_hz) override { |
129 return enc_->SetMaxPlaybackRate(frequency_hz); | 137 return enc_->SetMaxPlaybackRate(frequency_hz); |
130 } | 138 } |
131 void SetProjectedPacketLossRate(double fraction) override { | 139 void SetProjectedPacketLossRate(double fraction) override { |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 return receiver_.LeastRequiredDelayMs(); | 936 return receiver_.LeastRequiredDelayMs(); |
929 } | 937 } |
930 | 938 |
931 void AudioCodingModuleImpl::GetDecodingCallStatistics( | 939 void AudioCodingModuleImpl::GetDecodingCallStatistics( |
932 AudioDecodingCallStats* call_stats) const { | 940 AudioDecodingCallStats* call_stats) const { |
933 receiver_.GetDecodingCallStatistics(call_stats); | 941 receiver_.GetDecodingCallStatistics(call_stats); |
934 } | 942 } |
935 | 943 |
936 } // namespace acm2 | 944 } // namespace acm2 |
937 } // namespace webrtc | 945 } // namespace webrtc |
OLD | NEW |