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

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

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 | « media/cdm/proxy_decryptor.cc ('k') | media/cdm/stub/stub_cdm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_STUB_STUB_CDM_H_ 5 #ifndef MEDIA_CDM_STUB_STUB_CDM_H_
6 #define MEDIA_CDM_STUB_STUB_CDM_H_ 6 #define MEDIA_CDM_STUB_STUB_CDM_H_
7 7
8 #include "base/basictypes.h"
Tom Jakubowski 2015/12/19 01:59:37 I think removing this #include broke the build --
Avi (use Gerrit) 2015/12/19 03:05:26 Apologies; fix forthcoming.
9 #include "media/cdm/api/content_decryption_module.h" 8 #include "media/cdm/api/content_decryption_module.h"
10 9
11 namespace media { 10 namespace media {
12 11
13 typedef cdm::ContentDecryptionModule_8 StubCdmInterface; 12 typedef cdm::ContentDecryptionModule_8 StubCdmInterface;
14 13
15 // Dummy implementation of the cdm::ContentDecryptionModule interface. 14 // Dummy implementation of the cdm::ContentDecryptionModule interface.
16 class StubCdm : public StubCdmInterface { 15 class StubCdm : public StubCdmInterface {
17 public: 16 public:
18 explicit StubCdm(Host* host); 17 explicit StubCdm(Host* host);
19 ~StubCdm() override; 18 ~StubCdm() override;
20 19
21 // StubCdmInterface implementation. 20 // StubCdmInterface implementation.
22 void Initialize(bool allow_distinctive_identifier, 21 void Initialize(bool allow_distinctive_identifier,
23 bool allow_persistent_state) override; 22 bool allow_persistent_state) override;
24 void CreateSessionAndGenerateRequest(uint32 promise_id, 23 void CreateSessionAndGenerateRequest(uint32_t promise_id,
25 cdm::SessionType session_type, 24 cdm::SessionType session_type,
26 cdm::InitDataType init_data_type, 25 cdm::InitDataType init_data_type,
27 const uint8* init_data, 26 const uint8_t* init_data,
28 uint32 init_data_size) override; 27 uint32_t init_data_size) override;
29 void LoadSession(uint32 promise_id, 28 void LoadSession(uint32_t promise_id,
30 cdm::SessionType session_type, 29 cdm::SessionType session_type,
31 const char* session_id, 30 const char* session_id,
32 uint32_t session_id_length) override; 31 uint32_t session_id_length) override;
33 void UpdateSession(uint32 promise_id, 32 void UpdateSession(uint32_t promise_id,
34 const char* session_id, 33 const char* session_id,
35 uint32_t session_id_length, 34 uint32_t session_id_length,
36 const uint8* response, 35 const uint8_t* response,
37 uint32 response_size) override; 36 uint32_t response_size) override;
38 void CloseSession(uint32 promise_id, 37 void CloseSession(uint32_t promise_id,
39 const char* session_id, 38 const char* session_id,
40 uint32_t session_id_length) override; 39 uint32_t session_id_length) override;
41 void RemoveSession(uint32 promise_id, 40 void RemoveSession(uint32_t promise_id,
42 const char* session_id, 41 const char* session_id,
43 uint32_t session_id_length) override; 42 uint32_t session_id_length) override;
44 void SetServerCertificate(uint32 promise_id, 43 void SetServerCertificate(uint32_t promise_id,
45 const uint8_t* server_certificate_data, 44 const uint8_t* server_certificate_data,
46 uint32_t server_certificate_data_size) override; 45 uint32_t server_certificate_data_size) override;
47 void TimerExpired(void* context) override; 46 void TimerExpired(void* context) override;
48 cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer, 47 cdm::Status Decrypt(const cdm::InputBuffer& encrypted_buffer,
49 cdm::DecryptedBlock* decrypted_block) override; 48 cdm::DecryptedBlock* decrypted_block) override;
50 cdm::Status InitializeAudioDecoder( 49 cdm::Status InitializeAudioDecoder(
51 const cdm::AudioDecoderConfig& audio_decoder_config) override; 50 const cdm::AudioDecoderConfig& audio_decoder_config) override;
52 cdm::Status InitializeVideoDecoder( 51 cdm::Status InitializeVideoDecoder(
53 const cdm::VideoDecoderConfig& video_decoder_config) override; 52 const cdm::VideoDecoderConfig& video_decoder_config) override;
54 void DeinitializeDecoder(cdm::StreamType decoder_type) override; 53 void DeinitializeDecoder(cdm::StreamType decoder_type) override;
55 void ResetDecoder(cdm::StreamType decoder_type) override; 54 void ResetDecoder(cdm::StreamType decoder_type) override;
56 cdm::Status DecryptAndDecodeFrame(const cdm::InputBuffer& encrypted_buffer, 55 cdm::Status DecryptAndDecodeFrame(const cdm::InputBuffer& encrypted_buffer,
57 cdm::VideoFrame* video_frame) override; 56 cdm::VideoFrame* video_frame) override;
58 cdm::Status DecryptAndDecodeSamples(const cdm::InputBuffer& encrypted_buffer, 57 cdm::Status DecryptAndDecodeSamples(const cdm::InputBuffer& encrypted_buffer,
59 cdm::AudioFrames* audio_frames) override; 58 cdm::AudioFrames* audio_frames) override;
60 void Destroy() override; 59 void Destroy() override;
61 void OnPlatformChallengeResponse( 60 void OnPlatformChallengeResponse(
62 const cdm::PlatformChallengeResponse& response) override; 61 const cdm::PlatformChallengeResponse& response) override;
63 void OnQueryOutputProtectionStatus(cdm::QueryResult result, 62 void OnQueryOutputProtectionStatus(cdm::QueryResult result,
64 uint32_t link_mask, 63 uint32_t link_mask,
65 uint32_t output_protection_mask) override; 64 uint32_t output_protection_mask) override;
66 65
67 private: 66 private:
68 // Helper function that rejects the promise specified by |promise_id|. 67 // Helper function that rejects the promise specified by |promise_id|.
69 void FailRequest(uint32 promise_id); 68 void FailRequest(uint32_t promise_id);
70 69
71 Host* host_; 70 Host* host_;
72 71
73 uint32 next_session_id_; 72 uint32_t next_session_id_;
74 73
75 DISALLOW_COPY_AND_ASSIGN(StubCdm); 74 DISALLOW_COPY_AND_ASSIGN(StubCdm);
76 }; 75 };
77 76
78 } // namespace media 77 } // namespace media
79 78
80 #endif // MEDIA_CDM_STUB_STUB_CDM_H_ 79 #endif // MEDIA_CDM_STUB_STUB_CDM_H_
OLDNEW
« no previous file with comments | « media/cdm/proxy_decryptor.cc ('k') | media/cdm/stub/stub_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698