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

Side by Side Diff: media/mojo/services/mojo_audio_decoder.h

Issue 1797393007: Connect MojoAudioDecoder to the service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created AudioDecoder in MediaInterfaceProvider 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/base/decoder_factory.cc ('k') | media/mojo/services/mojo_audio_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "media/base/audio_decoder.h" 10 #include "media/base/audio_decoder.h"
11 #include "media/mojo/interfaces/audio_decoder.mojom.h"
11 12
12 namespace base { 13 namespace base {
13 class SingleThreadTaskRunner; 14 class SingleThreadTaskRunner;
14 } 15 }
15 16
16 namespace media { 17 namespace media {
17 18
18 // An AudioDecoder that proxies to an interfaces::AudioDecoder. 19 // An AudioDecoder that proxies to an interfaces::AudioDecoder.
19 class MojoAudioDecoder : public AudioDecoder { 20 class MojoAudioDecoder : public AudioDecoder {
20 public: 21 public:
21 MojoAudioDecoder(); 22 MojoAudioDecoder(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
23 interfaces::AudioDecoderPtr remote_decoder);
22 ~MojoAudioDecoder() final; 24 ~MojoAudioDecoder() final;
23 25
24 // AudioDecoder implementation. 26 // AudioDecoder implementation.
25 std::string GetDisplayName() const final; 27 std::string GetDisplayName() const final;
26 void Initialize(const AudioDecoderConfig& config, 28 void Initialize(const AudioDecoderConfig& config,
27 CdmContext* cdm_context, 29 CdmContext* cdm_context,
28 const InitCB& init_cb, 30 const InitCB& init_cb,
29 const OutputCB& output_cb) final; 31 const OutputCB& output_cb) final;
30 void Decode(const scoped_refptr<DecoderBuffer>& buffer, 32 void Decode(const scoped_refptr<DecoderBuffer>& buffer,
31 const DecodeCB& decode_cb) final; 33 const DecodeCB& decode_cb) final;
32 void Reset(const base::Closure& closure) final; 34 void Reset(const base::Closure& closure) final;
33 bool NeedsBitstreamConversion() const final; 35 bool NeedsBitstreamConversion() const final;
34 36
35 private: 37 private:
36 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 38 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
39 interfaces::AudioDecoderPtr remote_decoder_;
37 40
38 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoder); 41 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoder);
39 }; 42 };
40 43
41 } // namespace media 44 } // namespace media
42 45
43 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_ 46 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « media/base/decoder_factory.cc ('k') | media/mojo/services/mojo_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698