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

Unified Diff: webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h

Issue 2516993002: Pass SdpAudioFormat through Channel, without converting to CodecInst (Closed)
Patch Set: add TODO Created 3 years, 11 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
« no previous file with comments | « webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc ('k') | webrtc/tools/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h
diff --git a/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h b/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h
index f2ef1707103f5dc0ea81fbbdbf19cdba28a4c524..b988b85dc79da49b42fb168b1eea6ff6481966c8 100644
--- a/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h
+++ b/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h
@@ -15,6 +15,7 @@
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h"
+#include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
#include "webrtc/test/gmock.h"
namespace webrtc {
@@ -22,6 +23,7 @@ namespace webrtc {
class MockAudioDecoderFactory : public AudioDecoderFactory {
public:
MOCK_METHOD0(GetSupportedDecoders, std::vector<AudioCodecSpec>());
+ MOCK_METHOD1(IsSupportedDecoder, bool(const SdpAudioFormat&));
std::unique_ptr<AudioDecoder> MakeAudioDecoder(
const SdpAudioFormat& format) {
std::unique_ptr<AudioDecoder> return_value;
@@ -46,6 +48,8 @@ class MockAudioDecoderFactory : public AudioDecoderFactory {
ON_CALL(*factory.get(), GetSupportedDecoders())
.WillByDefault(Return(std::vector<webrtc::AudioCodecSpec>()));
EXPECT_CALL(*factory.get(), GetSupportedDecoders()).Times(AnyNumber());
+ ON_CALL(*factory, IsSupportedDecoder(_)).WillByDefault(Return(false));
+ EXPECT_CALL(*factory, IsSupportedDecoder(_)).Times(AnyNumber());
EXPECT_CALL(*factory.get(), MakeAudioDecoderMock(_, _)).Times(0);
return factory;
}
@@ -65,6 +69,8 @@ class MockAudioDecoderFactory : public AudioDecoderFactory {
ON_CALL(*factory.get(), GetSupportedDecoders())
.WillByDefault(Return(std::vector<webrtc::AudioCodecSpec>()));
EXPECT_CALL(*factory.get(), GetSupportedDecoders()).Times(AnyNumber());
+ ON_CALL(*factory, IsSupportedDecoder(_)).WillByDefault(Return(false));
+ EXPECT_CALL(*factory, IsSupportedDecoder(_)).Times(AnyNumber());
ON_CALL(*factory.get(), MakeAudioDecoderMock(_, _))
.WillByDefault(SetArgPointee<1>(nullptr));
EXPECT_CALL(*factory.get(), MakeAudioDecoderMock(_, _)).Times(AnyNumber());
« no previous file with comments | « webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.cc ('k') | webrtc/tools/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698