summaryrefslogtreecommitdiffstats
path: root/video/vdpau.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-22 15:32:23 +0100
committerwm4 <wm4@nowhere>2015-01-22 15:32:23 +0100
commitaae9af348e62d5feba6547855003df0d954cb3ae (patch)
treedd0d28655c65e1f814bec3ef537ea377a941b9b7 /video/vdpau.c
parent29cf62d20133b32e1514a315b4f7e013ed9cb768 (diff)
downloadmpv-aae9af348e62d5feba6547855003df0d954cb3ae.tar.bz2
mpv-aae9af348e62d5feba6547855003df0d954cb3ae.tar.xz
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.
Diffstat (limited to 'video/vdpau.c')
-rw-r--r--video/vdpau.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/vdpau.c b/video/vdpau.c
index 650f181907..3f7488470c 100644
--- a/video/vdpau.c
+++ b/video/vdpau.c
@@ -302,6 +302,10 @@ struct mp_vdpau_ctx *mp_vdpau_create_device_x11(struct mp_log *log, Display *x11
.log = log,
.x11 = x11,
.preemption_counter = 1,
+ .hwctx = {
+ .priv = ctx,
+ .vdpau_ctx = ctx,
+ },
};
mpthread_mutex_init_recursive(&ctx->preempt_lock);
pthread_mutex_init(&ctx->pool_lock, NULL);