Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1111)

Unified Diff: webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h

Issue 1184313002: Add AudioEncoder::GetTargetBitrate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Reverting to SetTargetBitrate returning void Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
diff --git a/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h b/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
index 4de4e26273f98d3fa077c286eb008d185711f6cb..442e83cd7f656a943d584fc3588b52fb8eb13211 100644
--- a/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
+++ b/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
@@ -52,12 +52,15 @@ class AudioEncoderOpus final : public AudioEncoder {
size_t MaxEncodedBytes() const override;
int Num10MsFramesInNextPacket() const override;
int Max10MsFramesInAPacket() const override;
+ int GetTargetBitrate() const override;
void SetTargetBitrate(int bits_per_second) override;
void SetProjectedPacketLossRate(double fraction) override;
double packet_loss_rate() const { return packet_loss_rate_; }
ApplicationMode application() const { return application_; }
bool dtx_enabled() const { return dtx_enabled_; }
+ int bitrate_bps() const { return bitrate_bps_; }
kwiberg-webrtc 2015/06/17 14:36:31 Do you really need this anymore? GetTargetBitrate
hlundin-webrtc 2015/06/18 08:52:18 Done.
+
EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
const int16_t* audio,
size_t max_encoded_bytes,
@@ -104,6 +107,10 @@ class AudioEncoderMutableOpus
CriticalSectionScoped cs(encoder_lock_.get());
return encoder()->dtx_enabled();
}
+ int bitrate_bps() const {
+ CriticalSectionScoped cs(encoder_lock_.get());
+ return encoder()->bitrate_bps();
+ }
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698