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

Unified Diff: webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h

Issue 2276913002: DecoderDatabase: Made several methods nonvirtual to minimize mockable interface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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/neteq/mock/mock_decoder_database.h
diff --git a/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h b/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h
index 3865db2cee754db2b941a6ed2dea92d26cfbfb89..12c923b396c637c59ab58ce60980c374f74de5c5 100644
--- a/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h
+++ b/webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h
@@ -21,7 +21,9 @@ namespace webrtc {
class MockDecoderDatabase : public DecoderDatabase {
public:
- MockDecoderDatabase() : DecoderDatabase(nullptr) {}
+ explicit MockDecoderDatabase(
+ rtc::scoped_refptr<AudioDecoderFactory> factory = nullptr)
+ : DecoderDatabase(factory) {}
virtual ~MockDecoderDatabase() { Die(); }
MOCK_METHOD0(Die, void());
MOCK_CONST_METHOD0(Empty,
@@ -44,16 +46,6 @@ class MockDecoderDatabase : public DecoderDatabase {
const DecoderInfo*(uint8_t rtp_payload_type));
MOCK_CONST_METHOD1(GetRtpPayloadType,
uint8_t(NetEqDecoder codec_type));
- MOCK_METHOD1(GetDecoder,
- AudioDecoder*(uint8_t rtp_payload_type));
- MOCK_CONST_METHOD2(IsType,
- bool(uint8_t rtp_payload_type, NetEqDecoder codec_type));
- MOCK_CONST_METHOD1(IsComfortNoise,
- bool(uint8_t rtp_payload_type));
- MOCK_CONST_METHOD1(IsDtmf,
- bool(uint8_t rtp_payload_type));
- MOCK_CONST_METHOD1(IsRed,
- bool(uint8_t rtp_payload_type));
MOCK_METHOD2(SetActiveDecoder,
int(uint8_t rtp_payload_type, bool* new_decoder));
MOCK_METHOD0(GetActiveDecoder,

Powered by Google App Engine
This is Rietveld 408576698