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/out/vo_opengl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'video/out/vo_opengl.c') diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index bfb1adbec8..058b305c2f 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -224,8 +224,10 @@ static void request_hwdec_api(struct gl_priv *p, const char *api_name) if (p->hwdec) return; mpgl_lock(p->glctx); - p->hwdec = gl_hwdec_load_api(p->vo->log, p->gl, api_name, &p->hwdec_info); + p->hwdec = gl_hwdec_load_api(p->vo->log, p->gl, api_name); gl_video_set_hwdec(p->renderer, p->hwdec); + if (p->hwdec) + p->hwdec_info.hwctx = p->hwdec->hwctx; mpgl_unlock(p->glctx); } -- cgit v1.2.3