简体   繁体   English

使用 OpenGL 渲染 VAAPI 表面?

[英]Render VAAPI surface with using OpenGL?

My project is to use the VAAPI hardware acceleration linked with FFmpeg.我的项目是使用与FFmpeg链接的VAAPI硬件加速。

I managed to decode with VAAPI however I would like to be able to display the video coming out of VAAPI using OpenGL.我设法使用 VAAPI 进行解码,但是我希望能够使用 OpenGL 显示来自 VAAPI 的视频。

Are there functions that allow this?是否有允许这样做的功能?

I know that for that you have to play with VAAPI's surface VASurfaceID but I do not see how...我知道为此您必须使用 VAAPI 的表面VASurfaceID但我不知道如何...

You can use functions vaCreateSurfaceGLX() , vaCopySurfaceGLX() and vaCopySurfaceGLX() for that purpose. vaCreateSurfaceGLX() ,您可以使用函数vaCreateSurfaceGLX()vaCopySurfaceGLX()vaCopySurfaceGLX() There is other alternatives using DRM and EGL, but in my opinion are much more difficult to achieve.还有其他使用 DRM 和 EGL 的替代方案,但在我看来,实现起来要困难得多。 You can find an example using EGL in mpv source code .您可以在mpv 源代码中找到使用 EGL 的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM