diff options
author | wm4 <wm4@nowhere> | 2013-11-04 00:00:18 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-04 00:11:07 +0100 |
commit | 571e697a7c557d10bcc9130915c431829981d877 (patch) | |
tree | 027490a8aca629a9c3d321556b5bc6da5159d844 /video/decode/dec_video.h | |
parent | 6f17410f88fd3765b6598b4e706b1d03ee85efe8 (diff) | |
download | mpv-571e697a7c557d10bcc9130915c431829981d877.tar.bz2 mpv-571e697a7c557d10bcc9130915c431829981d877.tar.xz |
vo_opengl: add infrastructure for hardware decoding OpenGL interop
Most hardware decoding APIs provide some OpenGL interop. This allows
using vo_opengl, without having to read the video data back from GPU.
This requires adding a backend for each hardware decoding API. (Each
backend is an entry in gl_hwdec_vaglx[].) The backends expose video data
as a set of OpenGL textures.
Add infrastructure to support this. The next commit will add support for
VA-API.
Diffstat (limited to 'video/decode/dec_video.h')
-rw-r--r-- | video/decode/dec_video.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h index 549d208f81..03b72907ef 100644 --- a/video/decode/dec_video.h +++ b/video/decode/dec_video.h @@ -47,6 +47,11 @@ int vd_control(struct sh_video *sh_video, int cmd, void *arg); struct mp_hwdec_info { struct mp_vdpau_ctx *vdpau_ctx; struct mp_vaapi_ctx *vaapi_ctx; + // Can be used to lazily load a requested API. + // api_name is e.g. "vdpau" (like the fields above, without "_ctx") + // Can be NULL, is idempotent, caller checks _ctx fields for success/access. + void (*load_api)(struct mp_hwdec_info *info, const char *api_name); + void *load_api_ctx; }; #endif /* MPLAYER_DEC_VIDEO_H */ |