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

Side by Side Diff: ppapi/cpp/private/content_decryptor_private.h

Issue 105383002: Rename EME WD call parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_ 5 #ifndef PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_
6 #define PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_ 6 #define PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_
7 7
8 #include "ppapi/c/private/pp_content_decryptor.h" 8 #include "ppapi/c/private/pp_content_decryptor.h"
9 #include "ppapi/c/private/ppb_content_decryptor_private.h" 9 #include "ppapi/c/private/ppb_content_decryptor_private.h"
10 #include "ppapi/c/private/ppp_content_decryptor_private.h" 10 #include "ppapi/c/private/ppp_content_decryptor_private.h"
(...skipping 14 matching lines...) Expand all
25 public: 25 public:
26 explicit ContentDecryptor_Private(Instance* instance); 26 explicit ContentDecryptor_Private(Instance* instance);
27 virtual ~ContentDecryptor_Private(); 27 virtual ~ContentDecryptor_Private();
28 28
29 // PPP_ContentDecryptor_Private functions exposed as virtual functions 29 // PPP_ContentDecryptor_Private functions exposed as virtual functions
30 // for you to override. 30 // for you to override.
31 // TODO(tomfinegan): This could be optimized to pass pp::Var instead of 31 // TODO(tomfinegan): This could be optimized to pass pp::Var instead of
32 // strings. The change would allow the CDM wrapper to reuse vars when 32 // strings. The change would allow the CDM wrapper to reuse vars when
33 // replying to the browser. 33 // replying to the browser.
34 virtual void Initialize(const std::string& key_system) = 0; 34 virtual void Initialize(const std::string& key_system) = 0;
35 virtual void CreateSession(uint32_t reference_id, 35 virtual void CreateSession(uint32_t session_id,
36 const std::string& type, 36 const std::string& type,
37 pp::VarArrayBuffer init_data) = 0; 37 pp::VarArrayBuffer init_data) = 0;
38 virtual void UpdateSession(uint32_t reference_id, 38 virtual void UpdateSession(uint32_t session_id,
39 pp::VarArrayBuffer response) = 0; 39 pp::VarArrayBuffer response) = 0;
40 virtual void ReleaseSession(uint32_t reference_id) = 0; 40 virtual void ReleaseSession(uint32_t session_id) = 0;
41 virtual void Decrypt(pp::Buffer_Dev encrypted_buffer, 41 virtual void Decrypt(pp::Buffer_Dev encrypted_buffer,
42 const PP_EncryptedBlockInfo& encrypted_block_info) = 0; 42 const PP_EncryptedBlockInfo& encrypted_block_info) = 0;
43 virtual void InitializeAudioDecoder( 43 virtual void InitializeAudioDecoder(
44 const PP_AudioDecoderConfig& decoder_config, 44 const PP_AudioDecoderConfig& decoder_config,
45 pp::Buffer_Dev extra_data_resource) = 0; 45 pp::Buffer_Dev extra_data_resource) = 0;
46 virtual void InitializeVideoDecoder( 46 virtual void InitializeVideoDecoder(
47 const PP_VideoDecoderConfig& decoder_config, 47 const PP_VideoDecoderConfig& decoder_config,
48 pp::Buffer_Dev extra_data_resource) = 0; 48 pp::Buffer_Dev extra_data_resource) = 0;
49 virtual void DeinitializeDecoder(PP_DecryptorStreamType decoder_type, 49 virtual void DeinitializeDecoder(PP_DecryptorStreamType decoder_type,
50 uint32_t request_id) = 0; 50 uint32_t request_id) = 0;
51 virtual void ResetDecoder(PP_DecryptorStreamType decoder_type, 51 virtual void ResetDecoder(PP_DecryptorStreamType decoder_type,
52 uint32_t request_id) = 0; 52 uint32_t request_id) = 0;
53 // Null |encrypted_frame| means end-of-stream buffer. 53 // Null |encrypted_frame| means end-of-stream buffer.
54 virtual void DecryptAndDecode( 54 virtual void DecryptAndDecode(
55 PP_DecryptorStreamType decoder_type, 55 PP_DecryptorStreamType decoder_type,
56 pp::Buffer_Dev encrypted_buffer, 56 pp::Buffer_Dev encrypted_buffer,
57 const PP_EncryptedBlockInfo& encrypted_block_info) = 0; 57 const PP_EncryptedBlockInfo& encrypted_block_info) = 0;
58 58
59 // PPB_ContentDecryptor_Private methods for passing data from the decryptor 59 // PPB_ContentDecryptor_Private methods for passing data from the decryptor
60 // to the browser. 60 // to the browser.
61 void SessionCreated(uint32_t reference_id, const std::string& session_id); 61 void SessionCreated(uint32_t session_id, const std::string& web_session_id);
62 void SessionMessage(uint32_t reference_id, 62 void SessionMessage(uint32_t session_id,
63 pp::VarArrayBuffer message, 63 pp::VarArrayBuffer message,
64 const std::string& default_url); 64 const std::string& default_url);
65 void SessionReady(uint32_t reference_id); 65 void SessionReady(uint32_t session_id);
66 void SessionClosed(uint32_t reference_id); 66 void SessionClosed(uint32_t session_id);
67 void SessionError(uint32_t reference_id, 67 void SessionError(uint32_t session_id,
68 int32_t media_error, 68 int32_t media_error,
69 int32_t system_code); 69 int32_t system_code);
70 70
71 // The plugin must not hold a reference to the encrypted buffer resource 71 // The plugin must not hold a reference to the encrypted buffer resource
72 // provided to Decrypt() when it calls this method. The browser will reuse 72 // provided to Decrypt() when it calls this method. The browser will reuse
73 // the buffer in a subsequent Decrypt() call. 73 // the buffer in a subsequent Decrypt() call.
74 void DeliverBlock(pp::Buffer_Dev decrypted_block, 74 void DeliverBlock(pp::Buffer_Dev decrypted_block,
75 const PP_DecryptedBlockInfo& decrypted_block_info); 75 const PP_DecryptedBlockInfo& decrypted_block_info);
76 76
77 void DecoderInitializeDone(PP_DecryptorStreamType decoder_type, 77 void DecoderInitializeDone(PP_DecryptorStreamType decoder_type,
(...skipping 16 matching lines...) Expand all
94 void DeliverSamples(pp::Buffer_Dev audio_frames, 94 void DeliverSamples(pp::Buffer_Dev audio_frames,
95 const PP_DecryptedSampleInfo& decrypted_sample_info); 95 const PP_DecryptedSampleInfo& decrypted_sample_info);
96 96
97 private: 97 private:
98 InstanceHandle associated_instance_; 98 InstanceHandle associated_instance_;
99 }; 99 };
100 100
101 } // namespace pp 101 } // namespace pp
102 102
103 #endif // PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_ 103 #endif // PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_
OLDNEW
« no previous file with comments | « ppapi/c/private/ppp_content_decryptor_private.h ('k') | ppapi/cpp/private/content_decryptor_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698