diff options
author | wm4 <wm4@nowhere> | 2015-01-22 15:32:23 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-22 15:32:23 +0100 |
commit | aae9af348e62d5feba6547855003df0d954cb3ae (patch) | |
tree | dd0d28655c65e1f814bec3ef537ea377a941b9b7 /video/out/gl_hwdec.c | |
parent | 29cf62d20133b32e1514a315b4f7e013ed9cb768 (diff) | |
download | mpv-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/out/gl_hwdec.c')
-rw-r--r-- | video/out/gl_hwdec.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/video/out/gl_hwdec.c b/video/out/gl_hwdec.c index 3bab1c1e9c..7b8adb4fc4 100644 --- a/video/out/gl_hwdec.c +++ b/video/out/gl_hwdec.c @@ -49,7 +49,6 @@ static const struct gl_hwdec_driver *const mpgl_hwdec_drivers[] = { static struct gl_hwdec *load_hwdec_driver(struct mp_log *log, GL *gl, const struct gl_hwdec_driver *drv, - struct mp_hwdec_info *info, bool is_auto) { struct gl_hwdec *hwdec = talloc(NULL, struct gl_hwdec); @@ -57,7 +56,6 @@ static struct gl_hwdec *load_hwdec_driver(struct mp_log *log, GL *gl, .driver = drv, .log = mp_log_new(hwdec, log, drv->api_name), .gl = gl, - .info = info, .gl_texture_target = GL_TEXTURE_2D, .reject_emulated = is_auto, }; @@ -70,14 +68,13 @@ static struct gl_hwdec *load_hwdec_driver(struct mp_log *log, GL *gl, } struct gl_hwdec *gl_hwdec_load_api(struct mp_log *log, GL *gl, - const char *api_name, - struct mp_hwdec_info *info) + const char *api_name) { bool is_auto = api_name && strcmp(api_name, "auto") == 0; for (int n = 0; mpgl_hwdec_drivers[n]; n++) { const struct gl_hwdec_driver *drv = mpgl_hwdec_drivers[n]; if (is_auto || (api_name && strcmp(drv->api_name, api_name) == 0)) { - struct gl_hwdec *r = load_hwdec_driver(log, gl, drv, info, is_auto); + struct gl_hwdec *r = load_hwdec_driver(log, gl, drv, is_auto); if (r) return r; } |