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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "media/cdm/aes_decryptor.h" | 16 #include "media/cdm/aes_decryptor.h" |
17 #include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h" | 17 #include "media/cdm/ppapi/external_clear_key/clear_key_cdm_common.h" |
18 | 18 |
19 // Enable this to use the fake decoder for testing. | 19 // Enable this to use the fake decoder for testing. |
20 // TODO(tomfinegan): Move fake audio decoder into a separate class. | 20 // TODO(tomfinegan): Move fake audio decoder into a separate class. |
21 #if 0 | 21 #if 0 |
22 #define CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER | 22 #define CLEAR_KEY_CDM_USE_FAKE_AUDIO_DECODER |
23 #endif | 23 #endif |
24 | 24 |
| 25 class GURL; |
| 26 |
25 namespace media { | 27 namespace media { |
26 class FileIOTestRunner; | 28 class FileIOTestRunner; |
27 class CdmVideoDecoder; | 29 class CdmVideoDecoder; |
28 class DecoderBuffer; | 30 class DecoderBuffer; |
29 class FFmpegCdmAudioDecoder; | 31 class FFmpegCdmAudioDecoder; |
30 | 32 |
31 // Clear key implementation of the cdm::ContentDecryptionModule interface. | 33 // Clear key implementation of the cdm::ContentDecryptionModule interface. |
32 class ClearKeyCdm : public ClearKeyCdmInterface { | 34 class ClearKeyCdm : public ClearKeyCdmInterface { |
33 public: | 35 public: |
34 ClearKeyCdm(Host* host, const std::string& key_system); | 36 ClearKeyCdm(Host* host, const std::string& key_system, const GURL& origin); |
35 ~ClearKeyCdm() override; | 37 ~ClearKeyCdm() override; |
36 | 38 |
37 // ContentDecryptionModule implementation. | 39 // ContentDecryptionModule implementation. |
38 void Initialize(bool allow_distinctive_identifier, | 40 void Initialize(bool allow_distinctive_identifier, |
39 bool allow_persistent_state) override; | 41 bool allow_persistent_state) override; |
40 void CreateSessionAndGenerateRequest(uint32 promise_id, | 42 void CreateSessionAndGenerateRequest(uint32 promise_id, |
41 cdm::SessionType session_type, | 43 cdm::SessionType session_type, |
42 cdm::InitDataType init_data_type, | 44 cdm::InitDataType init_data_type, |
43 const uint8* init_data, | 45 const uint8* init_data, |
44 uint32 init_data_size) override; | 46 uint32 init_data_size) override; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 scoped_ptr<CdmVideoDecoder> video_decoder_; | 205 scoped_ptr<CdmVideoDecoder> video_decoder_; |
204 | 206 |
205 scoped_ptr<FileIOTestRunner> file_io_test_runner_; | 207 scoped_ptr<FileIOTestRunner> file_io_test_runner_; |
206 | 208 |
207 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); | 209 DISALLOW_COPY_AND_ASSIGN(ClearKeyCdm); |
208 }; | 210 }; |
209 | 211 |
210 } // namespace media | 212 } // namespace media |
211 | 213 |
212 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ | 214 #endif // MEDIA_CDM_PPAPI_EXTERNAL_CLEAR_KEY_CLEAR_KEY_CDM_H_ |
OLD | NEW |