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/vaapi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'video/vaapi.c') diff --git a/video/vaapi.c b/video/vaapi.c index e7cd7591a1..13e78f0f31 100644 --- a/video/vaapi.c +++ b/video/vaapi.c @@ -122,6 +122,10 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog) *res = (struct mp_vaapi_ctx) { .log = talloc_steal(res, log), .display = display, + .hwctx = { + .priv = res, + .vaapi_ctx = res, + }, }; mpthread_mutex_init_recursive(&res->lock); -- cgit v1.2.3