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 CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_ |
6 #define CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_ | 6 #define CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
12 #include "media/video/video_encode_accelerator.h" | 13 #include "media/video/video_encode_accelerator.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 // Called when CreateVideoEncodeAccelerator request is complete. | 17 // Called when CreateVideoEncodeAccelerator request is complete. |
17 // The |vea| object must be accessed on the thread associated with the | 18 // The |vea| object must be accessed on the thread associated with the |
18 // |encode_task_runner|. | 19 // |encode_task_runner|. |
19 typedef base::Callback< | 20 typedef base::Callback<void( |
20 void (scoped_refptr<base::SingleThreadTaskRunner> encoder_task_runner, | 21 scoped_refptr<base::SingleThreadTaskRunner> encoder_task_runner, |
21 scoped_ptr<media::VideoEncodeAccelerator> vea)> | 22 std::unique_ptr<media::VideoEncodeAccelerator> vea)> |
22 OnCreateVideoEncodeAcceleratorCallback; | 23 OnCreateVideoEncodeAcceleratorCallback; |
23 | 24 |
24 // Generates an instance of media::VideoEncodeAccelerator. | 25 // Generates an instance of media::VideoEncodeAccelerator. |
25 CONTENT_EXPORT void | 26 CONTENT_EXPORT void |
26 CreateVideoEncodeAccelerator( | 27 CreateVideoEncodeAccelerator( |
27 const OnCreateVideoEncodeAcceleratorCallback& callback); | 28 const OnCreateVideoEncodeAcceleratorCallback& callback); |
28 | 29 |
29 // Returns list of encoding profiles supported by VideoEncodeAccelerator. | 30 // Returns list of encoding profiles supported by VideoEncodeAccelerator. |
30 CONTENT_EXPORT media::VideoEncodeAccelerator::SupportedProfiles | 31 CONTENT_EXPORT media::VideoEncodeAccelerator::SupportedProfiles |
31 GetSupportedVideoEncodeAcceleratorProfiles(); | 32 GetSupportedVideoEncodeAcceleratorProfiles(); |
32 | 33 |
33 } // namespace content | 34 } // namespace content |
34 | 35 |
35 #endif // CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_ | 36 #endif // CONTENT_PUBLIC_RENDERER_VIDEO_ENCODE_ACCELERATOR_H_ |
OLD | NEW |