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

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

Issue 11028087: Add decoder de-initialize and reset to the Pepper CDM API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments with the exception of renaming Deinit Created 8 years, 2 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 | Annotate | Revision Log
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 21 matching lines...) Expand all
32 pp::VarArrayBuffer init_data) = 0; 32 pp::VarArrayBuffer init_data) = 0;
33 virtual void AddKey(const std::string& session_id, 33 virtual void AddKey(const std::string& session_id,
34 pp::VarArrayBuffer key, 34 pp::VarArrayBuffer key,
35 pp::VarArrayBuffer init_data) = 0; 35 pp::VarArrayBuffer init_data) = 0;
36 virtual void CancelKeyRequest(const std::string& session_id) = 0; 36 virtual void CancelKeyRequest(const std::string& session_id) = 0;
37 virtual void Decrypt(pp::Buffer_Dev encrypted_buffer, 37 virtual void Decrypt(pp::Buffer_Dev encrypted_buffer,
38 const PP_EncryptedBlockInfo& encrypted_block_info) = 0; 38 const PP_EncryptedBlockInfo& encrypted_block_info) = 0;
39 virtual void InitializeVideoDecoder( 39 virtual void InitializeVideoDecoder(
40 const PP_VideoDecoderConfig& decoder_config, 40 const PP_VideoDecoderConfig& decoder_config,
41 pp::Buffer_Dev extra_data_resource) = 0; 41 pp::Buffer_Dev extra_data_resource) = 0;
42 virtual void DeinitializeDecoder(PP_DecryptorStreamType decoder_type,
43 uint32_t request_id) = 0;
44 virtual void ResetDecoder(PP_DecryptorStreamType decoder_type,
45 uint32_t request_id) = 0;
42 virtual void DecryptAndDecodeFrame( 46 virtual void DecryptAndDecodeFrame(
43 pp::Buffer_Dev encrypted_frame, 47 pp::Buffer_Dev encrypted_frame,
44 const PP_EncryptedVideoFrameInfo& encrypted_video_frame_info) = 0; 48 const PP_EncryptedVideoFrameInfo& encrypted_video_frame_info) = 0;
45 49
46 // PPB_ContentDecryptor_Private methods for passing data from the decryptor 50 // PPB_ContentDecryptor_Private methods for passing data from the decryptor
47 // to the browser. 51 // to the browser.
48 void NeedKey(const std::string& key_system, 52 void NeedKey(const std::string& key_system,
49 const std::string& session_id, 53 const std::string& session_id,
50 pp::VarArrayBuffer init_data); 54 pp::VarArrayBuffer init_data);
51 void KeyAdded(const std::string& key_system, 55 void KeyAdded(const std::string& key_system,
52 const std::string& session_id); 56 const std::string& session_id);
53 void KeyMessage(const std::string& key_system, 57 void KeyMessage(const std::string& key_system,
54 const std::string& session_id, 58 const std::string& session_id,
55 pp::Buffer_Dev message, 59 pp::Buffer_Dev message,
56 const std::string& default_url); 60 const std::string& default_url);
57 void KeyError(const std::string& key_system, 61 void KeyError(const std::string& key_system,
58 const std::string& session_id, 62 const std::string& session_id,
59 int32_t media_error, 63 int32_t media_error,
60 int32_t system_code); 64 int32_t system_code);
61 void DeliverBlock(pp::Buffer_Dev decrypted_block, 65 void DeliverBlock(pp::Buffer_Dev decrypted_block,
62 const PP_DecryptedBlockInfo& decrypted_block_info); 66 const PP_DecryptedBlockInfo& decrypted_block_info);
63 void DecoderInitialized(bool status, uint32_t request_id); 67 void DecoderInitialized(bool status, uint32_t request_id);
68 void DecoderDeinitializeDone(PP_DecryptorStreamType decoder_type,
69 uint32_t request_id);
70 void DecoderResetDone(PP_DecryptorStreamType decoder_type,
71 uint32_t request_id);
64 void DeliverFrame(pp::Buffer_Dev decrypted_frame, 72 void DeliverFrame(pp::Buffer_Dev decrypted_frame,
65 const PP_DecryptedFrameInfo& decrypted_frame_info); 73 const PP_DecryptedFrameInfo& decrypted_frame_info);
66 void DeliverSamples(pp::Buffer_Dev decrypted_samples, 74 void DeliverSamples(pp::Buffer_Dev decrypted_samples,
67 const PP_DecryptedBlockInfo& decrypted_block_info); 75 const PP_DecryptedBlockInfo& decrypted_block_info);
68 76
69 private: 77 private:
70 InstanceHandle associated_instance_; 78 InstanceHandle associated_instance_;
71 }; 79 };
72 80
73 } // namespace pp 81 } // namespace pp
74 82
75 #endif // PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_ 83 #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