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

Side by Side Diff: webkit/media/crypto/ppapi_decryptor.cc

Issue 11198017: Add DecryptingAudioDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unittests Created 8 years, 2 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 | Annotate | Revision Log
« media/filters/decrypting_audio_decoder.cc ('K') | « media/media.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« media/filters/decrypting_audio_decoder.cc ('K') | « media/media.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698