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_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 10 matching lines...) Expand all Loading... | |
21 #include "media/video/video_decode_accelerator.h" | 21 #include "media/video/video_decode_accelerator.h" |
22 #include "ui/gfx/geometry/size.h" | 22 #include "ui/gfx/geometry/size.h" |
23 #include "ui/gl/gl_context_cgl.h" | 23 #include "ui/gl/gl_context_cgl.h" |
24 | 24 |
25 namespace base { | 25 namespace base { |
26 class SingleThreadTaskRunner; | 26 class SingleThreadTaskRunner; |
27 } // namespace base | 27 } // namespace base |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 // Preload VideoToolbox libraries. | |
jeremy
2014/11/23 10:29:16
nit: s/./, needed for sandbox warmup./
| |
32 void InitializeVideoToolbox(); | |
33 | |
31 // VideoToolbox.framework implementation of the VideoDecodeAccelerator | 34 // VideoToolbox.framework implementation of the VideoDecodeAccelerator |
32 // interface for Mac OS X (currently limited to 10.9+). | 35 // interface for Mac OS X (currently limited to 10.9+). |
33 class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator { | 36 class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator { |
34 public: | 37 public: |
35 explicit VTVideoDecodeAccelerator( | 38 explicit VTVideoDecodeAccelerator( |
36 CGLContextObj cgl_context, | 39 CGLContextObj cgl_context, |
37 const base::Callback<bool(void)>& make_context_current); | 40 const base::Callback<bool(void)>& make_context_current); |
38 ~VTVideoDecodeAccelerator() override; | 41 ~VTVideoDecodeAccelerator() override; |
39 | 42 |
40 // VideoDecodeAccelerator implementation. | 43 // VideoDecodeAccelerator implementation. |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 // Declared last to ensure that all weak pointers are invalidated before | 187 // Declared last to ensure that all weak pointers are invalidated before |
185 // other destructors run. | 188 // other destructors run. |
186 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_; | 189 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_; |
187 | 190 |
188 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator); | 191 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator); |
189 }; | 192 }; |
190 | 193 |
191 } // namespace content | 194 } // namespace content |
192 | 195 |
193 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ | 196 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |