• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #include "media/base/mock_filters.h"
6 
7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h"
9 
10 using ::testing::_;
11 using ::testing::Invoke;
12 using ::testing::NotNull;
13 using ::testing::Return;
14 
15 namespace media {
16 
MockDemuxer()17 MockDemuxer::MockDemuxer() {}
18 
~MockDemuxer()19 MockDemuxer::~MockDemuxer() {}
20 
MockDemuxerStream(DemuxerStream::Type type)21 MockDemuxerStream::MockDemuxerStream(DemuxerStream::Type type) : type_(type) {}
22 
~MockDemuxerStream()23 MockDemuxerStream::~MockDemuxerStream() {}
24 
type()25 DemuxerStream::Type MockDemuxerStream::type() {
26   return type_;
27 }
28 
audio_decoder_config()29 AudioDecoderConfig MockDemuxerStream::audio_decoder_config() {
30   DCHECK_EQ(type_, DemuxerStream::AUDIO);
31   return audio_decoder_config_;
32 }
33 
video_decoder_config()34 VideoDecoderConfig MockDemuxerStream::video_decoder_config() {
35   DCHECK_EQ(type_, DemuxerStream::VIDEO);
36   return video_decoder_config_;
37 }
38 
set_audio_decoder_config(const AudioDecoderConfig & config)39 void MockDemuxerStream::set_audio_decoder_config(
40     const AudioDecoderConfig& config) {
41   DCHECK_EQ(type_, DemuxerStream::AUDIO);
42   audio_decoder_config_ = config;
43 }
44 
set_video_decoder_config(const VideoDecoderConfig & config)45 void MockDemuxerStream::set_video_decoder_config(
46     const VideoDecoderConfig& config) {
47   DCHECK_EQ(type_, DemuxerStream::VIDEO);
48   video_decoder_config_ = config;
49 }
50 
video_rotation()51 VideoRotation MockDemuxerStream::video_rotation() {
52   return VIDEO_ROTATION_0;
53 }
54 
GetDisplayName() const55 std::string MockVideoDecoder::GetDisplayName() const {
56   return "MockVideoDecoder";
57 }
58 
MockVideoDecoder()59 MockVideoDecoder::MockVideoDecoder() {
60   EXPECT_CALL(*this, HasAlpha()).WillRepeatedly(Return(false));
61 }
62 
GetDisplayName() const63 std::string MockAudioDecoder::GetDisplayName() const {
64   return "MockAudioDecoder";
65 }
66 
~MockVideoDecoder()67 MockVideoDecoder::~MockVideoDecoder() {}
68 
MockAudioDecoder()69 MockAudioDecoder::MockAudioDecoder() {}
70 
~MockAudioDecoder()71 MockAudioDecoder::~MockAudioDecoder() {}
72 
MockVideoRenderer()73 MockVideoRenderer::MockVideoRenderer() {}
74 
~MockVideoRenderer()75 MockVideoRenderer::~MockVideoRenderer() {}
76 
MockAudioRenderer()77 MockAudioRenderer::MockAudioRenderer() {}
78 
~MockAudioRenderer()79 MockAudioRenderer::~MockAudioRenderer() {}
80 
MockRenderer()81 MockRenderer::MockRenderer() {}
82 
~MockRenderer()83 MockRenderer::~MockRenderer() {}
84 
MockTimeSource()85 MockTimeSource::MockTimeSource() {}
86 
~MockTimeSource()87 MockTimeSource::~MockTimeSource() {}
88 
MockTextTrack()89 MockTextTrack::MockTextTrack() {}
90 
~MockTextTrack()91 MockTextTrack::~MockTextTrack() {}
92 
MockDecryptor()93 MockDecryptor::MockDecryptor() {}
94 
~MockDecryptor()95 MockDecryptor::~MockDecryptor() {}
96 
97 }  // namespace media
98