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