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

Unified Diff: media/mojo/interfaces/decryptor.mojom

Issue 1809903002: Reland "Update mojo Decryptor interface to support reusing shared memory" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add includes Created 4 years, 9 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
« no previous file with comments | « media/mojo/common/mojo_shared_buffer_video_frame.h ('k') | media/mojo/services/mojo_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/interfaces/decryptor.mojom
diff --git a/media/mojo/interfaces/decryptor.mojom b/media/mojo/interfaces/decryptor.mojom
index d063e6b7a1a9aff87398b81f5828d6fac2223540..84f16ddfbd64caeb9796ba72845e05245c655667 100644
--- a/media/mojo/interfaces/decryptor.mojom
+++ b/media/mojo/interfaces/decryptor.mojom
@@ -51,10 +51,12 @@ interface Decryptor {
// been successfully initialized.
// At most one decrypt-and-decode call is allowed at any time for a
// |stream_type|.
+ // For video, ReleaseSharedBuffer() must be called when the VideoFrame
+ // is shared memory based and the memory is no longer needed.
DecryptAndDecodeAudio(DecoderBuffer encrypted)
=> (Status status, array<AudioBuffer>? audio_buffers);
- DecryptAndDecodeVideo(
- DecoderBuffer encrypted) => (Status status, VideoFrame? video_frame);
+ DecryptAndDecodeVideo(DecoderBuffer encrypted)
+ => (Status status, VideoFrame? video_frame);
// Resets the decoder for |stream_type| to a clean initialized state and
// cancels any pending decrypt-and-decode operations immediately with ERROR.
@@ -70,4 +72,7 @@ interface Decryptor {
// After this operation, the decoder is set to an uninitialized state.
// The decoder can be reinitialized after it is deinitialized.
DeinitializeDecoder(DemuxerStream.Type stream_type);
+
+ // Releases the shared memory.
+ ReleaseSharedBuffer(handle<shared_buffer> buffer, uint64 buffer_size);
};
« no previous file with comments | « media/mojo/common/mojo_shared_buffer_video_frame.h ('k') | media/mojo/services/mojo_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698