summaryrefslogtreecommitdiffstats
path: root/video/zimg.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/zimg.h')
-rw-r--r--video/zimg.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/video/zimg.h b/video/zimg.h
index 0d9c139f9a..9fa247d061 100644
--- a/video/zimg.h
+++ b/video/zimg.h
@@ -33,6 +33,7 @@ struct mp_zimg_context {
struct mp_image_params src, dst;
// Cached zimg state (if any). Private, do not touch.
+ struct m_config_cache *opts_cache;
zimg_filter_graph *zimg_graph;
void *zimg_tmp;
struct mp_zimg_repack *zimg_src;
@@ -43,6 +44,12 @@ struct mp_zimg_context {
// talloc_free() to release it).
struct mp_zimg_context *mp_zimg_alloc(void);
+// Enable auto-update of parameters from command line. Don't try to set custom
+// options (other than possibly .src/.dst), because they might be overwritten
+// if the user changes any options.
+void mp_zimg_enable_cmdline_opts(struct mp_zimg_context *ctx,
+ struct mpv_global *g);
+
// Try to build the conversion chain using the parameters currently set in ctx.
// If this succeeds, mp_zimg_convert() will always succeed (probably), as long
// as the input has the same parameters.
@@ -57,7 +64,3 @@ bool mp_zimg_config_image_params(struct mp_zimg_context *ctx);
// Convert/scale src to dst. On failure, the data in dst is not touched.
bool mp_zimg_convert(struct mp_zimg_context *ctx, struct mp_image *dst,
struct mp_image *src);
-
-// Set the global zimg command line parameters on this context. Use this if you
-// want the user to be able to change the scaler etc.
-void mp_zimg_set_from_cmdline(struct mp_zimg_context *ctx, struct mpv_global *g);