OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 5 #ifndef MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 6 #define MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 // ContentDecryptionModule callbacks. | 75 // ContentDecryptionModule callbacks. |
76 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); | 76 void OnSessionCreated(uint32 session_id, const std::string& web_session_id); |
77 void OnSessionMessage(uint32 session_id, | 77 void OnSessionMessage(uint32 session_id, |
78 const std::vector<uint8>& message, | 78 const std::vector<uint8>& message, |
79 const std::string& destination_url); | 79 const std::string& destination_url); |
80 void OnSessionReady(uint32 session_id); | 80 void OnSessionReady(uint32 session_id); |
81 void OnSessionClosed(uint32 session_id); | 81 void OnSessionClosed(uint32 session_id); |
82 void OnSessionError(uint32 session_id, | 82 void OnSessionError(uint32 session_id, |
83 MediaKeys::KeyError error_code, | 83 MediaKeys::KeyError error_code, |
84 int system_code); | 84 uint32 system_code); |
85 | 85 |
86 // Prepares next heartbeat message and sets a timer for it. | 86 // Prepares next heartbeat message and sets a timer for it. |
87 void ScheduleNextHeartBeat(); | 87 void ScheduleNextHeartBeat(); |
88 | 88 |
89 // Decrypts the |encrypted_buffer| and puts the result in |decrypted_buffer|. | 89 // Decrypts the |encrypted_buffer| and puts the result in |decrypted_buffer|. |
90 // Returns cdm::kSuccess if decryption succeeded. The decrypted result is | 90 // Returns cdm::kSuccess if decryption succeeded. The decrypted result is |
91 // put in |decrypted_buffer|. If |encrypted_buffer| is empty, the | 91 // put in |decrypted_buffer|. If |encrypted_buffer| is empty, the |
92 // |decrypted_buffer| is set to an empty (EOS) buffer. | 92 // |decrypted_buffer| is set to an empty (EOS) buffer. |
93 // Returns cdm::kNoKey if no decryption key was available. In this case | 93 // Returns cdm::kNoKey if no decryption key was available. In this case |
94 // |decrypted_buffer| should be ignored by the caller. | 94 // |decrypted_buffer| should be ignored by the caller. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 scoped_ptr<CdmVideoDecoder> video_decoder_; | 152 scoped_ptr<CdmVideoDecoder> video_decoder_; |
153 | 153 |
154 scoped_ptr<FileIOTestRunner> file_io_test_runner_; | 154 scoped_ptr<FileIOTestRunner> file_io_test_runner_; |
155 | 155 |
156 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 156 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
157 }; | 157 }; |
158 | 158 |
159 } // namespace media | 159 } // namespace media |
160 | 160 |
161 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 161 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
OLD | NEW |