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_PPAPI_CLEAR_KEY_CDM_H_ | 5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ |
6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ | 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 int key_id_size) OVERRIDE; | 40 int key_id_size) OVERRIDE; |
41 virtual cdm::Status CancelKeyRequest(const char* session_id, | 41 virtual cdm::Status CancelKeyRequest(const char* session_id, |
42 int session_id_size) OVERRIDE; | 42 int session_id_size) OVERRIDE; |
43 virtual cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer, | 43 virtual cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer, |
44 cdm::DecryptedBlock* decrypted_block) OVERRIDE; | 44 cdm::DecryptedBlock* decrypted_block) OVERRIDE; |
45 virtual cdm::Status InitializeVideoDecoder( | 45 virtual cdm::Status InitializeVideoDecoder( |
46 const cdm::VideoDecoderConfig& video_decoder_config) OVERRIDE; | 46 const cdm::VideoDecoderConfig& video_decoder_config) OVERRIDE; |
47 virtual cdm::Status DecryptAndDecodeFrame( | 47 virtual cdm::Status DecryptAndDecodeFrame( |
48 const cdm::InputBuffer& encrypted_buffer, | 48 const cdm::InputBuffer& encrypted_buffer, |
49 cdm::VideoFrame* video_frame) OVERRIDE; | 49 cdm::VideoFrame* video_frame) OVERRIDE; |
50 virtual void ResetVideoDecoder() OVERRIDE; | 50 virtual void DeinitializeDecoder(cdm::StreamType decoder_type) OVERRIDE; |
51 virtual void StopVideoDecoder() OVERRIDE; | 51 virtual void ResetDecoder(cdm::StreamType decoder_type) OVERRIDE; |
52 | 52 |
53 private: | 53 private: |
54 class Client : public media::DecryptorClient { | 54 class Client : public media::DecryptorClient { |
55 public: | 55 public: |
56 enum Status { | 56 enum Status { |
57 kKeyAdded, | 57 kKeyAdded, |
58 kKeyError, | 58 kKeyError, |
59 kKeyMessage, | 59 kKeyMessage, |
60 kNeedKey | 60 kNeedKey |
61 }; | 61 }; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Protects the |client_| from being accessed by the |decryptor_| | 103 // Protects the |client_| from being accessed by the |decryptor_| |
104 // simultaneously. | 104 // simultaneously. |
105 base::Lock client_lock_; | 105 base::Lock client_lock_; |
106 | 106 |
107 cdm::Allocator* const allocator_; | 107 cdm::Allocator* const allocator_; |
108 }; | 108 }; |
109 | 109 |
110 } // namespace webkit_media | 110 } // namespace webkit_media |
111 | 111 |
112 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ | 112 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ |
OLD | NEW |