diff options
author | wm4 <wm4@nowhere> | 2013-12-21 17:51:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 20:50:10 +0100 |
commit | c8268701d9a4c5ff38b48f0e6b689f6dade4de42 (patch) | |
tree | 05d8a24ffc867f977a2178f5940d5723d82926bd /video | |
parent | 2eefa31c886723bcc30664ea9fe3e2420f2cc0c6 (diff) | |
download | mpv-c8268701d9a4c5ff38b48f0e6b689f6dade4de42.tar.bz2 mpv-c8268701d9a4c5ff38b48f0e6b689f6dade4de42.tar.xz |
video/out: pass along global context
Will be needed for other parts (especially in gl_lcms.c).
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gl_lcms.c | 6 | ||||
-rw-r--r-- | video/out/gl_lcms.h | 4 | ||||
-rw-r--r-- | video/out/vo.c | 1 | ||||
-rw-r--r-- | video/out/vo.h | 1 | ||||
-rw-r--r-- | video/out/vo_opengl.c | 2 |
5 files changed, 10 insertions, 4 deletions
diff --git a/video/out/gl_lcms.c b/video/out/gl_lcms.c index f6d01948e8..84ef2d3f68 100644 --- a/video/out/gl_lcms.c +++ b/video/out/gl_lcms.c @@ -103,7 +103,8 @@ static struct bstr load_file(void *talloc_ctx, const char *filename) #define LUT3D_CACHE_HEADER "mpv 3dlut cache 1.0\n" -struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log) +struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log, + struct mpv_global *global) { int s_r, s_g, s_b; if (!parse_3dlut_size(opts->size_str, &s_r, &s_g, &s_b)) @@ -223,7 +224,8 @@ const struct m_sub_options mp_icc_conf = { .defaults = &(const struct mp_icc_opts) {0}, }; -struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log) +struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log, + struct mpv_global *global) { mp_msg_log(log, MSGL_FATAL, "LCMS2 support not compiled.\n"); return NULL; diff --git a/video/out/gl_lcms.h b/video/out/gl_lcms.h index ff51c7d13f..a579b78f43 100644 --- a/video/out/gl_lcms.h +++ b/video/out/gl_lcms.h @@ -12,6 +12,8 @@ struct mp_icc_opts { struct lut3d; struct mp_log; -struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log); +struct mpv_global; +struct lut3d *mp_load_icc(struct mp_icc_opts *opts, struct mp_log *log, + struct mpv_global *global); #endif diff --git a/video/out/vo.c b/video/out/vo.c index 5b29becbef..8bc4633ecc 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -160,6 +160,7 @@ static struct vo *vo_create(struct mpv_global *global, .log = mp_log_new(vo, log, name), .driver = desc.p, .opts = &global->opts->vo, + .global = global, .encode_lavc_ctx = encode_lavc_ctx, .input_ctx = input_ctx, .event_fd = -1, diff --git a/video/out/vo.h b/video/out/vo.h index e2881155df..2d3e507213 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -247,6 +247,7 @@ struct vo { const struct vo_driver *driver; void *priv; struct mp_vo_opts *opts; + struct mpv_global *global; struct vo_x11_state *x11; struct vo_w32_state *w32; struct vo_cocoa_state *cocoa; diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 5f24c7d65e..dea9f28266 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -397,7 +397,7 @@ static int preinit(struct vo *vo) gl_video_set_options(p->renderer, p->renderer_opts); if (p->icc_opts->profile) { - struct lut3d *lut3d = mp_load_icc(p->icc_opts, vo->log); + struct lut3d *lut3d = mp_load_icc(p->icc_opts, vo->log, vo->global); if (!lut3d) goto err_out; gl_video_set_lut3d(p->renderer, lut3d); |