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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.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: Renaming and generalizing done... 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 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(tomfinegan): Add callback args for DeinitializeDecoder() and
265 // ResetDecoder()
266 bool DeinitializeDecoder();
267 bool ResetDecoder();
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.
265 bool DecryptAndDecodeFrame( 269 bool DecryptAndDecodeFrame(
266 const scoped_refptr<media::DecoderBuffer>& encrypted_frame, 270 const scoped_refptr<media::DecoderBuffer>& encrypted_frame,
267 const media::Decryptor::DecryptCB& decrypt_cb); 271 const media::Decryptor::DecryptCB& decrypt_cb);
268 272
269 // There are 2 implementations of the fullscreen interface 273 // There are 2 implementations of the fullscreen interface
270 // PPB_FlashFullscreen is used by Pepper Flash. 274 // PPB_FlashFullscreen is used by Pepper Flash.
271 // PPB_Fullscreen is intended for other applications including NaCl. 275 // PPB_Fullscreen is intended for other applications including NaCl.
272 // The two interface are mutually exclusive. 276 // The two interface are mutually exclusive.
273 277
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 PP_URLComponents_Dev* components) OVERRIDE; 431 PP_URLComponents_Dev* components) OVERRIDE;
428 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; 432 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE;
429 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, 433 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance,
430 PP_Instance target) OVERRIDE; 434 PP_Instance target) OVERRIDE;
431 virtual PP_Var GetDocumentURL(PP_Instance instance, 435 virtual PP_Var GetDocumentURL(PP_Instance instance,
432 PP_URLComponents_Dev* components) OVERRIDE; 436 PP_URLComponents_Dev* components) OVERRIDE;
433 virtual PP_Var GetPluginInstanceURL( 437 virtual PP_Var GetPluginInstanceURL(
434 PP_Instance instance, 438 PP_Instance instance,
435 PP_URLComponents_Dev* components) OVERRIDE; 439 PP_URLComponents_Dev* components) OVERRIDE;
436 440
437 // TODO(tomfinegan): Move the next 7 methods to a delegate class. 441 // PPB_ContentDecryptor_Private
442 // TODO(tomfinegan): Move the PPB_ContentDecryptor_Private methods to a
443 // delegate class.
438 virtual void NeedKey(PP_Instance instance, 444 virtual void NeedKey(PP_Instance instance,
439 PP_Var key_system, 445 PP_Var key_system,
440 PP_Var session_id, 446 PP_Var session_id,
441 PP_Var init_data) OVERRIDE; 447 PP_Var init_data) OVERRIDE;
442 virtual void KeyAdded(PP_Instance instance, 448 virtual void KeyAdded(PP_Instance instance,
443 PP_Var key_system, 449 PP_Var key_system,
444 PP_Var session_id) OVERRIDE; 450 PP_Var session_id) OVERRIDE;
445 virtual void KeyMessage(PP_Instance instance, 451 virtual void KeyMessage(PP_Instance instance,
446 PP_Var key_system, 452 PP_Var key_system,
447 PP_Var session_id, 453 PP_Var session_id,
448 PP_Resource message, 454 PP_Resource message,
449 PP_Var default_url) OVERRIDE; 455 PP_Var default_url) OVERRIDE;
450 virtual void KeyError(PP_Instance instance, 456 virtual void KeyError(PP_Instance instance,
451 PP_Var key_system, 457 PP_Var key_system,
452 PP_Var session_id, 458 PP_Var session_id,
453 int32_t media_error, 459 int32_t media_error,
454 int32_t system_code) OVERRIDE; 460 int32_t system_code) OVERRIDE;
455 virtual void DeliverBlock(PP_Instance instance, 461 virtual void DeliverBlock(PP_Instance instance,
456 PP_Resource decrypted_block, 462 PP_Resource decrypted_block,
457 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 463 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
464 virtual void DecoderDeinitializeDone(PP_Instance instance,
465 PP_StreamType decoder_type,
466 uint32_t request_id) OVERRIDE;
467 virtual void DecoderResetDone(PP_Instance instance,
468 PP_StreamType decoder_type,
469 uint32_t request_id) OVERRIDE;
458 virtual void DeliverFrame(PP_Instance instance, 470 virtual void DeliverFrame(PP_Instance instance,
459 PP_Resource decrypted_frame, 471 PP_Resource decrypted_frame,
460 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; 472 const PP_DecryptedFrameInfo* frame_info) OVERRIDE;
461 virtual void DeliverSamples(PP_Instance instance, 473 virtual void DeliverSamples(PP_Instance instance,
462 PP_Resource decrypted_samples, 474 PP_Resource decrypted_samples,
463 const PP_DecryptedBlockInfo* block_info) OVERRIDE; 475 const PP_DecryptedBlockInfo* block_info) OVERRIDE;
464 476
465 // Reset this instance as proxied. Resets cached interfaces to point to the 477 // Reset this instance as proxied. Resets cached interfaces to point to the
466 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if 478 // proxy and re-sends DidCreate, DidChangeView, and HandleDocumentLoad (if
467 // necessary). 479 // necessary).
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap; 772 typedef std::map<uint32_t, media::Decryptor::DecryptCB> DecryptionCBMap;
761 DecryptionCBMap pending_decryption_cbs_; 773 DecryptionCBMap pending_decryption_cbs_;
762 774
763 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 775 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
764 }; 776 };
765 777
766 } // namespace ppapi 778 } // namespace ppapi
767 } // namespace webkit 779 } // namespace webkit
768 780
769 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 781 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698