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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 void Reset() override; | 51 void Reset() override; |
52 void Destroy() override; | 52 void Destroy() override; |
53 bool CanDecodeOnIOThread() override; | 53 bool CanDecodeOnIOThread() override; |
54 | 54 |
55 // Called by OutputThunk() when VideoToolbox finishes decoding a frame. | 55 // Called by OutputThunk() when VideoToolbox finishes decoding a frame. |
56 void Output( | 56 void Output( |
57 void* source_frame_refcon, | 57 void* source_frame_refcon, |
58 OSStatus status, | 58 OSStatus status, |
59 CVImageBufferRef image_buffer); | 59 CVImageBufferRef image_buffer); |
60 | 60 |
| 61 // Get the minimum and maximum supported decode resolution. |
| 62 static media::VideoDecodeAccelerator::SupportedResolution |
| 63 GetSupportedResolution(); |
| 64 |
61 private: | 65 private: |
62 enum State { | 66 enum State { |
63 STATE_DECODING, | 67 STATE_DECODING, |
64 STATE_ERROR, | 68 STATE_ERROR, |
65 STATE_DESTROYING, | 69 STATE_DESTROYING, |
66 }; | 70 }; |
67 | 71 |
68 enum TaskType { | 72 enum TaskType { |
69 TASK_FRAME, | 73 TASK_FRAME, |
70 TASK_FLUSH, | 74 TASK_FLUSH, |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // Declared last to ensure that all weak pointers are invalidated before | 228 // Declared last to ensure that all weak pointers are invalidated before |
225 // other destructors run. | 229 // other destructors run. |
226 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_; | 230 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_; |
227 | 231 |
228 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator); | 232 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator); |
229 }; | 233 }; |
230 | 234 |
231 } // namespace content | 235 } // namespace content |
232 | 236 |
233 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ | 237 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |