OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ | 5 #ifndef MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ |
6 #define MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ | 6 #define MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "media/base/media_export.h" | 13 #include "media/base/media_export.h" |
14 #include "media/base/renderer_factory.h" | 14 #include "media/base/renderer_factory.h" |
15 | 15 |
16 namespace media { | 16 namespace media { |
17 | 17 |
18 class AudioDecoder; | 18 class AudioDecoder; |
19 class AudioRendererSink; | 19 class AudioRendererSink; |
20 class DecoderFactory; | 20 class DecoderFactory; |
21 class GpuVideoAcceleratorFactories; | 21 class GpuVideoAcceleratorFactories; |
22 class MediaLog; | 22 class MediaLog; |
23 class VideoDecoder; | 23 class VideoDecoder; |
24 class VideoRendererSink; | 24 class VideoRendererSink; |
25 | 25 |
| 26 using CreateAudioDecodersCB = |
| 27 base::RepeatingCallback<ScopedVector<AudioDecoder>()>; |
| 28 using CreateVideoDecodersCB = |
| 29 base::RepeatingCallback<ScopedVector<VideoDecoder>()>; |
| 30 |
26 // The default factory class for creating RendererImpl. | 31 // The default factory class for creating RendererImpl. |
27 class MEDIA_EXPORT DefaultRendererFactory : public RendererFactory { | 32 class MEDIA_EXPORT DefaultRendererFactory : public RendererFactory { |
28 public: | 33 public: |
29 using GetGpuFactoriesCB = base::Callback<GpuVideoAcceleratorFactories*()>; | 34 using GetGpuFactoriesCB = base::Callback<GpuVideoAcceleratorFactories*()>; |
30 | 35 |
31 DefaultRendererFactory(const scoped_refptr<MediaLog>& media_log, | 36 DefaultRendererFactory(const scoped_refptr<MediaLog>& media_log, |
32 DecoderFactory* decoder_factory, | 37 DecoderFactory* decoder_factory, |
33 const GetGpuFactoriesCB& get_gpu_factories_cb); | 38 const GetGpuFactoriesCB& get_gpu_factories_cb); |
34 ~DefaultRendererFactory() final; | 39 ~DefaultRendererFactory() final; |
35 | 40 |
(...skipping 20 matching lines...) Expand all Loading... |
56 | 61 |
57 // Creates factories for supporting video accelerators. May be null. | 62 // Creates factories for supporting video accelerators. May be null. |
58 GetGpuFactoriesCB get_gpu_factories_cb_; | 63 GetGpuFactoriesCB get_gpu_factories_cb_; |
59 | 64 |
60 DISALLOW_COPY_AND_ASSIGN(DefaultRendererFactory); | 65 DISALLOW_COPY_AND_ASSIGN(DefaultRendererFactory); |
61 }; | 66 }; |
62 | 67 |
63 } // namespace media | 68 } // namespace media |
64 | 69 |
65 #endif // MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ | 70 #endif // MEDIA_RENDERERS_DEFAULT_RENDERER_FACTORY_H_ |
OLD | NEW |