Chromium Code Reviews| 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_SERVICE_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "media/base/audio_decoder.h" | |
| 10 #include "media/mojo/interfaces/audio_decoder.mojom.h" | 11 #include "media/mojo/interfaces/audio_decoder.mojom.h" |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" | 12 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 12 | 13 |
| 13 namespace media { | 14 namespace media { |
| 14 | 15 |
| 15 class MojoAudioDecoderService : public interfaces::AudioDecoder { | 16 class MojoAudioDecoderService : public interfaces::AudioDecoder { |
| 16 public: | 17 public: |
| 17 MojoAudioDecoderService( | 18 MojoAudioDecoderService( |
| 18 scoped_ptr<AudioDecoder> decoder, | 19 scoped_ptr<media::AudioDecoder> decoder, |
|
xhwang
2016/03/16 22:09:37
good catch!
Tima Vaisburd
2016/03/17 01:09:02
Kudos go to compiler ;)
| |
| 19 mojo::InterfaceRequest<interfaces::AudioDecoder> request); | 20 mojo::InterfaceRequest<interfaces::AudioDecoder> request); |
| 20 | 21 |
| 21 ~MojoAudioDecoderService() final; | 22 ~MojoAudioDecoderService() final; |
| 22 | 23 |
| 23 // interfaces::AudioDecoder implementation | 24 // interfaces::AudioDecoder implementation |
| 24 void Initialize(interfaces::AudioDecoderClientPtr client, | 25 void Initialize(interfaces::AudioDecoderClientPtr client, |
| 25 interfaces::AudioDecoderConfigPtr config, | 26 interfaces::AudioDecoderConfigPtr config, |
| 26 int32_t cdm_id, | 27 int32_t cdm_id, |
| 27 const InitializeCallback& callback) final; | 28 const InitializeCallback& callback) final; |
| 28 | 29 |
| 29 void Decode(interfaces::DecoderBufferPtr buffer, | 30 void Decode(interfaces::DecoderBufferPtr buffer, |
| 30 const DecodeCallback& callback) final; | 31 const DecodeCallback& callback) final; |
| 31 | 32 |
| 32 void Reset(const ResetCallback& callback) final; | 33 void Reset(const ResetCallback& callback) final; |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 // A binding represents the association between the service and the | 36 // A binding represents the association between the service and the |
| 36 // communication channel, i.e. the pipe. | 37 // communication channel, i.e. the pipe. |
| 37 mojo::StrongBinding<interfaces::AudioDecoder> binding_; | 38 mojo::StrongBinding<interfaces::AudioDecoder> binding_; |
| 38 | 39 |
| 39 // The AudioDecoder that does actual decoding work. | 40 // The AudioDecoder that does actual decoding work. |
| 40 scoped_ptr<AudioDecoder> decoder_; | 41 scoped_ptr<media::AudioDecoder> decoder_; |
| 41 | 42 |
| 42 // The destination for the decoded buffers. | 43 // The destination for the decoded buffers. |
| 43 interfaces::AudioDecoderClientPtr client_; | 44 interfaces::AudioDecoderClientPtr client_; |
| 44 | 45 |
| 45 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService); | 46 DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoderService); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 } // namespace media | 49 } // namespace media |
| 49 | 50 |
| 50 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ | 51 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_DECODER_SERVICE_H_ |
| OLD | NEW |