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 #ifndef WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 5 #ifndef WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
6 #define WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 6 #define WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 const uint8* key, | 50 const uint8* key, |
51 int key_length, | 51 int key_length, |
52 const uint8* init_data, | 52 const uint8* init_data, |
53 int init_data_length, | 53 int init_data_length, |
54 const std::string& session_id) OVERRIDE; | 54 const std::string& session_id) OVERRIDE; |
55 virtual void CancelKeyRequest(const std::string& key_system, | 55 virtual void CancelKeyRequest(const std::string& key_system, |
56 const std::string& session_id) OVERRIDE; | 56 const std::string& session_id) OVERRIDE; |
57 virtual void Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted, | 57 virtual void Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted, |
58 const DecryptCB& decrypt_cb) OVERRIDE; | 58 const DecryptCB& decrypt_cb) OVERRIDE; |
59 virtual void CancelDecrypt() OVERRIDE; | 59 virtual void CancelDecrypt() OVERRIDE; |
| 60 virtual void InitializeVideoDecoder(const media::VideoDecoderConfig& config, |
| 61 const DecoderInitCB& init_cb) OVERRIDE; |
| 62 virtual void DecryptAndDecodeVideo( |
| 63 const scoped_refptr<media::DecoderBuffer>& encrypted, |
| 64 const VideoDecodeCB& video_decode_cb) OVERRIDE; |
| 65 virtual void CancelDecryptAndDecodeVideo() OVERRIDE; |
| 66 virtual void StopVideoDecoder() OVERRIDE; |
60 | 67 |
61 private: | 68 private: |
62 // Helper functions to create decryptors to handle the given |key_system|. | 69 // Helper functions to create decryptors to handle the given |key_system|. |
63 scoped_ptr<media::Decryptor> CreatePpapiDecryptor( | 70 scoped_ptr<media::Decryptor> CreatePpapiDecryptor( |
64 const std::string& key_system); | 71 const std::string& key_system); |
65 scoped_ptr<media::Decryptor> CreateDecryptor(const std::string& key_system); | 72 scoped_ptr<media::Decryptor> CreateDecryptor(const std::string& key_system); |
66 | 73 |
67 void OnNewKeyAdded(); | 74 void OnNewKeyAdded(); |
68 | 75 |
69 // Sends |pending_buffer_to_decrypt_| to |decryptor_| for decryption. | 76 // Sends |pending_buffer_to_decrypt_| to |decryptor_| for decryption. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // the |pending_buffer_to_decrypt_| again if kNoKey is returned because a | 123 // the |pending_buffer_to_decrypt_| again if kNoKey is returned because a |
117 // new key has been added. | 124 // new key has been added. |
118 bool has_new_key_added_; | 125 bool has_new_key_added_; |
119 | 126 |
120 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); | 127 DISALLOW_COPY_AND_ASSIGN(ProxyDecryptor); |
121 }; | 128 }; |
122 | 129 |
123 } // namespace webkit_media | 130 } // namespace webkit_media |
124 | 131 |
125 #endif // WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ | 132 #endif // WEBKIT_MEDIA_CRYPTO_PROXY_DECRYPTOR_H_ |
OLD | NEW |