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_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> | |
| 9 #include <vector> | |
| 10 | |
| 8 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" | |
|
xhwang
2017/05/10 16:41:24
Not needed in this header file. In .cc files where
xiaofengzhang
2017/05/11 06:34:43
Done. Thanks!
| |
| 9 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_vector.h" | |
| 11 #include "media/base/media_export.h" | 14 #include "media/base/media_export.h" |
| 12 | 15 |
| 13 namespace base { | 16 namespace base { |
| 14 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
| 15 } | 18 } |
| 16 | 19 |
| 17 namespace media { | 20 namespace media { |
| 18 | 21 |
| 19 class AudioDecoder; | 22 class AudioDecoder; |
| 20 class GpuVideoAcceleratorFactories; | 23 class GpuVideoAcceleratorFactories; |
| 21 class VideoDecoder; | 24 class VideoDecoder; |
| 22 | 25 |
| 23 // A factory class for creating audio and video decoders. | 26 // A factory class for creating audio and video decoders. |
| 24 class MEDIA_EXPORT DecoderFactory { | 27 class MEDIA_EXPORT DecoderFactory { |
| 25 public: | 28 public: |
| 26 DecoderFactory(); | 29 DecoderFactory(); |
| 27 virtual ~DecoderFactory(); | 30 virtual ~DecoderFactory(); |
| 28 | 31 |
| 29 // 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|. |
| 30 // Decoders are single-threaded, each decoder should run on |task_runner|. | 33 // Decoders are single-threaded, each decoder should run on |task_runner|. |
| 31 virtual void CreateAudioDecoders( | 34 virtual void CreateAudioDecoders( |
| 32 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 35 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 33 ScopedVector<AudioDecoder>* audio_decoders); | 36 std::vector<std::unique_ptr<AudioDecoder>>* audio_decoders); |
| 34 | 37 |
| 35 // 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|. |
| 36 // Decoders are single-threaded, each decoder should run on |task_runner|. | 39 // Decoders are single-threaded, each decoder should run on |task_runner|. |
| 37 virtual void CreateVideoDecoders( | 40 virtual void CreateVideoDecoders( |
| 38 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 41 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 39 GpuVideoAcceleratorFactories* gpu_factories, | 42 GpuVideoAcceleratorFactories* gpu_factories, |
| 40 ScopedVector<VideoDecoder>* video_decoders); | 43 std::vector<std::unique_ptr<VideoDecoder>>* video_decoders); |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); | 46 DISALLOW_COPY_AND_ASSIGN(DecoderFactory); |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 } // namespace media | 49 } // namespace media |
| 47 | 50 |
| 48 #endif // MEDIA_BASE_DECODER_FACTORY_H_ | 51 #endif // MEDIA_BASE_DECODER_FACTORY_H_ |
| OLD | NEW |