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

Unified Diff: media/mojo/services/mojo_decryptor.h

Issue 1538063003: Use data pipe to pass DecoderBuffer contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes (+rebase) Created 5 years 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/interfaces/decryptor.mojom ('k') | media/mojo/services/mojo_decryptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_decryptor.h
diff --git a/media/mojo/services/mojo_decryptor.h b/media/mojo/services/mojo_decryptor.h
index 9933658b86cd84d22e89e74eaec36ea3188a0445..dbbeba1087573db8f01e3015b443ad0b7a1b6fbe 100644
--- a/media/mojo/services/mojo_decryptor.h
+++ b/media/mojo/services/mojo_decryptor.h
@@ -10,6 +10,7 @@
#include "media/base/decryptor.h"
#include "media/mojo/interfaces/decryptor.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/system/data_pipe.h"
namespace media {
@@ -51,8 +52,23 @@ class MojoDecryptor : public Decryptor {
interfaces::Decryptor::Status status,
interfaces::VideoFramePtr video_frame);
+ // To pass DecoderBuffers to and from the MojoDecryptorService, 2 data pipes
+ // are required (one each way). At initialization both pipes are created,
+ // and then the handles are passed to the MojoDecryptorService.
+ void CreateDataPipes();
+
+ // Helper functions to write and read a DecoderBuffer.
+ interfaces::DecoderBufferPtr TransferDecoderBuffer(
+ const scoped_refptr<DecoderBuffer>& buffer);
+ scoped_refptr<DecoderBuffer> ReadDecoderBuffer(
+ interfaces::DecoderBufferPtr buffer);
+
interfaces::DecryptorPtr remote_decryptor_;
+ // DataPipes for serializing the data section of DecoderBuffer into/from.
+ mojo::ScopedDataPipeProducerHandle producer_handle_;
+ mojo::ScopedDataPipeConsumerHandle consumer_handle_;
+
NewKeyCB new_audio_key_cb_;
NewKeyCB new_video_key_cb_;
« no previous file with comments | « media/mojo/interfaces/decryptor.mojom ('k') | media/mojo/services/mojo_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698