From 9ca1592f3f2bf6389a2e1f616f2a39b189554401 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 28 Jun 2016 20:36:00 +0200 Subject: 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.) --- video/out/opengl/hwdec_d3d11egl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'video/out/opengl/hwdec_d3d11egl.c') 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); -- cgit v1.2.3