OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/base/mock_filters.h" | 5 #include "media/base/mock_filters.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 | 9 |
10 using ::testing::_; | 10 using ::testing::_; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 const std::string& session_id, | 66 const std::string& session_id, |
67 scoped_array<uint8> message, | 67 scoped_array<uint8> message, |
68 int message_length, | 68 int message_length, |
69 const std::string& default_url) { | 69 const std::string& default_url) { |
70 KeyMessageMock(key_system, session_id, message.get(), message_length, | 70 KeyMessageMock(key_system, session_id, message.get(), message_length, |
71 default_url); | 71 default_url); |
72 } | 72 } |
73 | 73 |
74 void MockDecryptorClient::NeedKey(const std::string& key_system, | 74 void MockDecryptorClient::NeedKey(const std::string& key_system, |
75 const std::string& session_id, | 75 const std::string& session_id, |
| 76 const std::string& type, |
76 scoped_array<uint8> init_data, | 77 scoped_array<uint8> init_data, |
77 int init_data_length) { | 78 int init_data_length) { |
78 NeedKeyMock(key_system, session_id, init_data.get(), init_data_length); | 79 NeedKeyMock(key_system, session_id, type, init_data.get(), init_data_length); |
79 } | 80 } |
80 | 81 |
81 MockFilterCollection::MockFilterCollection() | 82 MockFilterCollection::MockFilterCollection() |
82 : demuxer_(new MockDemuxer()), | 83 : demuxer_(new MockDemuxer()), |
83 video_decoder_(new MockVideoDecoder()), | 84 video_decoder_(new MockVideoDecoder()), |
84 audio_decoder_(new MockAudioDecoder()), | 85 audio_decoder_(new MockAudioDecoder()), |
85 video_renderer_(new MockVideoRenderer()), | 86 video_renderer_(new MockVideoRenderer()), |
86 audio_renderer_(new MockAudioRenderer()) { | 87 audio_renderer_(new MockAudioRenderer()) { |
87 } | 88 } |
88 | 89 |
89 MockFilterCollection::~MockFilterCollection() {} | 90 MockFilterCollection::~MockFilterCollection() {} |
90 | 91 |
91 scoped_ptr<FilterCollection> MockFilterCollection::Create() { | 92 scoped_ptr<FilterCollection> MockFilterCollection::Create() { |
92 scoped_ptr<FilterCollection> collection(new FilterCollection()); | 93 scoped_ptr<FilterCollection> collection(new FilterCollection()); |
93 collection->SetDemuxer(demuxer_); | 94 collection->SetDemuxer(demuxer_); |
94 collection->GetVideoDecoders()->push_back(video_decoder_); | 95 collection->GetVideoDecoders()->push_back(video_decoder_); |
95 collection->GetAudioDecoders()->push_back(audio_decoder_); | 96 collection->GetAudioDecoders()->push_back(audio_decoder_); |
96 collection->AddVideoRenderer(video_renderer_); | 97 collection->AddVideoRenderer(video_renderer_); |
97 collection->AddAudioRenderer(audio_renderer_); | 98 collection->AddAudioRenderer(audio_renderer_); |
98 return collection.Pass(); | 99 return collection.Pass(); |
99 } | 100 } |
100 | 101 |
101 MockStatisticsCB::MockStatisticsCB() {} | 102 MockStatisticsCB::MockStatisticsCB() {} |
102 | 103 |
103 MockStatisticsCB::~MockStatisticsCB() {} | 104 MockStatisticsCB::~MockStatisticsCB() {} |
104 | 105 |
105 } // namespace media | 106 } // namespace media |
OLD | NEW |