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 std::string
MockDemuxer::GetDisplayName() const {
25 MockDemuxerStream::MockDemuxerStream(DemuxerStream::Type type
)
26 : type_(type
), liveness_(LIVENESS_UNKNOWN
) {
29 MockDemuxerStream::~MockDemuxerStream() {}
31 DemuxerStream::Type
MockDemuxerStream::type() const {
35 DemuxerStream::Liveness
MockDemuxerStream::liveness() const {
39 AudioDecoderConfig
MockDemuxerStream::audio_decoder_config() {
40 DCHECK_EQ(type_
, DemuxerStream::AUDIO
);
41 return audio_decoder_config_
;
44 VideoDecoderConfig
MockDemuxerStream::video_decoder_config() {
45 DCHECK_EQ(type_
, DemuxerStream::VIDEO
);
46 return video_decoder_config_
;
49 void MockDemuxerStream::set_audio_decoder_config(
50 const AudioDecoderConfig
& config
) {
51 DCHECK_EQ(type_
, DemuxerStream::AUDIO
);
52 audio_decoder_config_
= config
;
55 void MockDemuxerStream::set_video_decoder_config(
56 const VideoDecoderConfig
& config
) {
57 DCHECK_EQ(type_
, DemuxerStream::VIDEO
);
58 video_decoder_config_
= config
;
61 void MockDemuxerStream::set_liveness(DemuxerStream::Liveness liveness
) {
65 VideoRotation
MockDemuxerStream::video_rotation() {
66 return VIDEO_ROTATION_0
;
69 std::string
MockVideoDecoder::GetDisplayName() const {
70 return "MockVideoDecoder";
73 MockVideoDecoder::MockVideoDecoder() {
74 EXPECT_CALL(*this, HasAlpha()).WillRepeatedly(Return(false));
77 std::string
MockAudioDecoder::GetDisplayName() const {
78 return "MockAudioDecoder";
81 MockVideoDecoder::~MockVideoDecoder() {}
83 MockAudioDecoder::MockAudioDecoder() {}
85 MockAudioDecoder::~MockAudioDecoder() {}
87 MockVideoRenderer::MockVideoRenderer() {}
89 MockVideoRenderer::~MockVideoRenderer() {}
91 MockAudioRenderer::MockAudioRenderer() {}
93 MockAudioRenderer::~MockAudioRenderer() {}
95 MockRenderer::MockRenderer() {}
97 MockRenderer::~MockRenderer() {}
99 MockTimeSource::MockTimeSource() {}
101 MockTimeSource::~MockTimeSource() {}
103 MockTextTrack::MockTextTrack() {}
105 MockTextTrack::~MockTextTrack() {}
107 MockDecryptor::MockDecryptor() {}
109 MockDecryptor::~MockDecryptor() {}