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

Unified Diff: webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc

Issue 1883543002: Revert of Remove the deprecated EncodeInternal interface from AudioEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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/cng/audio_encoder_cng_unittest.cc
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
index 8b80d2181da26208473e6a240537ff12aa7ff5bf..8f30d783ae4c8fa24170f6074163cae365343390 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng_unittest.cc
@@ -25,6 +25,7 @@
namespace webrtc {
namespace {
+static const size_t kMockMaxEncodedBytes = 1000;
static const size_t kMaxNumSamples = 48 * 10 * 2; // 10 ms @ 48 kHz stereo.
static const size_t kMockReturnEncodedBytes = 17;
static const int kCngPayloadType = 18;
@@ -73,6 +74,8 @@
// as long as it is smaller than 10.
EXPECT_CALL(*mock_encoder_, Max10MsFramesInAPacket())
.WillOnce(Return(1u));
+ EXPECT_CALL(*mock_encoder_, MaxEncodedBytes())
+ .WillRepeatedly(Return(kMockMaxEncodedBytes));
}
cng_.reset(new AudioEncoderCng(std::move(config)));
}
@@ -87,8 +90,8 @@
}
// Expect |num_calls| calls to the encoder, all successful. The last call
- // claims to have encoded |kMockReturnEncodedBytes| bytes, and all the
- // preceding ones 0 bytes.
+ // claims to have encoded |kMockMaxEncodedBytes| bytes, and all the preceding
+ // ones 0 bytes.
void ExpectEncodeCalls(size_t num_calls) {
InSequence s;
AudioEncoder::EncodedInfo info;

Powered by Google App Engine
This is Rietveld 408576698