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

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

Issue 1808593002: Add a stub implementation for Mojo AudioDecoder interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spitzer-audio-mojom
Patch Set: Rebased 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/services/BUILD.gn ('k') | media/mojo/services/mojo_audio_decoder_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..10f13f3be7d255a21ec9aca7fc74019fb3ea8df1
--- /dev/null
+++ b/media/mojo/services/mojo_audio_decoder_service.h
@@ -0,0 +1,50 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
+#define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "media/mojo/interfaces/audio_decoder.mojom.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+
+namespace media {
+
+class MojoAudioDecoderService : public interfaces::AudioDecoder {
+ public:
+ MojoAudioDecoderService(
+ scoped_ptr<AudioDecoder> decoder,
+ mojo::InterfaceRequest<interfaces::AudioDecoder> request);
+
+ ~MojoAudioDecoderService() final;
+
+ // interfaces::AudioDecoder implementation
+ void Initialize(interfaces::AudioDecoderClientPtr client,
+ interfaces::AudioDecoderConfigPtr config,
+ int32_t cdm_id,
+ const InitializeCallback& callback) final;
+
+ void Decode(interfaces::DecoderBufferPtr buffer,
+ const DecodeCallback& callback) final;
+
+ void Reset(const ResetCallback& callback) final;
+
+ private:
+ // A binding represents the association between the service and the
+ // communication channel, i.e. the pipe.
+ mojo::StrongBinding<interfaces::AudioDecoder> binding_;
+
+ // The AudioDecoder that does actual decoding work.
+ scoped_ptr<AudioDecoder> decoder_;
+
+ // The destination for the decoded buffers.
+ interfaces::AudioDecoderClientPtr client_;
+
+ DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService);
+};
+
+} // namespace media
+
+#endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/mojo_audio_decoder_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698