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_COMMON_GPU_MEDIA_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ | 5 #ifndef MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ | 6 #define MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ |
7 | 7 |
8 #include "base/mac/scoped_cftyperef.h" | 8 #include "base/mac/scoped_cftyperef.h" |
9 #include "content/common/content_export.h" | |
10 #include "media/base/mac/videotoolbox_glue.h" | 9 #include "media/base/mac/videotoolbox_glue.h" |
11 #include "media/base/mac/videotoolbox_helpers.h" | 10 #include "media/base/mac/videotoolbox_helpers.h" |
| 11 #include "media/gpu/media_gpu_export.h" |
12 #include "media/video/video_encode_accelerator.h" | 12 #include "media/video/video_encode_accelerator.h" |
13 | 13 |
14 namespace content { | 14 namespace media { |
15 | 15 |
16 // VideoToolbox.framework implementation of the VideoEncodeAccelerator | 16 // VideoToolbox.framework implementation of the VideoEncodeAccelerator |
17 // interface for MacOSX. VideoToolbox makes no guarantees that it is thread | 17 // interface for MacOSX. VideoToolbox makes no guarantees that it is thread |
18 // safe, so this object is pinned to the thread on which it is constructed. | 18 // safe, so this object is pinned to the thread on which it is constructed. |
19 class CONTENT_EXPORT VTVideoEncodeAccelerator | 19 class MEDIA_GPU_EXPORT VTVideoEncodeAccelerator |
20 : public media::VideoEncodeAccelerator { | 20 : public media::VideoEncodeAccelerator { |
21 public: | 21 public: |
22 VTVideoEncodeAccelerator(); | 22 VTVideoEncodeAccelerator(); |
23 ~VTVideoEncodeAccelerator() override; | 23 ~VTVideoEncodeAccelerator() override; |
24 | 24 |
25 // media::VideoEncodeAccelerator implementation. | 25 // media::VideoEncodeAccelerator implementation. |
26 media::VideoEncodeAccelerator::SupportedProfiles GetSupportedProfiles() | 26 media::VideoEncodeAccelerator::SupportedProfiles GetSupportedProfiles() |
27 override; | 27 override; |
28 bool Initialize(media::VideoPixelFormat format, | 28 bool Initialize(media::VideoPixelFormat format, |
29 const gfx::Size& input_visible_size, | 29 const gfx::Size& input_visible_size, |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 scoped_refptr<base::SingleThreadTaskRunner> encoder_thread_task_runner_; | 131 scoped_refptr<base::SingleThreadTaskRunner> encoder_thread_task_runner_; |
132 | 132 |
133 // Declared last to ensure that all weak pointers are invalidated before | 133 // Declared last to ensure that all weak pointers are invalidated before |
134 // other destructors run. | 134 // other destructors run. |
135 base::WeakPtr<VTVideoEncodeAccelerator> encoder_weak_ptr_; | 135 base::WeakPtr<VTVideoEncodeAccelerator> encoder_weak_ptr_; |
136 base::WeakPtrFactory<VTVideoEncodeAccelerator> encoder_task_weak_factory_; | 136 base::WeakPtrFactory<VTVideoEncodeAccelerator> encoder_task_weak_factory_; |
137 | 137 |
138 DISALLOW_COPY_AND_ASSIGN(VTVideoEncodeAccelerator); | 138 DISALLOW_COPY_AND_ASSIGN(VTVideoEncodeAccelerator); |
139 }; | 139 }; |
140 | 140 |
141 } // namespace content | 141 } // namespace media |
142 | 142 |
143 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ | 143 #endif // MEDIA_GPU_VT_VIDEO_ENCODE_ACCELERATOR_MAC_H_ |
OLD | NEW |