summaryrefslogtreecommitdiffstats
path: root/video/decode/d3d.h
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2016-06-25 02:25:44 +0200
committerMartin Herkt <lachs0r@srsfckn.biz>2016-06-25 02:25:44 +0200
commitad56f2c46ac6deec86870ec10f2a11a644df07d4 (patch)
tree89f2d90c5586560911e67c872b530c77f151168d /video/decode/d3d.h
parent0536841647ef7931bffb4386d8ffbb5b2b568e8a (diff)
parent393bb2a565dc1e27812e1dd20747814892f80da2 (diff)
downloadmpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.bz2
mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.xz
Merge branch 'master' into release/current
Diffstat (limited to 'video/decode/d3d.h')
-rw-r--r--video/decode/d3d.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/video/decode/d3d.h b/video/decode/d3d.h
index bbd6bdfd2a..15c423ab8c 100644
--- a/video/decode/d3d.h
+++ b/video/decode/d3d.h
@@ -24,16 +24,31 @@
struct mp_image;
struct lavc_ctx;
+struct d3d_decoded_format {
+ DWORD dxfmt; // D3DFORMAT or DXGI_FORMAT
+ const char *name; // informational string repr. of dxfmt_decoded
+ int depth; // significant bits (not full size)
+ int mpfmt; // IMGFMT_ with compatible memory layout and semantics
+};
+
struct d3d_decoder_fmt {
const GUID *guid;
- int mpfmt_decoded;
- DWORD dxfmt_decoded; // D3DFORMAT or DXGI_FORMAT
+ const struct d3d_decoded_format *format;
};
+// Must call d3d_load_dlls() before accessing. Once this is done, the DLLs
+// remain loaded forever.
+extern HMODULE d3d11_dll, d3d9_dll, dxva2_dll;
+
+void d3d_load_dlls(void);
+
int d3d_probe_codec(const char *codec);
+
struct d3d_decoder_fmt d3d_select_decoder_mode(
struct lavc_ctx *s, const GUID *device_guids, UINT n_guids,
- DWORD (*get_dxfmt_cb)(struct lavc_ctx *s, const GUID *guid, int depth));
+ const struct d3d_decoded_format *formats, int n_formats,
+ bool (*test_fmt_cb)(struct lavc_ctx *s, const GUID *guid,
+ const struct d3d_decoded_format *fmt));
char *d3d_decoder_guid_to_desc_buf(char *buf, size_t buf_size,
const GUID *mode_guid);