Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Side by Side Diff: media/cdm/stub/stub_cdm.h

Issue 1043673002: Allow widevinecdmadapter to be built in Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/cdm/stub/stub_cdm.cc » ('j') | media/media_cdm.gypi » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_STUB_STUB_CDM_H_
6 #define MEDIA_CDM_STUB_STUB_CDM_H_
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 explicit StubCdm(Host* host);
19 ~StubCdm() override;
20
21 // StubCdmInterface implementation.
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 // Helper function that rejects the promise specified by |promise_id|.
69 void FailRequest(uint32 promise_id);
70
71 Host* host_;
72
73 uint32 next_session_id_;
74
75 DISALLOW_COPY_AND_ASSIGN(StubCdm);
76 };
77
78 } // namespace media
79
80 #endif // MEDIA_CDM_STUB_STUB_CDM_H_
OLDNEW
« no previous file with comments | « no previous file | media/cdm/stub/stub_cdm.cc » ('j') | media/media_cdm.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698