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

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

Issue 2411613002: Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate. (Closed)
Patch Set: rebasing Created 4 years, 1 month 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/audio_encoder_opus.h
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
index f30d657d133358eb20d84afec5a4e98c0062138f..4c4313c62124e57260077708a4634969f00b906e 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
@@ -102,9 +102,6 @@ class AudioEncoderOpus final : public AudioEncoder {
bool SetApplication(Application application) override;
void SetMaxPlaybackRate(int frequency_hz) override;
- void SetProjectedPacketLossRate(double fraction) override;
- void SetTargetBitrate(int target_bps) override;
-
bool EnableAudioNetworkAdaptor(const std::string& config_string,
const Clock* clock) override;
void DisableAudioNetworkAdaptor() override;
@@ -120,7 +117,7 @@ class AudioEncoderOpus final : public AudioEncoder {
}
// Getters for testing.
- double packet_loss_rate() const { return packet_loss_rate_; }
+ float packet_loss_rate() const { return packet_loss_rate_; }
ApplicationMode application() const { return config_.application; }
bool fec_enabled() const { return config_.fec_enabled; }
size_t num_channels_to_encode() const { return num_channels_to_encode_; }
@@ -140,13 +137,15 @@ class AudioEncoderOpus final : public AudioEncoder {
bool RecreateEncoderInstance(const Config& config);
void SetFrameLength(int frame_length_ms);
void SetNumChannelsToEncode(size_t num_channels_to_encode);
+ void SetProjectedPacketLossRate(float fraction);
+ void SetTargetBitrate(int target_bps);
void ApplyAudioNetworkAdaptor();
std::unique_ptr<AudioNetworkAdaptor> DefaultAudioNetworkAdaptorCreator(
const std::string& config_string,
const Clock* clock) const;
Config config_;
- double packet_loss_rate_;
+ float packet_loss_rate_;
std::vector<int16_t> input_buffer_;
OpusEncInst* inst_;
uint32_t first_timestamp_in_buffer_;

Powered by Google App Engine
This is Rietveld 408576698