Add AudioEncoder::GetTargetBitrate

The GetTargetBitrate implementation will return the
target bitrate of the codec. This may differ from the
desired target bitrate, as set by SetTargetBitrate, depending on implementation.

Tests are updated to exercise the new functionality.

R=kwiberg@webrtc.org

Review URL: https://codereview.webrtc.org/1184313002.

Cr-Commit-Position: refs/heads/master@{#9461}
This commit is contained in:
Henrik Lundin
2015-06-18 14:58:34 +02:00
parent e9bdfd859c
commit 3e89dbf458
21 changed files with 185 additions and 10 deletions

View File

@ -49,6 +49,10 @@ int AudioEncoderCopyRed::Max10MsFramesInAPacket() const {
return speech_encoder_->Max10MsFramesInAPacket();
}
int AudioEncoderCopyRed::GetTargetBitrate() const {
return speech_encoder_->GetTargetBitrate();
}
void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) {
speech_encoder_->SetTargetBitrate(bits_per_second);
}

View File

@ -42,6 +42,7 @@ class AudioEncoderCopyRed : public AudioEncoder {
int RtpTimestampRateHz() 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;
EncodedInfo EncodeInternal(uint32_t rtp_timestamp,