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

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

Issue 11013052: Add PPAPI CDM video decoder initialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed with the exceptions being some questions and TODOs. 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 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class WebMouseEvent; 67 class WebMouseEvent;
68 class WebPluginContainer; 68 class WebPluginContainer;
69 struct WebCompositionUnderline; 69 struct WebCompositionUnderline;
70 struct WebCursorInfo; 70 struct WebCursorInfo;
71 struct WebPrintParams; 71 struct WebPrintParams;
72 } 72 }
73 73
74 namespace media { 74 namespace media {
75 class DecoderBuffer; 75 class DecoderBuffer;
76 class DecryptorClient; 76 class DecryptorClient;
77 class VideoDecoderConfig;
77 } 78 }
78 79
79 namespace ppapi { 80 namespace ppapi {
80 struct InputEventData; 81 struct InputEventData;
81 struct PPP_Instance_Combined; 82 struct PPP_Instance_Combined;
82 class Resource; 83 class Resource;
83 struct URLRequestInfoData; 84 struct URLRequestInfoData;
84 } 85 }
85 86
86 namespace ui { 87 namespace ui {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // TODO(tomfinegan): Move decryptor methods to delegate class. 255 // TODO(tomfinegan): Move decryptor methods to delegate class.
255 void set_decrypt_client(media::DecryptorClient* client); 256 void set_decrypt_client(media::DecryptorClient* client);
256 bool GenerateKeyRequest(const std::string& key_system, 257 bool GenerateKeyRequest(const std::string& key_system,
257 const std::string& init_data); 258 const std::string& init_data);
258 bool AddKey(const std::string& session_id, 259 bool AddKey(const std::string& session_id,
259 const std::string& key, 260 const std::string& key,
260 const std::string& init_data); 261 const std::string& init_data);
261 bool CancelKeyRequest(const std::string& session_id); 262 bool CancelKeyRequest(const std::string& session_id);
262 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer, 263 bool Decrypt(const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
263 const media::Decryptor::DecryptCB& decrypt_cb); 264 const media::Decryptor::DecryptCB& decrypt_cb);
265 // TODO(xhwang): Change DecryptCB to a DecoderInitCB.
266 bool InitializeVideoDecoder(
267 const media::VideoDecoderConfig& decoder_config,
268 const media::Decryptor::DecryptCB& decrypt_cb);
264 // TODO(xhwang): Update this when we need to support decrypt and decode. 269 // TODO(xhwang): Update this when we need to support decrypt and decode.
270 // Note: This method can be used with an unencrypted frame.
265 bool DecryptAndDecodeFrame( 271 bool DecryptAndDecodeFrame(
266 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, 272 const scoped_refptr<media::DecoderBuffer>& encrypted_frame,
267 const media::Decryptor::DecryptCB& decrypt_cb); 273 const media::Decryptor::DecryptCB& decrypt_cb);
268 274
269 // There are 2 implementations of the fullscreen interface 275 // There are 2 implementations of the fullscreen interface
270 // PPB_FlashFullscreen is used by Pepper Flash. 276 // PPB_FlashFullscreen is used by Pepper Flash.
271 // PPB_Fullscreen is intended for other applications including NaCl. 277 // PPB_Fullscreen is intended for other applications including NaCl.
272 // The two interface are mutually exclusive. 278 // The two interface are mutually exclusive.
273 279
274 // Implementation of PPB_FlashFullscreen. 280 // Implementation of PPB_FlashFullscreen.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 PP_URLComponents_Dev* components) OVERRIDE; 433 PP_URLComponents_Dev* components) OVERRIDE;
428 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; 434 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE;
429 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, 435 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance,
430 PP_Instance target) OVERRIDE; 436 PP_Instance target) OVERRIDE;
431 virtual PP_Var GetDocumentURL(PP_Instance instance, 437 virtual PP_Var GetDocumentURL(PP_Instance instance,
432 PP_URLComponents_Dev* components) OVERRIDE; 438 PP_URLComponents_Dev* components) OVERRIDE;
433 virtual PP_Var GetPluginInstanceURL( 439 virtual PP_Var GetPluginInstanceURL(
434 PP_Instance instance, 440 PP_Instance instance,
435 PP_URLComponents_Dev* components) OVERRIDE; 441 PP_URLComponents_Dev* components) OVERRIDE;
436 442
437 // TODO(tomfinegan): Move the next 7 methods to a delegate class.
438 virtual void NeedKey(PP_Instance instance, 443 virtual void NeedKey(PP_Instance instance,
439 PP_Var key_system, 444 PP_Var key_system,
440 PP_Var session_id, 445 PP_Var session_id,
441 PP_Var init_data) OVERRIDE; 446 PP_Var init_data) OVERRIDE;
442 virtual void KeyAdded(PP_Instance instance, 447 virtual void KeyAdded(PP_Instance instance,
443 PP_Var key_system, 448 PP_Var key_system,
444 PP_Var session_id) OVERRIDE; 449 PP_Var session_id) OVERRIDE;
445 virtual void KeyMessage(PP_Instance instance, 450 virtual void KeyMessage(PP_Instance instance,
446 PP_Var key_system, 451 PP_Var key_system,
447 PP_Var session_id, 452 PP_Var session_id,
448 PP_Resource message, 453 PP_Resource message,
449 PP_Var default_url) OVERRIDE; 454 PP_Var default_url) OVERRIDE;
450 virtual void KeyError(PP_Instance instance, 455 virtual void KeyError(PP_Instance instance,
451 PP_Var key_system, 456 PP_Var key_system,
452 PP_Var session_id, 457 PP_Var session_id,
453 int32_t media_error, 458 int32_t media_error,
454 int32_t system_code) OVERRIDE; 459 int32_t system_code) OVERRIDE;
455 virtual void DeliverBlock(PP_Instance instance, 460 virtual void DeliverBlock(PP_Instance instance,
456 PP_Resource decrypted_block, 461 PP_Resource decrypted_block,
457 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 462 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
463 virtual void DecoderInitialized(PP_Instance instance,
464 PP_Bool success,
465 uint32_t request_id) OVERRIDE;
458 virtual void DeliverFrame(PP_Instance instance, 466 virtual void DeliverFrame(PP_Instance instance,
459 PP_Resource decrypted_frame, 467 PP_Resource decrypted_frame,
460 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; 468 const PP_DecryptedFrameInfo* frame_info) OVERRIDE;
461 virtual void DeliverSamples(PP_Instance instance, 469 virtual void DeliverSamples(PP_Instance instance,
462 PP_Resource decrypted_samples, 470 PP_Resource decrypted_samples,
463 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 471 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
464 472
465 // Reset this instance as proxied. Resets cached interfaces to point to the 473 // Reset this instance as proxied. Resets cached interfaces to point to the
466 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if 474 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if
467 // necessary). 475 // necessary).
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; 768 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap;
761 DecryptionCBMap pending_decryption_cbs_; 769 DecryptionCBMap pending_decryption_cbs_;
762 770
763 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 771 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
764 }; 772 };
765 773
766 } // namespace ppapi 774 } // namespace ppapi
767 } // namespace webkit 775 } // namespace webkit
768 776
769 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 777 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698