| 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/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 base::Bind(&PpapiDecryptor::DecryptAndDecodeAudio, | 182 base::Bind(&PpapiDecryptor::DecryptAndDecodeAudio, |
| 183 base::Unretained(this), encrypted, audio_decode_cb)); | 183 base::Unretained(this), encrypted, audio_decode_cb)); |
| 184 return; | 184 return; |
| 185 } | 185 } |
| 186 | 186 |
| 187 DVLOG(1) << "DecryptAndDecodeAudio()"; | 187 DVLOG(1) << "DecryptAndDecodeAudio()"; |
| 188 // TODO(xhwang): Enable this once PluginInstance is updated. | 188 // TODO(xhwang): Enable this once PluginInstance is updated. |
| 189 // if (!cdm_plugin_->DecryptAndDecodeAudio(encrypted, audio_decode_cb)) | 189 // if (!cdm_plugin_->DecryptAndDecodeAudio(encrypted, audio_decode_cb)) |
| 190 // audio_decode_cb.Run(kError, NULL); | 190 // audio_decode_cb.Run(kError, NULL); |
| 191 NOTIMPLEMENTED(); | 191 NOTIMPLEMENTED(); |
| 192 audio_decode_cb.Run(kError, scoped_ptr<AudioBuffers>()); | 192 audio_decode_cb.Run(kError, AudioBuffers()); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void PpapiDecryptor::DecryptAndDecodeVideo( | 195 void PpapiDecryptor::DecryptAndDecodeVideo( |
| 196 const scoped_refptr<media::DecoderBuffer>& encrypted, | 196 const scoped_refptr<media::DecoderBuffer>& encrypted, |
| 197 const VideoDecodeCB& video_decode_cb) { | 197 const VideoDecodeCB& video_decode_cb) { |
| 198 if (!render_loop_proxy_->BelongsToCurrentThread()) { | 198 if (!render_loop_proxy_->BelongsToCurrentThread()) { |
| 199 render_loop_proxy_->PostTask( | 199 render_loop_proxy_->PostTask( |
| 200 FROM_HERE, | 200 FROM_HERE, |
| 201 base::Bind(&PpapiDecryptor::DecryptAndDecodeVideo, | 201 base::Bind(&PpapiDecryptor::DecryptAndDecodeVideo, |
| 202 base::Unretained(this), encrypted, video_decode_cb)); | 202 base::Unretained(this), encrypted, video_decode_cb)); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 if (success) | 260 if (success) |
| 261 video_key_added_cb_ = key_added_cb; | 261 video_key_added_cb_ = key_added_cb; |
| 262 base::ResetAndReturn(&video_decoder_init_cb_).Run(success); | 262 base::ResetAndReturn(&video_decoder_init_cb_).Run(success); |
| 263 return; | 263 return; |
| 264 } | 264 } |
| 265 | 265 |
| 266 NOTREACHED(); | 266 NOTREACHED(); |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace webkit_media | 269 } // namespace webkit_media |
| OLD | NEW |