1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "media/base/mock_filters.h"
7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h"
11 using ::testing::Invoke
;
12 using ::testing::NotNull
;
13 using ::testing::Return
;
17 MockDemuxer::MockDemuxer() {}
19 MockDemuxer::~MockDemuxer() {}
21 MockDemuxerStream::MockDemuxerStream(DemuxerStream::Type type
) : type_(type
) {}
23 MockDemuxerStream::~MockDemuxerStream() {}
25 DemuxerStream::Type
MockDemuxerStream::type() {
29 AudioDecoderConfig
MockDemuxerStream::audio_decoder_config() {
30 DCHECK_EQ(type_
, DemuxerStream::AUDIO
);
31 return audio_decoder_config_
;
34 VideoDecoderConfig
MockDemuxerStream::video_decoder_config() {
35 DCHECK_EQ(type_
, DemuxerStream::VIDEO
);
36 return video_decoder_config_
;
39 void MockDemuxerStream::set_audio_decoder_config(
40 const AudioDecoderConfig
& config
) {
41 DCHECK_EQ(type_
, DemuxerStream::AUDIO
);
42 audio_decoder_config_
= config
;
45 void MockDemuxerStream::set_video_decoder_config(
46 const VideoDecoderConfig
& config
) {
47 DCHECK_EQ(type_
, DemuxerStream::VIDEO
);
48 video_decoder_config_
= config
;
51 VideoRotation
MockDemuxerStream::video_rotation() {
52 return VIDEO_ROTATION_0
;
55 MockVideoDecoder::MockVideoDecoder() {
56 EXPECT_CALL(*this, HasAlpha()).WillRepeatedly(Return(false));
59 MockVideoDecoder::~MockVideoDecoder() {}
61 MockAudioDecoder::MockAudioDecoder() {}
63 MockAudioDecoder::~MockAudioDecoder() {}
65 MockVideoRenderer::MockVideoRenderer() {}
67 MockVideoRenderer::~MockVideoRenderer() {}
69 MockAudioRenderer::MockAudioRenderer() {}
71 MockAudioRenderer::~MockAudioRenderer() {}
73 MockTextTrack::MockTextTrack() {}
75 MockTextTrack::~MockTextTrack() {}
77 MockDecryptor::MockDecryptor() {}
79 MockDecryptor::~MockDecryptor() {}
81 MockStatisticsCB::MockStatisticsCB() {}
83 MockStatisticsCB::~MockStatisticsCB() {}