static void dump_decoder_info(struct lavc_ctx *s, const GUID *guid) { struct priv *p = s->hwdec_priv; char fmts[256] = {0}; for (int i = 0; i < MP_ARRAY_SIZE(d3d11_formats); i++) { const struct d3d_decoded_format *format = &d3d11_formats[i]; if (d3d11_format_supported(s, guid, format)) mp_snprintf_cat(fmts, sizeof(fmts), " %s", format->name); } MP_VERBOSE(p, "%s %s\n", d3d_decoder_guid_to_desc(guid), fmts); }
static DWORD get_dxfmt_cb(struct lavc_ctx *s, const GUID *guid, int depth) { for (int i = 0; i < MP_ARRAY_SIZE(d3d11_formats); i++) { const struct d3d11_format *format = &d3d11_formats[i]; if (depth <= format->depth && d3d11_format_supported(s, guid, format)) { return format->format; } } return 0; }
static DWORD get_dxfmt_cb(struct lavc_ctx *s, const GUID *guid, int depth) { struct priv *p = s->hwdec_priv; for (int i = 0; i < MP_ARRAY_SIZE(d3d11_formats); i++) { const struct d3d11_format *format = &d3d11_formats[i]; if (depth <= format->depth && d3d11_format_supported(s, guid, format)) { MP_VERBOSE(p, "Selecting %s %s\n", d3d_decoder_guid_to_desc(guid), format->name); return format->format; } } return 0; }