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

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
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/ref_counted.h"
xhwang 2016/03/16 04:12:18 fix the "//" here.
Tima Vaisburd 2016/03/16 19:23:20 Done.
10 #include "base/memory/scoped_ptr.h"
11 //#include "base/memory/weak_ptr.h"
xhwang 2016/03/16 04:12:18 fix the "//" here.
Tima Vaisburd 2016/03/16 19:23:20 Done.
12 #include "media/mojo/interfaces/audio_decoder.mojom.h"
13 #include "mojo/public/cpp/bindings/strong_binding.h"
14
15 namespace media {
16
17 class MojoAudioDecoderService : public interfaces::AudioDecoder {
18 public:
19 MojoAudioDecoderService(
20 scoped_ptr<AudioDecoder> decoder,
xhwang 2016/03/16 04:21:58 BTW, I assume you'll create the AudioDecoder in An
Tima Vaisburd 2016/03/16 19:23:20 In the doc you mentioned ServiceFactoryImpl. Shoul
xhwang 2016/03/16 19:51:41 Sorry for the confusion. Yes, platform specific im
21 mojo::InterfaceRequest<interfaces::AudioDecoder> request);
22
23 ~MojoAudioDecoderService() final;
24
25 // interfaces::AudioDecoder implementation
26 void Initialize(interfaces::AudioDecoderClientPtr client,
27 interfaces::AudioDecoderConfigPtr config,
28 int32_t cdm_id,
29 const InitializeCallback& callback) final;
30
31 void Decode(interfaces::DecoderBufferPtr buffer,
32 const DecodeCallback& callback) final;
33
34 void Reset(const ResetCallback& callback) final;
35
36 private:
37 // A binding represents the association between the service and the
38 // communication channel, i.e. the pipe.
39 mojo::StrongBinding<interfaces::AudioDecoder> binding_;
40
41 // The AudioDecoder that does actual decoding work.
42 scoped_ptr<AudioDecoder> decoder_;
43
44 // The destination for the decoded buffers.
45 interfaces::AudioDecoderClientPtr client_;
46
47 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService);
48 };
49
50 } // namespace media
51
52 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698