OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_CDM_PPAPI_STUB_STUB_CDM_H_ | |
6 #define MEDIA_CDM_PPAPI_STUB_STUB_CDM_H_ | |
xhwang
2015/03/30 17:23:50
ddorwin/jrummell:
Actually "external_clear_key" a
jrummell
2015/04/01 23:37:36
Moved stub to cdm/. external_clear_key can move la
| |
7 | |
8 #include "base/basictypes.h" | |
9 #include "media/cdm/ppapi/api/content_decryption_module.h" | |
10 | |
11 namespace media { | |
12 | |
13 typedef cdm::ContentDecryptionModule_8 StubCdmInterface; | |
14 | |
15 // Dummy implementation of the cdm::ContentDecryptionModule interface. | |
16 class StubCdm : public StubCdmInterface { | |
17 public: | |
18 StubCdm(Host* host); | |
xhwang
2015/03/30 17:23:50
explicit
jrummell
2015/04/01 23:37:36
Done.
| |
19 ~StubCdm() override; | |
20 | |
21 // ContentDecryptionModule implementation. | |
xhwang
2015/03/30 17:23:50
s/CDM/StubCdmInterface/
jrummell
2015/04/01 23:37:36
Done.
| |
22 void Initialize(bool allow_distinctive_identifier, | |
23 bool allow_persistent_state) override; | |
24 void CreateSessionAndGenerateRequest(uint32 promise_id, | |
25 cdm::SessionType session_type, | |
26 cdm::InitDataType init_data_type, | |
27 const uint8* init_data, | |
28 uint32 init_data_size) override; | |
29 void LoadSession(uint32 promise_id, | |
30 cdm::SessionType session_type, | |
31 const char* session_id, | |
32 uint32_t session_id_length) override; | |
33 void UpdateSession(uint32 promise_id, | |
34 const char* session_id, | |
35 uint32_t session_id_length, | |
36 const uint8* response, | |
37 uint32 response_size) override; | |
38 void CloseSession(uint32 promise_id, | |
39 const char* session_id, | |
40 uint32_t session_id_length) override; | |
41 void RemoveSession(uint32 promise_id, | |
42 const char* session_id, | |
43 uint32_t session_id_length) override; | |
44 void SetServerCertificate(uint32 promise_id, | |
45 const uint8_t* server_certificate_data, | |
46 uint32_t server_certificate_data_size) override; | |
47 void TimerExpired(void* context) override; | |
48 cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer, | |
49 cdm::DecryptedBlock* decrypted_block) override; | |
50 cdm::Status InitializeAudioDecoder( | |
51 const cdm::AudioDecoderConfig& audio_decoder_config) override; | |
52 cdm::Status InitializeVideoDecoder( | |
53 const cdm::VideoDecoderConfig& video_decoder_config) override; | |
54 void DeinitializeDecoder(cdm::StreamType decoder_type) override; | |
55 void ResetDecoder(cdm::StreamType decoder_type) override; | |
56 cdm::Status DecryptAndDecodeFrame(const cdm::InputBuffer& encrypted_buffer, | |
57 cdm::VideoFrame* video_frame) override; | |
58 cdm::Status DecryptAndDecodeSamples(const cdm::InputBuffer& encrypted_buffer, | |
59 cdm::AudioFrames* audio_frames) override; | |
60 void Destroy() override; | |
61 void OnPlatformChallengeResponse( | |
62 const cdm::PlatformChallengeResponse& response) override; | |
63 void OnQueryOutputProtectionStatus(cdm::QueryResult result, | |
64 uint32_t link_mask, | |
65 uint32_t output_protection_mask) override; | |
66 | |
67 private: | |
68 void FailRequest(uint32 promise_id); | |
xhwang
2015/03/30 17:23:50
Add comment.
jrummell
2015/04/01 23:37:36
Done.
| |
69 | |
70 Host* host_; | |
71 | |
72 DISALLOW_COPY_AND_ASSIGN(StubCdm); | |
73 }; | |
74 | |
75 } // namespace media | |
76 | |
77 #endif // MEDIA_CDM_PPAPI_STUB_STUB_CDM_H_ | |
OLD | NEW |