summaryrefslogtreecommitdiffstats
path: root/video/decode/d3d.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-06-28 20:36:00 +0200
committerwm4 <wm4@nowhere>2016-06-28 20:38:53 +0200
commit9ca1592f3f2bf6389a2e1f616f2a39b189554401 (patch)
treeb6e667cd19a711e2a9655f094342b40adcd66858 /video/decode/d3d.h
parent17c5738cb43382831407400312f0f0d4989d115c (diff)
downloadmpv-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/decode/d3d.h')
-rw-r--r--video/decode/d3d.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/d3d.h b/video/decode/d3d.h
index 16a8dc0258..6caeb2dc03 100644
--- a/video/decode/d3d.h
+++ b/video/decode/d3d.h
@@ -67,4 +67,8 @@ void copy_nv12(struct mp_image *dest, uint8_t *src_bits,
bool d3d11_check_decoding(ID3D11Device *dev);
+struct mp_image *d3d11_download_image(struct mp_hwdec_ctx *ctx,
+ struct mp_image *mpi,
+ struct mp_image_pool *swpool);
+
#endif