summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/hwdec.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-17 21:07:41 +0100
committerwm4 <wm4@nowhere>2015-11-17 21:21:19 +0100
commit0ec35fa111391b8069640ba2f616746a1b5530a5 (patch)
treee5356e8ab396e1c370a7784843f3101d3195469f /video/out/opengl/hwdec.h
parent25fe9e89e7db1658acac84ec8ac0a292b2e86165 (diff)
downloadmpv-0ec35fa111391b8069640ba2f616746a1b5530a5.tar.bz2
mpv-0ec35fa111391b8069640ba2f616746a1b5530a5.tar.xz
videotoolbox: make decoder format customizable
Because apparently there's no ideal universally working format. The weird OpenGL texture format for kCVPixelFormatType_32BGRA is from: http://stackoverflow.com/questions/22077544/draw-an-iosurface-to-an-opengl-context (Which apparently got it from the linked Apple example code.)
Diffstat (limited to 'video/out/opengl/hwdec.h')
-rw-r--r--video/out/opengl/hwdec.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/video/out/opengl/hwdec.h b/video/out/opengl/hwdec.h
index 6f07536f57..ac1771c28d 100644
--- a/video/out/opengl/hwdec.h
+++ b/video/out/opengl/hwdec.h
@@ -9,6 +9,7 @@ struct mp_hwdec_info;
struct gl_hwdec {
const struct gl_hwdec_driver *driver;
struct mp_log *log;
+ struct mpv_global *global;
GL *gl;
struct mp_hwdec_ctx *hwctx;
// For free use by hwdec driver
@@ -45,8 +46,9 @@ struct gl_hwdec_driver {
};
struct gl_hwdec *gl_hwdec_load_api(struct mp_log *log, GL *gl,
- const char *api_name);
-struct gl_hwdec *gl_hwdec_load_api_id(struct mp_log *log, GL *gl, int id);
+ struct mpv_global *g, const char *api_name);
+struct gl_hwdec *gl_hwdec_load_api_id(struct mp_log *log, GL *gl,
+ struct mpv_global *g, int id);
void gl_hwdec_uninit(struct gl_hwdec *hwdec);