Chromium Code Reviews| 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_CLEAR_KEY_CDM_H_ | 5 #ifndef MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_H_ |
| 6 #define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_H_ | 6 #define MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 namespace media { | 25 namespace media { |
| 26 class CdmVideoDecoder; | 26 class CdmVideoDecoder; |
| 27 class DecoderBuffer; | 27 class DecoderBuffer; |
| 28 class FFmpegCdmAudioDecoder; | 28 class FFmpegCdmAudioDecoder; |
| 29 | 29 |
| 30 // Clear key implementation of the cdm::ContentDecryptionModule interface. | 30 // Clear key implementation of the cdm::ContentDecryptionModule interface. |
| 31 class ClearKeyCdm : public ClearKeyCdmInterface { | 31 class ClearKeyCdm : public ClearKeyCdmInterface { |
| 32 public: | 32 public: |
| 33 explicit ClearKeyCdm(Host* host); | 33 explicit ClearKeyCdm(Host* host, bool decrypt_only); |
| 34 virtual ~ClearKeyCdm(); | 34 virtual ~ClearKeyCdm(); |
| 35 | 35 |
| 36 // ContentDecryptionModule implementation. | 36 // ContentDecryptionModule implementation. |
| 37 virtual cdm::Status GenerateKeyRequest( | 37 virtual cdm::Status GenerateKeyRequest( |
| 38 const char* type, uint32_t type_size, | 38 const char* type, uint32_t type_size, |
| 39 const uint8_t* init_data, uint32_t init_data_size) OVERRIDE; | 39 const uint8_t* init_data, uint32_t init_data_size) OVERRIDE; |
| 40 virtual cdm::Status AddKey(const char* session_id, | 40 virtual cdm::Status AddKey(const char* session_id, |
| 41 uint32_t session_id_size, | 41 uint32_t session_id_size, |
| 42 const uint8_t* key, | 42 const uint8_t* key, |
| 43 uint32_t key_size, | 43 uint32_t key_size, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 | 143 |
| 144 Client client_; | 144 Client client_; |
| 145 AesDecryptor decryptor_; | 145 AesDecryptor decryptor_; |
| 146 | 146 |
| 147 // Protects the |client_| from being accessed by the |decryptor_| | 147 // Protects the |client_| from being accessed by the |decryptor_| |
| 148 // simultaneously. | 148 // simultaneously. |
| 149 base::Lock client_lock_; | 149 base::Lock client_lock_; |
| 150 | 150 |
| 151 ClearKeyCdmHost* host_; | 151 ClearKeyCdmHost* host_; |
| 152 | 152 |
| 153 bool decrypt_only_; | |
|
ddorwin
2013/11/21 04:10:58
is_
const?
xhwang
2013/11/22 01:47:36
Done.
| |
| 154 | |
| 153 std::string heartbeat_session_id_; | 155 std::string heartbeat_session_id_; |
| 154 std::string next_heartbeat_message_; | 156 std::string next_heartbeat_message_; |
| 155 | 157 |
| 156 // Timer delay in milliseconds for the next host_->SetTimer() call. | 158 // Timer delay in milliseconds for the next host_->SetTimer() call. |
| 157 int64 timer_delay_ms_; | 159 int64 timer_delay_ms_; |
| 158 | 160 |
| 159 // Indicates whether a timer has been set to prevent multiple timers from | 161 // Indicates whether a timer has been set to prevent multiple timers from |
| 160 // running. | 162 // running. |
| 161 bool timer_set_; | 163 bool timer_set_; |
| 162 | 164 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 173 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER | 175 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER |
| 174 | 176 |
| 175 scoped_ptr<CdmVideoDecoder> video_decoder_; | 177 scoped_ptr<CdmVideoDecoder> video_decoder_; |
| 176 | 178 |
| 177 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 179 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
| 178 }; | 180 }; |
| 179 | 181 |
| 180 } // namespace media | 182 } // namespace media |
| 181 | 183 |
| 182 #endif // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_H_ | 184 #endif // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_H_ |
| OLD | NEW |