Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

ffmpeg decoded qsv avframe transfered to opengl texture #2966

Open
linxierr opened this issue Jul 21, 2022 · 3 comments
Open

ffmpeg decoded qsv avframe transfered to opengl texture #2966

linxierr opened this issue Jul 21, 2022 · 3 comments

Comments

@linxierr
Copy link

Hi there, I am currently using ffmpeg qsv_h264 and opengl redering on windows , is there any api that can transfer the decode frame to opengl texture to make the 0-copy rendering, thank you.

@wangyan-intel
Copy link

@xhaihao Could you please give some comments?

@xhaihao
Copy link
Contributor

xhaihao commented Jul 22, 2022

av_hwframe_map() may map a qsv frame to a d3d11 frame, then you may use the d3d11 frame in your app. See https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/hwcontext.h#L543-L583

@linxierr
Copy link
Author

av_hwframe_map() may map a qsv frame to a d3d11 frame, then you may use the d3d11 frame in your app. See https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/hwcontext.h#L543-L583

very appreciate it, thank you, and I'll try to research how to share the memory for d3d11 and opengl.

By the way, Do mediaSDK has the similar function like the link refers for cuda https://www.qtav.org/blog/cuda_0_copy.html.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants