Chromium Code Reviews| Index: webkit/media/crypto/proxy_decryptor.cc |
| diff --git a/webkit/media/crypto/proxy_decryptor.cc b/webkit/media/crypto/proxy_decryptor.cc |
| index 5a0e4a8bdd8dcb1452cb685209001b937334fd2f..8b403565f9111ba882c1a633fb7e6d7acdf63de5 100644 |
| --- a/webkit/media/crypto/proxy_decryptor.cc |
| +++ b/webkit/media/crypto/proxy_decryptor.cc |
| @@ -152,10 +152,12 @@ void ProxyDecryptor::CancelKeyRequest(const std::string& key_system, |
| } |
| void ProxyDecryptor::Decrypt( |
| + StreamType stream_type, |
| const scoped_refptr<media::DecoderBuffer>& encrypted, |
| const DecryptCB& decrypt_cb) { |
| DVLOG(2) << "Decrypt()"; |
| DCHECK(decryption_message_loop_->BelongsToCurrentThread()); |
| + DCHECK_EQ(stream_type, kVideo); // Only support video decrypt-only for now. |
|
ddorwin
2012/10/17 02:52:33
Is there anything that doesn't work? Maybe there's
xhwang
2012/10/17 22:29:06
Audio decrypt-only is not implemented yet. Later w
|
| DCHECK(!is_canceling_decrypt_); |
| DCHECK(!pending_buffer_to_decrypt_); |
| @@ -183,9 +185,10 @@ void ProxyDecryptor::Decrypt( |
| DecryptPendingBuffer(); |
| } |
| -void ProxyDecryptor::CancelDecrypt() { |
| +void ProxyDecryptor::CancelDecrypt(StreamType stream_type) { |
| DVLOG(1) << "CancelDecrypt()"; |
| DCHECK(decryption_message_loop_->BelongsToCurrentThread()); |
| + DCHECK_EQ(stream_type, kVideo); // Only support video decrypt-only for now. |
|
ddorwin
2012/10/17 02:52:33
same
xhwang
2012/10/17 22:29:06
ditto
|
| if (!pending_buffer_to_decrypt_) { |
| DCHECK(pending_decrypt_cb_.is_null()); |
| @@ -201,7 +204,14 @@ void ProxyDecryptor::CancelDecrypt() { |
| } |
| is_canceling_decrypt_ = true; |
| - decryptor_->CancelDecrypt(); |
| + decryptor_->CancelDecrypt(stream_type); |
| +} |
| + |
| +void ProxyDecryptor::InitializeAudioDecoder( |
| + scoped_ptr<media::AudioDecoderConfig> config, |
| + const DecoderInitCB& init_cb, |
| + const KeyAddedCB& key_added_cb) { |
| + NOTREACHED() << "ProxyDecryptor does not support audio decoding"; |
| } |
| void ProxyDecryptor::InitializeVideoDecoder( |
| @@ -211,18 +221,24 @@ void ProxyDecryptor::InitializeVideoDecoder( |
| NOTREACHED() << "ProxyDecryptor does not support video decoding"; |
| } |
| +void ProxyDecryptor::DecryptAndDecodeAudio( |
| + const scoped_refptr<media::DecoderBuffer>& encrypted, |
| + const AudioDecodeCB& audio_decode_cb) { |
| + NOTREACHED() << "ProxyDecryptor does not support audio decoding"; |
| +} |
| + |
| void ProxyDecryptor::DecryptAndDecodeVideo( |
| const scoped_refptr<media::DecoderBuffer>& encrypted, |
| const VideoDecodeCB& video_decode_cb) { |
| NOTREACHED() << "ProxyDecryptor does not support video decoding"; |
| } |
| -void ProxyDecryptor::CancelDecryptAndDecodeVideo() { |
| - NOTREACHED() << "ProxyDecryptor does not support video decoding"; |
| +void ProxyDecryptor::ResetDecoder(StreamType stream_type) { |
| + NOTREACHED() << "ProxyDecryptor does not support audio/video decoding"; |
| } |
| -void ProxyDecryptor::StopVideoDecoder() { |
| - NOTREACHED() << "ProxyDecryptor does not support video decoding"; |
| +void ProxyDecryptor::DeinitializeDecoder(StreamType stream_type) { |
| + NOTREACHED() << "ProxyDecryptor does not support audio/video decoding"; |
| } |
| scoped_ptr<media::Decryptor> ProxyDecryptor::CreatePpapiDecryptor( |
| @@ -290,6 +306,7 @@ void ProxyDecryptor::DecryptPendingBuffer() { |
| is_waiting_for_decryptor_ = true; |
| decryptor_->Decrypt( |
| + kVideo, // Only support video decrypt-only for now. |
|
ddorwin
2012/10/17 02:52:33
If we really need this parameter (see earlier comm
xhwang
2012/10/17 22:29:06
see above reply.
|
| pending_buffer_to_decrypt_, |
| base::Bind(&ProxyDecryptor::OnBufferDecrypted, base::Unretained(this))); |
| } |