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

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

Issue 2537243004: Revert of Renaming AudioEncoder::SetTargetBitrate and SetProjectedPacketLossRate. (Closed)
Patch Set: 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 4c4313c62124e57260077708a4634969f00b906e..f30d657d133358eb20d84afec5a4e98c0062138f 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
@@ -102,6 +102,9 @@
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;
@@ -117,7 +120,7 @@
}
// Getters for testing.
- float packet_loss_rate() const { return packet_loss_rate_; }
+ double 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_; }
@@ -137,15 +140,13 @@
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_;
- float packet_loss_rate_;
+ double 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