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 #include "content/public/renderer/video_encode_accelerator.h" | 5 #include "content/public/renderer/video_encode_accelerator.h" |
6 | 6 |
7 #include "content/renderer/render_thread_impl.h" | 7 #include "content/renderer/render_thread_impl.h" |
| 8 #include "media/filters/gpu_video_accelerator_factories.h" |
8 | 9 |
9 namespace content { | 10 namespace content { |
10 | 11 |
11 scoped_ptr<media::VideoEncodeAccelerator> | 12 scoped_ptr<media::VideoEncodeAccelerator> |
12 CreateVideoEncodeAccelerator(media::VideoEncodeAccelerator::Client* client) { | 13 CreateVideoEncodeAccelerator(media::VideoEncodeAccelerator::Client* client) { |
13 scoped_ptr<media::VideoEncodeAccelerator> vea; | 14 scoped_ptr<media::VideoEncodeAccelerator> vea; |
14 | 15 |
15 scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories = | 16 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories = |
16 RenderThreadImpl::current()->GetGpuFactories(); | 17 RenderThreadImpl::current()->GetGpuFactories(); |
17 if (gpu_factories.get()) | 18 if (gpu_factories.get()) |
18 vea = gpu_factories->CreateVideoEncodeAccelerator(client).Pass(); | 19 vea = gpu_factories->CreateVideoEncodeAccelerator(client).Pass(); |
19 | 20 |
20 return vea.Pass(); | 21 return vea.Pass(); |
21 } | 22 } |
22 | 23 |
23 } // namespace content | 24 } // namespace content |
OLD | NEW |