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..8dc9bdf4bdd06e94305b24d441665e5a81f1b54b 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,19 @@ int AudioEncoderIlbc::Max10MsFramesInAPacket() const { |
return num_10ms_frames_per_packet_; |
} |
+int AudioEncoderIlbc::GetTargetBitrate() const { |
+ switch (num_10ms_frames_per_packet_) { |
+ case 2: case 4: |
+ // 38 bytes per frame of 20 ms => 15200 bits/s. |
+ return 15200; |
+ case 3: case 6: |
+ // 50 bytes per frame of 30 ms => (approx) 13333 bits/s. |
+ return 13333; |
+ default: |
+ FATAL(); |
+ } |
+} |
+ |
AudioEncoder::EncodedInfo AudioEncoderIlbc::EncodeInternal( |
uint32_t rtp_timestamp, |
const int16_t* audio, |