OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // This file contains an implementation of VaapiWrapper, used by | 5 // This file contains an implementation of VaapiWrapper, used by |
6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder for decode, | 6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder for decode, |
7 // and VaapiVideoEncodeAccelerator for encode, to interface | 7 // and VaapiVideoEncodeAccelerator for encode, to interface |
8 // with libva (VA-API library for hardware video codec). | 8 // with libva (VA-API library for hardware video codec). |
9 | 9 |
10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ | 10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 bool Initialize(CodecMode mode, | 165 bool Initialize(CodecMode mode, |
166 media::VideoCodecProfile profile, | 166 media::VideoCodecProfile profile, |
167 const base::Closure& report_error__to_uma_cb); | 167 const base::Closure& report_error__to_uma_cb); |
168 void Deinitialize(); | 168 void Deinitialize(); |
169 bool VaInitialize(const base::Closure& report_error_to_uma_cb); | 169 bool VaInitialize(const base::Closure& report_error_to_uma_cb); |
170 bool GetSupportedVaProfiles(std::vector<VAProfile>* profiles); | 170 bool GetSupportedVaProfiles(std::vector<VAProfile>* profiles); |
171 bool IsEntrypointSupported(VAProfile va_profile, VAEntrypoint entrypoint); | 171 bool IsEntrypointSupported(VAProfile va_profile, VAEntrypoint entrypoint); |
172 bool AreAttribsSupported(VAProfile va_profile, | 172 bool AreAttribsSupported(VAProfile va_profile, |
173 VAEntrypoint entrypoint, | 173 VAEntrypoint entrypoint, |
174 const std::vector<VAConfigAttrib>& required_attribs); | 174 const std::vector<VAConfigAttrib>& required_attribs); |
| 175 bool GetVaCodecMaxResolution(gfx::Size* resolution); |
175 | 176 |
176 // Destroys a |va_surface| created using CreateUnownedSurface. | 177 // Destroys a |va_surface| created using CreateUnownedSurface. |
177 void DestroyUnownedSurface(VASurfaceID va_surface_id); | 178 void DestroyUnownedSurface(VASurfaceID va_surface_id); |
178 | 179 |
179 // Initialize the video post processing context with the |size| of | 180 // Initialize the video post processing context with the |size| of |
180 // the input pictures to be processed. | 181 // the input pictures to be processed. |
181 bool InitializeVpp_Locked(); | 182 bool InitializeVpp_Locked(); |
182 | 183 |
183 // Deinitialize the video post processing context. | 184 // Deinitialize the video post processing context. |
184 void DeinitializeVpp(); | 185 void DeinitializeVpp(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 VAConfigID va_vpp_config_id_; | 234 VAConfigID va_vpp_config_id_; |
234 VAContextID va_vpp_context_id_; | 235 VAContextID va_vpp_context_id_; |
235 VABufferID va_vpp_buffer_id_; | 236 VABufferID va_vpp_buffer_id_; |
236 | 237 |
237 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper); | 238 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper); |
238 }; | 239 }; |
239 | 240 |
240 } // namespace content | 241 } // namespace content |
241 | 242 |
242 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ | 243 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ |
OLD | NEW |