diff options
author | wm4 <wm4@nowhere> | 2016-06-28 20:36:00 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-28 20:38:53 +0200 |
commit | 9ca1592f3f2bf6389a2e1f616f2a39b189554401 (patch) | |
tree | b6e667cd19a711e2a9655f094342b40adcd66858 /video/out/opengl | |
parent | 17c5738cb43382831407400312f0f0d4989d115c (diff) | |
download | mpv-9ca1592f3f2bf6389a2e1f616f2a39b189554401.tar.bz2 mpv-9ca1592f3f2bf6389a2e1f616f2a39b189554401.tar.xz |
d3d: implement screenshots for --hwdec=d3d11va
No method of taking a screenshot was implemented at all. vo_opengl
lacked window screenshotting, because ANGLE doesn't allow reading the
frontbuffer. There was no way to read back from a D3D11 texture either.
Implement reading image data from D3D11 textures. This is a low-quality
effort to get basic screenshots done. Eventually there will be a better
implementation: once we use AVHWFramesContext natively, the readback
implementation will be in libavcodec, and will be able to cache the
staging texture correctly. Hopefully. (For now it doesn't even have a
AVHWFramesContext for D3D11 yet. But the abstraction is more appropriate
for this purpose.)
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/hwdec_d3d11egl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c index 1e69d87269..07333c372e 100644 --- a/video/out/opengl/hwdec_d3d11egl.c +++ b/video/out/opengl/hwdec_d3d11egl.c @@ -195,6 +195,7 @@ static int create(struct gl_hwdec *hw) .type = HWDEC_D3D11VA, .driver_name = hw->driver->name, .ctx = p->d3d11_device, + .download_image = d3d11_download_image, }; hwdec_devices_add(hw->devs, &p->hwctx); |