| 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 17 matching lines...) Expand all Loading... |
| 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 cdm::ContentDecryptionModule { | 31 class ClearKeyCdm : public cdm::ContentDecryptionModule { |
| 32 public: | 32 public: |
| 33 explicit ClearKeyCdm(cdm::Host* host); | 33 explicit ClearKeyCdm(cdm::Host* host); |
| 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, int type_size, | 38 const char* type, uint32_t type_size, |
| 39 const uint8_t* init_data, int 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, int session_id_size, | 40 virtual cdm::Status AddKey(const char* session_id, |
| 41 const uint8_t* key, int key_size, | 41 uint32_t session_id_size, |
| 42 const uint8_t* key_id, int key_id_size) OVERRIDE; | 42 const uint8_t* key, |
| 43 uint32_t key_size, |
| 44 const uint8_t* key_id, |
| 45 uint32_t key_id_size) OVERRIDE; |
| 43 virtual cdm::Status CancelKeyRequest(const char* session_id, | 46 virtual cdm::Status CancelKeyRequest(const char* session_id, |
| 44 int session_id_size) OVERRIDE; | 47 uint32_t session_id_size) OVERRIDE; |
| 45 virtual void TimerExpired(void* context) OVERRIDE; | 48 virtual void TimerExpired(void* context) OVERRIDE; |
| 46 virtual cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer, | 49 virtual cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer, |
| 47 cdm::DecryptedBlock* decrypted_block) OVERRIDE; | 50 cdm::DecryptedBlock* decrypted_block) OVERRIDE; |
| 48 virtual cdm::Status InitializeAudioDecoder( | 51 virtual cdm::Status InitializeAudioDecoder( |
| 49 const cdm::AudioDecoderConfig& audio_decoder_config) OVERRIDE; | 52 const cdm::AudioDecoderConfig& audio_decoder_config) OVERRIDE; |
| 50 virtual cdm::Status InitializeVideoDecoder( | 53 virtual cdm::Status InitializeVideoDecoder( |
| 51 const cdm::VideoDecoderConfig& video_decoder_config) OVERRIDE; | 54 const cdm::VideoDecoderConfig& video_decoder_config) OVERRIDE; |
| 52 virtual void DeinitializeDecoder(cdm::StreamType decoder_type) OVERRIDE; | 55 virtual void DeinitializeDecoder(cdm::StreamType decoder_type) OVERRIDE; |
| 53 virtual void ResetDecoder(cdm::StreamType decoder_type) OVERRIDE; | 56 virtual void ResetDecoder(cdm::StreamType decoder_type) OVERRIDE; |
| 54 virtual cdm::Status DecryptAndDecodeFrame( | 57 virtual cdm::Status DecryptAndDecodeFrame( |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER | 164 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER |
| 162 | 165 |
| 163 scoped_ptr<CdmVideoDecoder> video_decoder_; | 166 scoped_ptr<CdmVideoDecoder> video_decoder_; |
| 164 | 167 |
| 165 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 168 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
| 166 }; | 169 }; |
| 167 | 170 |
| 168 } // namespace media | 171 } // namespace media |
| 169 | 172 |
| 170 #endif // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_H_ | 173 #endif // MEDIA_CDM_PPAPI_CLEAR_KEY_CDM_H_ |
| OLD | NEW |