From aae9af348e62d5feba6547855003df0d954cb3ae Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Jan 2015 15:32:23 +0100 Subject: video: have a generic context struct for hwdec backends Before this commit, each hw backend had their own specific struct types for context, and some, like VDA, had none at all. Add a context struct (mp_hwdec_ctx) that provides a somewhat generic way to pass the hwdec context around. Some things get slightly better, some slightly more verbose. mp_hwdec_info is still around; it's still needed, but is reduced to its role of handling delayed loading of the hwdec backend. --- video/vdpau.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/vdpau.h') diff --git a/video/vdpau.h b/video/vdpau.h index f1c29fd50d..0af00f098b 100644 --- a/video/vdpau.h +++ b/video/vdpau.h @@ -10,6 +10,7 @@ #include #include "common/msg.h" +#include "hwdec.h" #define CHECK_VDP_ERROR(ctx, message) \ do { \ @@ -40,6 +41,8 @@ struct mp_vdpau_ctx { struct mp_log *log; Display *x11; + struct mp_hwdec_ctx hwctx; + // These are mostly immutable, except on preemption. We don't really care // to synchronize the preemption case fully correctly, because it's an // extremely obscure corner case, and basically a vdpau API design bug. -- cgit v1.2.3