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

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

Issue 2096063003: media: Add MojoDecoderBuffer{Reader|Writer} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 6 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/clients/mojo_audio_decoder.cc ('k') | media/mojo/clients/mojo_decryptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_decryptor.h
diff --git a/media/mojo/clients/mojo_decryptor.h b/media/mojo/clients/mojo_decryptor.h
index 7cb09552ac1e624c90a85ba2bbf56d9c54d21cbd..c71207c064e4475a55865fa90842d11e1ea0bd97 100644
--- a/media/mojo/clients/mojo_decryptor.h
+++ b/media/mojo/clients/mojo_decryptor.h
@@ -11,10 +11,12 @@
#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 {
+class MojoDecoderBufferReader;
+class MojoDecoderBufferWriter;
+
// A Decryptor implementation based on mojom::DecryptorPtr.
// This class is single threaded. The |remote_decryptor| is connected before
// being passed to MojoDecryptor, but it is bound to the thread MojoDecryptor
@@ -61,24 +63,17 @@ class MojoDecryptor : public Decryptor {
void ReleaseSharedBuffer(mojo::ScopedSharedBufferHandle buffer,
size_t buffer_size);
- // 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.
- mojom::DecoderBufferPtr TransferDecoderBuffer(
- const scoped_refptr<DecoderBuffer>& buffer);
- scoped_refptr<DecoderBuffer> ReadDecoderBuffer(
- mojom::DecoderBufferPtr buffer);
-
base::ThreadChecker thread_checker_;
mojom::DecryptorPtr remote_decryptor_;
- // DataPipes for serializing the data section of DecoderBuffer into/from.
- mojo::ScopedDataPipeProducerHandle producer_handle_;
- mojo::ScopedDataPipeConsumerHandle consumer_handle_;
+ // Helper class to send DecoderBuffer to the |remote_decryptor_| for decrypt
+ // or decrypt-and-decode.
+ std::unique_ptr<MojoDecoderBufferWriter> mojo_decoder_buffer_writer_;
+
+ // Helper class to receive decrypted DecoderBuffer from the
+ // |remote_decryptor_|.
+ std::unique_ptr<MojoDecoderBufferReader> mojo_decoder_buffer_reader_;
NewKeyCB new_audio_key_cb_;
NewKeyCB new_video_key_cb_;
« no previous file with comments | « media/mojo/clients/mojo_audio_decoder.cc ('k') | media/mojo/clients/mojo_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698