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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "media/mojo/interfaces/audio_decoder.mojom.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h"
12
13 namespace media {
14
15 class MojoAudioDecoderService : public interfaces::AudioDecoder {
16 public:
17 MojoAudioDecoderService(
18 scoped_ptr<AudioDecoder> decoder,
19 mojo::InterfaceRequest<interfaces::AudioDecoder> request);
20
21 ~MojoAudioDecoderService() final;
22
23 // interfaces::AudioDecoder implementation
24 void Initialize(interfaces::AudioDecoderClientPtr client,
25 interfaces::AudioDecoderConfigPtr config,
26 int32_t cdm_id,
27 const InitializeCallback& callback) final;
28
29 void Decode(interfaces::DecoderBufferPtr buffer,
30 const DecodeCallback& callback) final;
31
32 void Reset(const ResetCallback& callback) final;
33
34 private:
35 // A binding represents the association between the service and the
36 // communication channel, i.e. the pipe.
37 mojo::StrongBinding<interfaces::AudioDecoder> binding_;
38
39 // The AudioDecoder that does actual decoding work.
40 scoped_ptr<AudioDecoder> decoder_;
41
42 // The destination for the decoded buffers.
43 interfaces::AudioDecoderClientPtr client_;
44
45 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService);
46 };
47
48 } // namespace media
49
50 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
OLDNEW
« 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