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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 11091005: Update PluginInstance for decrypt-and-decode video. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
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 WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // TODO(tomfinegan): Move decryptor methods to delegate class. 254 // TODO(tomfinegan): Move decryptor methods to delegate class.
255 void set_decrypt_client(media::DecryptorClient* client); 255 void set_decrypt_client(media::DecryptorClient* client);
256 bool GenerateKeyRequest(const std::string& key_system, 256 bool GenerateKeyRequest(const std::string& key_system,
257 const std::string& init_data); 257 const std::string& init_data);
258 bool AddKey(const std::string& session_id, 258 bool AddKey(const std::string& session_id,
259 const std::string& key, 259 const std::string& key,
260 const std::string& init_data); 260 const std::string& init_data);
261 bool CancelKeyRequest(const std::string& session_id); 261 bool CancelKeyRequest(const std::string& session_id);
262 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, 262 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
263 const media::Decryptor::DecryptCB& decrypt_cb); 263 const media::Decryptor::DecryptCB& decrypt_cb);
264 // TODO(xhwang): Update this when we need to support decrypt and decode.
265 bool DecryptAndDecodeFrame( 264 bool DecryptAndDecodeFrame(
266 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, 265 const scoped_refptr<media::DecoderBuffer>& encrypted_frame,
267 const media::Decryptor::DecryptCB& decrypt_cb); 266 const media::Decryptor::VideoDecodeCB& video_decode_cb);
268 267
269 // There are 2 implementations of the fullscreen interface 268 // There are 2 implementations of the fullscreen interface
270 // PPB_FlashFullscreen is used by Pepper Flash. 269 // PPB_FlashFullscreen is used by Pepper Flash.
271 // PPB_Fullscreen is intended for other applications including NaCl. 270 // PPB_Fullscreen is intended for other applications including NaCl.
272 // The two interface are mutually exclusive. 271 // The two interface are mutually exclusive.
273 272
274 // Implementation of PPB_FlashFullscreen. 273 // Implementation of PPB_FlashFullscreen.
275 274
276 // Because going to fullscreen is asynchronous (but going out is not), there 275 // Because going to fullscreen is asynchronous (but going out is not), there
277 // are 3 states: 276 // are 3 states:
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 // We store the arguments so we can re-send them if we are reset to talk to 748 // We store the arguments so we can re-send them if we are reset to talk to
750 // NaCl via the IPC NaCl proxy. 749 // NaCl via the IPC NaCl proxy.
751 std::vector<std::string> argn_; 750 std::vector<std::string> argn_;
752 std::vector<std::string> argv_; 751 std::vector<std::string> argv_;
753 752
754 // This is NULL unless HandleDocumentLoad has called. In that case, we store 753 // This is NULL unless HandleDocumentLoad has called. In that case, we store
755 // the pointer so we can re-send it later if we are reset to talk to NaCl. 754 // the pointer so we can re-send it later if we are reset to talk to NaCl.
756 scoped_refptr<PPB_URLLoader_Impl> document_loader_; 755 scoped_refptr<PPB_URLLoader_Impl> document_loader_;
757 756
758 media::DecryptorClient* decryptor_client_; 757 media::DecryptorClient* decryptor_client_;
758
759 // Request ID for tracking pending content decryption callbacks.
760 // Note that zero indicates an invalid request ID.
759 uint32_t next_decryption_request_id_; 761 uint32_t next_decryption_request_id_;
762
760 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; 763 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap;
761 DecryptionCBMap pending_decryption_cbs_; 764 DecryptionCBMap pending_decryption_cbs_;
762 765
766 uint32_t pending_video_decode_request_id_;
767 media::Decryptor::VideoDecodeCB pending_video_decode_cb_;
ddorwin 2012/10/08 19:05:57 We have a list for decrypt-only and one for decode
xhwang 2012/10/08 20:50:51 TODO added.
768
763 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 769 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
764 }; 770 };
765 771
766 } // namespace ppapi 772 } // namespace ppapi
767 } // namespace webkit 773 } // namespace webkit
768 774
769 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 775 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698