| 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_BASE_DECODER_FACTORY_H_ | 5 #ifndef MEDIA_BASE_DECODER_FACTORY_H_ |
| 6 #define MEDIA_BASE_DECODER_FACTORY_H_ | 6 #define MEDIA_BASE_DECODER_FACTORY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class SingleThreadTaskRunner; | 16 class SingleThreadTaskRunner; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace media { | 19 namespace media { |
| 20 | 20 |
| 21 class AudioDecoder; | 21 class AudioDecoder; |
| 22 class GpuVideoAcceleratorFactories; | 22 class GpuVideoAcceleratorFactories; |
| 23 class MediaLog; |
| 23 class VideoDecoder; | 24 class VideoDecoder; |
| 24 | 25 |
| 25 // A factory class for creating audio and video decoders. | 26 // A factory class for creating audio and video decoders. |
| 26 class MEDIA_EXPORT DecoderFactory { | 27 class MEDIA_EXPORT DecoderFactory { |
| 27 public: | 28 public: |
| 28 DecoderFactory(); | 29 DecoderFactory(); |
| 29 virtual ~DecoderFactory(); | 30 virtual ~DecoderFactory(); |
| 30 | 31 |
| 31 // Creates audio decoders and append them to the end of |audio_decoders|. | 32 // Creates audio decoders and append them to the end of |audio_decoders|. |
| 32 // Decoders are single-threaded, each decoder should run on |task_runner|. | 33 // Decoders are single-threaded, each decoder should run on |task_runner|. |
| 33 virtual void CreateAudioDecoders( | 34 virtual void CreateAudioDecoders( |
| 34 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 35 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 35 std::vector<std::unique_ptr<AudioDecoder>>* audio_decoders); | 36 std::vector<std::unique_ptr<AudioDecoder>>* audio_decoders); |
| 36 | 37 |
| 37 // Creates video decoders and append them to the end of |video_decoders|. | 38 // Creates video decoders and append them to the end of |video_decoders|. |
| 38 // Decoders are single-threaded, each decoder should run on |task_runner|. | 39 // Decoders are single-threaded, each decoder should run on |task_runner|. |
| 39 virtual void CreateVideoDecoders( | 40 virtual void CreateVideoDecoders( |
| 40 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 41 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 41 GpuVideoAcceleratorFactories* gpu_factories, | 42 GpuVideoAcceleratorFactories* gpu_factories, |
| 43 MediaLog* media_log, |
| 42 std::vector<std::unique_ptr<VideoDecoder>>* video_decoders); | 44 std::vector<std::unique_ptr<VideoDecoder>>* video_decoders); |
| 43 | 45 |
| 44 private: | 46 private: |
| 45 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); | 47 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); |
| 46 }; | 48 }; |
| 47 | 49 |
| 48 } // namespace media | 50 } // namespace media |
| 49 | 51 |
| 50 #endif // MEDIA_BASE_DECODER_FACTORY_H_ | 52 #endif // MEDIA_BASE_DECODER_FACTORY_H_ |
| OLD | NEW |