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

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

Issue 2096063003: media: Add MojoDecoderBuffer{Reader|Writer} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: media/mojo/services/mojo_audio_decoder_service.h
diff --git a/media/mojo/services/mojo_audio_decoder_service.h b/media/mojo/services/mojo_audio_decoder_service.h
index 02e24cbcbbcebdac76e9aedb4d830a7334b01874..d1462802e75defd5be1595b2079c842d7c0720e1 100644
--- a/media/mojo/services/mojo_audio_decoder_service.h
+++ b/media/mojo/services/mojo_audio_decoder_service.h
@@ -14,12 +14,12 @@
#include "media/base/audio_decoder.h"
#include "media/mojo/interfaces/audio_decoder.mojom.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/system/data_pipe.h"
namespace media {
class MediaKeys;
class MojoCdmServiceContext;
+class MojoDecoderBufferReader;
class MojoAudioDecoderService : public mojom::AudioDecoder {
public:
@@ -59,17 +59,11 @@ class MojoAudioDecoderService : public mojom::AudioDecoder {
// Called by |decoder_| for each decoded buffer.
void OnAudioBufferReady(const scoped_refptr<AudioBuffer>& audio_buffer);
- // A helper method to read and deserialize DecoderBuffer from data pipe.
- // Returns empty scoped_refptr in case of an error.
- scoped_refptr<DecoderBuffer> ReadDecoderBuffer(
- mojom::DecoderBufferPtr buffer);
-
// A binding represents the association between the service and the
// communication channel, i.e. the pipe.
mojo::StrongBinding<mojom::AudioDecoder> binding_;
- // DataPipe for serializing the data section of DecoderBuffer.
- mojo::ScopedDataPipeConsumerHandle consumer_handle_;
+ std::unique_ptr<MojoDecoderBufferReader> mojo_decoder_buffer_reader_;
// A helper object required to get CDM from CDM id.
base::WeakPtr<MojoCdmServiceContext> mojo_cdm_service_context_;

Powered by Google App Engine
This is Rietveld 408576698