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

@ -26,6 +26,7 @@ class MockAudioEncoder : public AudioEncoder {
MOCK_CONST_METHOD0(MaxEncodedBytes, size_t());
MOCK_CONST_METHOD0(Num10MsFramesInNextPacket, int());
MOCK_CONST_METHOD0(Max10MsFramesInAPacket, int());
MOCK_CONST_METHOD0(GetTargetBitrate, int());
MOCK_METHOD1(SetTargetBitrate, void(int));
MOCK_METHOD1(SetProjectedPacketLossRate, void(double));
// Note, we explicitly chose not to create a mock for the Encode method.
@ -43,6 +44,7 @@ class MockAudioEncoderMutable : public AudioEncoderMutable {
MOCK_CONST_METHOD0(MaxEncodedBytes, size_t());
MOCK_CONST_METHOD0(Num10MsFramesInNextPacket, int());
MOCK_CONST_METHOD0(Max10MsFramesInAPacket, int());
MOCK_CONST_METHOD0(GetTargetBitrate, int());
MOCK_METHOD1(SetTargetBitrate, void(int));
MOCK_METHOD1(SetProjectedPacketLossRate, void(double));
// Note, we explicitly chose not to create a mock for the Encode method.