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

Side by Side Diff: media/base/mock_filters.cc

Issue 11226019: Encrypted Media: Replace DecryptorClient with key event callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase again Created 7 years, 12 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 unified diff | Download patch
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const DecoderInitCB& init_cb) { 49 const DecoderInitCB& init_cb) {
50 InitializeAudioDecoderMock(*config, init_cb); 50 InitializeAudioDecoderMock(*config, init_cb);
51 } 51 }
52 52
53 void MockDecryptor::InitializeVideoDecoder( 53 void MockDecryptor::InitializeVideoDecoder(
54 scoped_ptr<VideoDecoderConfig> config, 54 scoped_ptr<VideoDecoderConfig> config,
55 const DecoderInitCB& init_cb) { 55 const DecoderInitCB& init_cb) {
56 InitializeVideoDecoderMock(*config, init_cb); 56 InitializeVideoDecoderMock(*config, init_cb);
57 } 57 }
58 58
59 MockDecryptorClient::MockDecryptorClient() {}
60
61 MockDecryptorClient::~MockDecryptorClient() {}
62
63 void MockDecryptorClient::NeedKey(const std::string& key_system,
64 const std::string& session_id,
65 const std::string& type,
66 scoped_array<uint8> init_data,
67 int init_data_length) {
68 NeedKeyMock(key_system, session_id, type, init_data.get(), init_data_length);
69 }
70
71 MockFilterCollection::MockFilterCollection() 59 MockFilterCollection::MockFilterCollection()
72 : demuxer_(new MockDemuxer()), 60 : demuxer_(new MockDemuxer()),
73 video_decoder_(new MockVideoDecoder()), 61 video_decoder_(new MockVideoDecoder()),
74 audio_decoder_(new MockAudioDecoder()), 62 audio_decoder_(new MockAudioDecoder()),
75 video_renderer_(new MockVideoRenderer()), 63 video_renderer_(new MockVideoRenderer()),
76 audio_renderer_(new MockAudioRenderer()) { 64 audio_renderer_(new MockAudioRenderer()) {
77 } 65 }
78 66
79 MockFilterCollection::~MockFilterCollection() {} 67 MockFilterCollection::~MockFilterCollection() {}
80 68
81 scoped_ptr<FilterCollection> MockFilterCollection::Create() { 69 scoped_ptr<FilterCollection> MockFilterCollection::Create() {
82 scoped_ptr<FilterCollection> collection(new FilterCollection()); 70 scoped_ptr<FilterCollection> collection(new FilterCollection());
83 collection->SetDemuxer(demuxer_); 71 collection->SetDemuxer(demuxer_);
84 collection->GetVideoDecoders()->push_back(video_decoder_); 72 collection->GetVideoDecoders()->push_back(video_decoder_);
85 collection->GetAudioDecoders()->push_back(audio_decoder_); 73 collection->GetAudioDecoders()->push_back(audio_decoder_);
86 collection->AddVideoRenderer(video_renderer_); 74 collection->AddVideoRenderer(video_renderer_);
87 collection->AddAudioRenderer(audio_renderer_); 75 collection->AddAudioRenderer(audio_renderer_);
88 return collection.Pass(); 76 return collection.Pass();
89 } 77 }
90 78
91 MockStatisticsCB::MockStatisticsCB() {} 79 MockStatisticsCB::MockStatisticsCB() {}
92 80
93 MockStatisticsCB::~MockStatisticsCB() {} 81 MockStatisticsCB::~MockStatisticsCB() {}
94 82
95 } // namespace media 83 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698