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

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc

Issue 1184313002: Add AudioEncoder::GetTargetBitrate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Getting rid of erroneous code 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/ilbc/audio_encoder_ilbc.cc
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc
index 66d24650a659d9b505dca51cdff39b0527bac6e2..e36675f7205b4657cedc58a86799203ead09bcc0 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc
+++ b/webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc
@@ -66,6 +66,14 @@ int AudioEncoderIlbc::Max10MsFramesInAPacket() const {
return num_10ms_frames_per_packet_;
}
+int AudioEncoderIlbc::SetTargetBitrate(int bits_per_second) {
+ switch (num_10ms_frames_per_packet_) {
+ case 2: case 4: return 15200;
+ case 3: case 6: return 13333;
kwiberg-webrtc 2015/06/16 19:22:54 I'd recommend an explanation here. Otherwise these
hlundin-webrtc 2015/06/16 21:38:50 Done.
+ default: FATAL();
+ }
+}
+
AudioEncoder::EncodedInfo AudioEncoderIlbc::EncodeInternal(
uint32_t rtp_timestamp,
const int16_t* audio,

Powered by Google App Engine
This is Rietveld 408576698