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

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: Turned DecoderInfo factory into a raw pointer. Removed two unnecessary comments. 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..1f6d3bc058f56061dcd895168c166567513a8977 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,26 +46,14 @@ 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,
+ MOCK_CONST_METHOD0(GetActiveDecoder,
AudioDecoder*());
MOCK_METHOD1(SetActiveCngDecoder,
int(uint8_t rtp_payload_type));
- MOCK_METHOD0(GetActiveCngDecoder,
+ MOCK_CONST_METHOD0(GetActiveCngDecoder,
ComfortNoiseDecoder*());
- MOCK_CONST_METHOD1(CheckPayloadTypes,
- int(const PacketList& packet_list));
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/audio_coding/neteq/decoder_database.cc ('k') | webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698