OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 return encoder_->RtpTimestampRateHz(); | 75 return encoder_->RtpTimestampRateHz(); |
76 } | 76 } |
77 int Num10MsFramesInNextPacket() const override { | 77 int Num10MsFramesInNextPacket() const override { |
78 CriticalSectionScoped cs(encoder_lock_.get()); | 78 CriticalSectionScoped cs(encoder_lock_.get()); |
79 return encoder_->Num10MsFramesInNextPacket(); | 79 return encoder_->Num10MsFramesInNextPacket(); |
80 } | 80 } |
81 int Max10MsFramesInAPacket() const override { | 81 int Max10MsFramesInAPacket() const override { |
82 CriticalSectionScoped cs(encoder_lock_.get()); | 82 CriticalSectionScoped cs(encoder_lock_.get()); |
83 return encoder_->Max10MsFramesInAPacket(); | 83 return encoder_->Max10MsFramesInAPacket(); |
84 } | 84 } |
| 85 int GetTargetBitrate() const override { |
| 86 CriticalSectionScoped cs(encoder_lock_.get()); |
| 87 return encoder_->GetTargetBitrate(); |
| 88 } |
85 void SetTargetBitrate(int bits_per_second) override { | 89 void SetTargetBitrate(int bits_per_second) override { |
86 CriticalSectionScoped cs(encoder_lock_.get()); | 90 CriticalSectionScoped cs(encoder_lock_.get()); |
87 encoder_->SetTargetBitrate(bits_per_second); | 91 encoder_->SetTargetBitrate(bits_per_second); |
88 } | 92 } |
89 void SetProjectedPacketLossRate(double fraction) override { | 93 void SetProjectedPacketLossRate(double fraction) override { |
90 CriticalSectionScoped cs(encoder_lock_.get()); | 94 CriticalSectionScoped cs(encoder_lock_.get()); |
91 encoder_->SetProjectedPacketLossRate(fraction); | 95 encoder_->SetProjectedPacketLossRate(fraction); |
92 } | 96 } |
93 | 97 |
94 protected: | 98 protected: |
(...skipping 25 matching lines...) Expand all Loading... |
120 const rtc::scoped_ptr<CriticalSectionWrapper> encoder_lock_; | 124 const rtc::scoped_ptr<CriticalSectionWrapper> encoder_lock_; |
121 | 125 |
122 private: | 126 private: |
123 rtc::scoped_ptr<T> encoder_ GUARDED_BY(encoder_lock_); | 127 rtc::scoped_ptr<T> encoder_ GUARDED_BY(encoder_lock_); |
124 typename T::Config config_ GUARDED_BY(encoder_lock_); | 128 typename T::Config config_ GUARDED_BY(encoder_lock_); |
125 }; | 129 }; |
126 | 130 |
127 } // namespace webrtc | 131 } // namespace webrtc |
128 | 132 |
129 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_MUTABLE_IMPL_H_ | 133 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_MUTABLE_IMPL_H_ |
OLD | NEW |