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 CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ | 5 #ifndef CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ |
6 #define CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ | 6 #define CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "gpu/config/gpu_info.h" | 11 #include "gpu/config/gpu_info.h" |
12 #include "media/video/video_decode_accelerator.h" | 12 #include "media/video/video_decode_accelerator.h" |
13 | 13 |
14 namespace gfx { | 14 namespace gfx { |
15 class GLContext; | 15 class GLContext; |
16 } | 16 } |
17 | 17 |
18 namespace gl { | 18 namespace gl { |
19 class GLImage; | 19 class GLImage; |
20 } | 20 } |
21 | 21 |
22 namespace gpu { | 22 namespace gpu { |
23 namespace gles2 { | 23 namespace gles2 { |
24 class GLES2Decoder; | 24 class GLES2Decoder; |
25 } | 25 } |
26 } | 26 } |
27 | 27 |
| 28 namespace media { |
| 29 class GpuVideoDecodeAcceleratorFactoryImpl; |
| 30 } |
| 31 |
28 namespace content { | 32 namespace content { |
29 | 33 |
30 class GpuVideoDecodeAcceleratorFactoryImpl; | |
31 | |
32 // This factory allows creation of VideoDecodeAccelerator implementations, | 34 // This factory allows creation of VideoDecodeAccelerator implementations, |
33 // providing the most applicable VDA for current platform and given | 35 // providing the most applicable VDA for current platform and given |
34 // configuration. To be used in GPU process only. | 36 // configuration. To be used in GPU process only. |
35 class CONTENT_EXPORT GpuVideoDecodeAcceleratorFactory { | 37 class CONTENT_EXPORT GpuVideoDecodeAcceleratorFactory { |
36 public: | 38 public: |
37 virtual ~GpuVideoDecodeAcceleratorFactory(); | 39 virtual ~GpuVideoDecodeAcceleratorFactory(); |
38 | 40 |
39 // Return current GLContext. | 41 // Return current GLContext. |
40 using GetGLContextCallback = base::Callback<gfx::GLContext*(void)>; | 42 using GetGLContextCallback = base::Callback<gfx::GLContext*(void)>; |
41 | 43 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities(); | 76 static gpu::VideoDecodeAcceleratorCapabilities GetDecoderCapabilities(); |
75 | 77 |
76 // Create a VDA for the current platform for |client| with the given |config| | 78 // Create a VDA for the current platform for |client| with the given |config| |
77 // and for given |gpu_preferences|. Return nullptr on failure. | 79 // and for given |gpu_preferences|. Return nullptr on failure. |
78 virtual std::unique_ptr<media::VideoDecodeAccelerator> CreateVDA( | 80 virtual std::unique_ptr<media::VideoDecodeAccelerator> CreateVDA( |
79 media::VideoDecodeAccelerator::Client* client, | 81 media::VideoDecodeAccelerator::Client* client, |
80 const media::VideoDecodeAccelerator::Config& config); | 82 const media::VideoDecodeAccelerator::Config& config); |
81 | 83 |
82 private: | 84 private: |
83 // TODO(posciak): This is temporary and will not be needed once | 85 // TODO(posciak): This is temporary and will not be needed once |
84 // GpuVideoDecodeAcceleratorFactoryImpl implements | 86 // media::GpuVideoDecodeAcceleratorFactoryImpl implements |
85 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related. | 87 // GpuVideoDecodeAcceleratorFactory, see crbug.com/597150 and related. |
86 GpuVideoDecodeAcceleratorFactory( | 88 GpuVideoDecodeAcceleratorFactory( |
87 std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl); | 89 std::unique_ptr<media::GpuVideoDecodeAcceleratorFactoryImpl> |
| 90 gvdafactory_impl); |
88 | 91 |
89 std::unique_ptr<GpuVideoDecodeAcceleratorFactoryImpl> gvdafactory_impl_; | 92 std::unique_ptr<media::GpuVideoDecodeAcceleratorFactoryImpl> |
| 93 gvdafactory_impl_; |
90 }; | 94 }; |
91 | 95 |
92 } // namespace content | 96 } // namespace content |
93 | 97 |
94 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ | 98 #endif // CONTENT_PUBLIC_GPU_GPU_VIDEO_DECODE_ACCELERATOR_FACTORY_H_ |
OLD | NEW |