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

Unified Diff: webkit/plugins/ppapi/content_decryptor_delegate.h

Issue 11929015: Tighten up media::DecoderBuffer API contract for end of stream buffers (round 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: webkit/plugins/ppapi/content_decryptor_delegate.h
diff --git a/webkit/plugins/ppapi/content_decryptor_delegate.h b/webkit/plugins/ppapi/content_decryptor_delegate.h
index c1af7997217180c8a6ef719b735e99b042b46429..8cb53b9af6af5d08d61da2b8c1e93d377b6c7122 100644
--- a/webkit/plugins/ppapi/content_decryptor_delegate.h
+++ b/webkit/plugins/ppapi/content_decryptor_delegate.h
@@ -105,17 +105,20 @@ class WEBKIT_PLUGINS_EXPORT ContentDecryptorDelegate {
// Cancels the pending decrypt-and-decode callback for |stream_type|.
void CancelDecode(media::Decryptor::StreamType stream_type);
- // Fills |resource| with a PPB_Buffer_Impl and copies |data| into the buffer
- // resource. This method reuses |audio_input_resource_| and
- // |video_input_resource_| to reduce the latency in requesting new
- // PPB_Buffer_Impl resources. The caller must make sure that
+ // Fills |resource| with a PPB_Buffer_Impl and copies the data from
+ // |encrypted_buffer| into the buffer resource. This method reuses
+ // |audio_input_resource_| and |video_input_resource_| to reduce the latency
+ // in requesting new PPB_Buffer_Impl resources. The caller must make sure that
// |audio_input_resource_| or |video_input_resource_| is available before
// calling this method.
- // If |data| is NULL, sets |*resource| to NULL.
+ //
+ // An end of stream |encrypted_buffer| is represented as a null |resource|.
+ //
// Returns true upon success and false if any error happened.
- bool MakeMediaBufferResource(media::Decryptor::StreamType stream_type,
- const uint8* data, uint32_t size,
- scoped_refptr<PPB_Buffer_Impl>* resource);
+ bool MakeMediaBufferResource(
+ media::Decryptor::StreamType stream_type,
+ const scoped_refptr<media::DecoderBuffer>& encrypted_buffer,
+ scoped_refptr<PPB_Buffer_Impl>* resource);
void FreeBuffer(uint32_t buffer_id);

Powered by Google App Engine
This is Rietveld 408576698