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

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: Finish first pass. 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 18 matching lines...) Expand all
29 // strings. The change would allow the CDM wrapper to reuse vars when 29 // strings. The change would allow the CDM wrapper to reuse vars when
30 // replying to the browser. 30 // replying to the browser.
31 virtual void GenerateKeyRequest(const std::string& key_system, 31 virtual void GenerateKeyRequest(const std::string& key_system,
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 ResetVideoDecoder(uint32_t request_id) = 0;
40 virtual void StopVideoDecoder(uint32_t request_id) = 0;
39 virtual void DecryptAndDecodeFrame( 41 virtual void DecryptAndDecodeFrame(
40 pp::Buffer_Dev encrypted_frame, 42 pp::Buffer_Dev encrypted_frame,
41 const PP_EncryptedVideoFrameInfo& encrypted_video_frame_info) = 0; 43 const PP_EncryptedVideoFrameInfo& encrypted_video_frame_info) = 0;
42 44
43 // PPB_ContentDecryptor_Private methods for passing data from the decryptor 45 // PPB_ContentDecryptor_Private methods for passing data from the decryptor
44 // to the browser. 46 // to the browser.
45 void NeedKey(const std::string& key_system, 47 void NeedKey(const std::string& key_system,
46 const std::string& session_id, 48 const std::string& session_id,
47 pp::VarArrayBuffer init_data); 49 pp::VarArrayBuffer init_data);
48 void KeyAdded(const std::string& key_system, 50 void KeyAdded(const std::string& key_system,
49 const std::string& session_id); 51 const std::string& session_id);
50 void KeyMessage(const std::string& key_system, 52 void KeyMessage(const std::string& key_system,
51 const std::string& session_id, 53 const std::string& session_id,
52 pp::Buffer_Dev message, 54 pp::Buffer_Dev message,
53 const std::string& default_url); 55 const std::string& default_url);
54 void KeyError(const std::string& key_system, 56 void KeyError(const std::string& key_system,
55 const std::string& session_id, 57 const std::string& session_id,
56 int32_t media_error, 58 int32_t media_error,
57 int32_t system_code); 59 int32_t system_code);
58 void DeliverBlock(pp::Buffer_Dev decrypted_block, 60 void DeliverBlock(pp::Buffer_Dev decrypted_block,
59 const PP_DecryptedBlockInfo& decrypted_block_info); 61 const PP_DecryptedBlockInfo& decrypted_block_info);
62 void DecoderReset(uint32_t request_id);
63 void DecoderStopped(uint32_t request_id);
60 void DeliverFrame(pp::Buffer_Dev decrypted_frame, 64 void DeliverFrame(pp::Buffer_Dev decrypted_frame,
61 const PP_DecryptedFrameInfo& decrypted_frame_info); 65 const PP_DecryptedFrameInfo& decrypted_frame_info);
62 void DeliverSamples(pp::Buffer_Dev decrypted_samples, 66 void DeliverSamples(pp::Buffer_Dev decrypted_samples,
63 const PP_DecryptedBlockInfo& decrypted_block_info); 67 const PP_DecryptedBlockInfo& decrypted_block_info);
64 68
65 private: 69 private:
66 InstanceHandle associated_instance_; 70 InstanceHandle associated_instance_;
67 }; 71 };
68 72
69 } // namespace pp 73 } // namespace pp
70 74
71 #endif // PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_ 75 #endif // PPAPI_CPP_PRIVATE_CONTENT_DECRYPTOR_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698