OLD | NEW |
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 | 11 |
12 namespace base { | 12 namespace base { |
13 class SingleThreadTaskRunner; | 13 class SingleThreadTaskRunner; |
14 } | 14 } |
15 | 15 |
16 namespace media { | 16 namespace media { |
17 | 17 |
18 // An AudioDecoder that proxies to a interfaces::AudioDecoder. | 18 // An AudioDecoder that proxies to an interfaces::AudioDecoder. |
19 class MojoAudioDecoder : public AudioDecoder { | 19 class MojoAudioDecoder : public AudioDecoder { |
20 public: | 20 public: |
21 MojoAudioDecoder(); | 21 MojoAudioDecoder(); |
22 ~MojoAudioDecoder() final; | 22 ~MojoAudioDecoder() final; |
23 | 23 |
24 // AudioDecoder implementation. | 24 // AudioDecoder implementation. |
25 std::string GetDisplayName() const final; | 25 std::string GetDisplayName() const final; |
26 void Initialize(const AudioDecoderConfig& config, | 26 void Initialize(const AudioDecoderConfig& config, |
27 CdmContext* cdm_context, | 27 CdmContext* cdm_context, |
28 const InitCB& init_cb, | 28 const InitCB& init_cb, |
29 const OutputCB& output_cb) final; | 29 const OutputCB& output_cb) final; |
30 void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 30 void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
31 const DecodeCB& decode_cb) final; | 31 const DecodeCB& decode_cb) final; |
32 void Reset(const base::Closure& closure) final; | 32 void Reset(const base::Closure& closure) final; |
33 bool NeedsBitstreamConversion() const final; | 33 bool NeedsBitstreamConversion() const final; |
34 | 34 |
35 private: | 35 private: |
36 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 36 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoder); | 38 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoder); |
39 }; | 39 }; |
40 | 40 |
41 } // namespace media | 41 } // namespace media |
42 | 42 |
43 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_ | 43 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_H_ |
OLD | NEW |