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 "webkit/media/crypto/ppapi_decryptor.h" | 5 #include "webkit/media/crypto/ppapi_decryptor.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/message_loop_proxy.h" | 13 #include "base/message_loop_proxy.h" |
14 #include "media/base/decoder_buffer.h" | 14 #include "media/base/decoder_buffer.h" |
15 #include "media/base/decryptor_client.h" | 15 #include "media/base/decryptor_client.h" |
16 #include "media/base/video_decoder_config.h" | |
ddorwin
2012/09/21 00:36:08
These don't seem necessary.
xhwang
2012/09/25 23:52:32
Surprise! After I removed these two everything sti
ddorwin
2012/09/26 02:34:27
We use VideoDecodeCB and DecoderInitCB, but not Vi
| |
17 #include "media/base/video_frame.h" | |
16 #include "webkit/media/crypto/key_systems.h" | 18 #include "webkit/media/crypto/key_systems.h" |
17 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
18 | 20 |
19 namespace webkit_media { | 21 namespace webkit_media { |
20 | 22 |
21 PpapiDecryptor::PpapiDecryptor( | 23 PpapiDecryptor::PpapiDecryptor( |
22 media::DecryptorClient* client, | 24 media::DecryptorClient* client, |
23 const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance) | 25 const scoped_refptr<webkit::ppapi::PluginInstance>& plugin_instance) |
24 : client_(client), | 26 : client_(client), |
25 cdm_plugin_(plugin_instance), | 27 cdm_plugin_(plugin_instance), |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 return; | 95 return; |
94 } | 96 } |
95 | 97 |
96 if (!cdm_plugin_->Decrypt(encrypted, decrypt_cb)) | 98 if (!cdm_plugin_->Decrypt(encrypted, decrypt_cb)) |
97 decrypt_cb.Run(kError, NULL); | 99 decrypt_cb.Run(kError, NULL); |
98 } | 100 } |
99 | 101 |
100 void PpapiDecryptor::Stop() { | 102 void PpapiDecryptor::Stop() { |
101 } | 103 } |
102 | 104 |
105 void PpapiDecryptor::InitializeVideoDecoder( | |
106 const media::VideoDecoderConfig& config, | |
107 const InitializeCB& init_cb) { | |
108 NOTIMPLEMENTED(); | |
ddorwin
2012/09/21 00:36:08
TODO(xhwang): Impelement.?
It seems these are inte
xhwang
2012/09/25 23:52:32
Added comments.
| |
109 init_cb.Run(false); | |
110 } | |
111 | |
112 void PpapiDecryptor::DecryptAndDecodeVideo( | |
113 const scoped_refptr<media::DecoderBuffer>& encrypted, | |
114 const VideoDecodeCB& video_decode_cb) { | |
115 NOTIMPLEMENTED(); | |
116 video_decode_cb.Run(kError, NULL); | |
117 } | |
118 | |
119 void PpapiDecryptor::ResetVideoDecoder() { | |
120 NOTIMPLEMENTED(); | |
121 } | |
122 | |
123 void PpapiDecryptor::StopVideoDecoder() { | |
124 NOTIMPLEMENTED(); | |
125 } | |
126 | |
103 void PpapiDecryptor::ReportFailureToCallPlugin(const std::string& key_system, | 127 void PpapiDecryptor::ReportFailureToCallPlugin(const std::string& key_system, |
104 const std::string& session_id) { | 128 const std::string& session_id) { |
105 DVLOG(1) << "Failed to call plugin."; | 129 DVLOG(1) << "Failed to call plugin."; |
106 client_->KeyError(key_system, session_id, kUnknownError, 0); | 130 client_->KeyError(key_system, session_id, kUnknownError, 0); |
107 } | 131 } |
108 | 132 |
109 } // namespace webkit_media | 133 } // namespace webkit_media |
OLD | NEW |