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

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: Decoder init, 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 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 bool InitializeVideoDecoder(
266 const media::VideoDecoderConfig& decoder_config,
267 const media::Decryptor::DecryptCB& decrypt_cb);
xhwang 2012/10/08 17:16:13 DecoderInitCB
Tom Finegan 2012/10/08 23:23:27 Added TODO(xhwang).
264 // TODO(xhwang): Update this when we need to support decrypt and decode. 268 // TODO(xhwang): Update this when we need to support decrypt and decode.
269 // Note: This method can be used with an unencrypted frame.
265 bool DecryptAndDecodeFrame( 270 bool DecryptAndDecodeFrame(
266 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, 271 const scoped_refptr<media::DecoderBuffer>& encrypted_frame,
267 const media::Decryptor::DecryptCB& decrypt_cb); 272 const media::Decryptor::DecryptCB& decrypt_cb);
268 273
269 // There are 2 implementations of the fullscreen interface 274 // There are 2 implementations of the fullscreen interface
270 // PPB_FlashFullscreen is used by Pepper Flash. 275 // PPB_FlashFullscreen is used by Pepper Flash.
271 // PPB_Fullscreen is intended for other applications including NaCl. 276 // PPB_Fullscreen is intended for other applications including NaCl.
272 // The two interface are mutually exclusive. 277 // The two interface are mutually exclusive.
273 278
274 // Implementation of PPB_FlashFullscreen. 279 // Implementation of PPB_FlashFullscreen.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 PP_URLComponents_Dev* components) OVERRIDE; 432 PP_URLComponents_Dev* components) OVERRIDE;
428 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; 433 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE;
429 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, 434 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance,
430 PP_Instance target) OVERRIDE; 435 PP_Instance target) OVERRIDE;
431 virtual PP_Var GetDocumentURL(PP_Instance instance, 436 virtual PP_Var GetDocumentURL(PP_Instance instance,
432 PP_URLComponents_Dev* components) OVERRIDE; 437 PP_URLComponents_Dev* components) OVERRIDE;
433 virtual PP_Var GetPluginInstanceURL( 438 virtual PP_Var GetPluginInstanceURL(
434 PP_Instance instance, 439 PP_Instance instance,
435 PP_URLComponents_Dev* components) OVERRIDE; 440 PP_URLComponents_Dev* components) OVERRIDE;
436 441
437 // TODO(tomfinegan): Move the next 7 methods to a delegate class.
438 virtual void NeedKey(PP_Instance instance, 442 virtual void NeedKey(PP_Instance instance,
439 PP_Var key_system, 443 PP_Var key_system,
440 PP_Var session_id, 444 PP_Var session_id,
441 PP_Var init_data) OVERRIDE; 445 PP_Var init_data) OVERRIDE;
442 virtual void KeyAdded(PP_Instance instance, 446 virtual void KeyAdded(PP_Instance instance,
443 PP_Var key_system, 447 PP_Var key_system,
444 PP_Var session_id) OVERRIDE; 448 PP_Var session_id) OVERRIDE;
445 virtual void KeyMessage(PP_Instance instance, 449 virtual void KeyMessage(PP_Instance instance,
446 PP_Var key_system, 450 PP_Var key_system,
447 PP_Var session_id, 451 PP_Var session_id,
448 PP_Resource message, 452 PP_Resource message,
449 PP_Var default_url) OVERRIDE; 453 PP_Var default_url) OVERRIDE;
450 virtual void KeyError(PP_Instance instance, 454 virtual void KeyError(PP_Instance instance,
451 PP_Var key_system, 455 PP_Var key_system,
452 PP_Var session_id, 456 PP_Var session_id,
453 int32_t media_error, 457 int32_t media_error,
454 int32_t system_code) OVERRIDE; 458 int32_t system_code) OVERRIDE;
455 virtual void DeliverBlock(PP_Instance instance, 459 virtual void DeliverBlock(PP_Instance instance,
456 PP_Resource decrypted_block, 460 PP_Resource decrypted_block,
457 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 461 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
462 virtual void DecoderInitializeStatus(PP_Instance instance,
463 PP_Bool success,
464 uint32_t request_id) OVERRIDE;
458 virtual void DeliverFrame(PP_Instance instance, 465 virtual void DeliverFrame(PP_Instance instance,
459 PP_Resource decrypted_frame, 466 PP_Resource decrypted_frame,
460 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; 467 const PP_DecryptedFrameInfo* frame_info) OVERRIDE;
461 virtual void DeliverSamples(PP_Instance instance, 468 virtual void DeliverSamples(PP_Instance instance,
462 PP_Resource decrypted_samples, 469 PP_Resource decrypted_samples,
463 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 470 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
464 471
465 // Reset this instance as proxied. Resets cached interfaces to point to the 472 // Reset this instance as proxied. Resets cached interfaces to point to the
466 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if 473 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if
467 // necessary). 474 // necessary).
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; 767 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap;
761 DecryptionCBMap pending_decryption_cbs_; 768 DecryptionCBMap pending_decryption_cbs_;
762 769
763 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 770 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
764 }; 771 };
765 772
766 } // namespace ppapi 773 } // namespace ppapi
767 } // namespace webkit 774 } // namespace webkit
768 775
769 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 776 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698