summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_dlopen.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-18 13:53:44 +0200
committerwm4 <wm4@nowhere>2017-06-18 13:55:40 +0200
commitc680cfd18a09f9a023926db0b3a90f69e8651b37 (patch)
tree12968bbb2fd2443cb6cf1df6403a13bfbeb031b4 /video/filter/vf_dlopen.h
parent937dcc25adc20872f7b0751ddfecb89acebd05a2 (diff)
downloadmpv-c680cfd18a09f9a023926db0b3a90f69e8651b37.tar.bz2
mpv-c680cfd18a09f9a023926db0b3a90f69e8651b37.tar.xz
vf_dlopen: remove this filter
It was an attempt to move some MPlayer filters (which were removed from mpv) to external, loadable filters. That worked well, but then the MPlayer filters were ported to libavfilter (independently), so they're available again. Also there is a more widely supported and more advanced loadable filter system supported by mpv: vapoursynth. In conclusion, vf_dlopen is not useful anymore, confusing, and requires quite a bit of code (and probably wouldn't survive the rewrite of the mpv video filter chain, which has to come at some point). It has some implicit dependencies on internal conventions, like possibly the format names dropped in the previous commit. We also deprecated it last release. Drop it.
Diffstat (limited to 'video/filter/vf_dlopen.h')
-rw-r--r--video/filter/vf_dlopen.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/video/filter/vf_dlopen.h b/video/filter/vf_dlopen.h
deleted file mode 100644
index 0c8a4d9f0b..0000000000
--- a/video/filter/vf_dlopen.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Warning: this filter is deprecated.
- */
-
-#ifndef VF_DLOPEN_H
-#define VF_DLOPEN_H
-
-// when doing a two-way compatible change, don't change these
-// when doing a backwards compatible change, bump minor version
-// when doing an incompatible change, bump major version and zero minor version
-#define VF_DLOPEN_MAJOR_VERSION 1
-#define VF_DLOPEN_MINOR_VERSION 0
-
-#if VF_DLOPEN_MINOR_VERSION > 0
-# define VF_DLOPEN_CHECK_VERSION(ctx) \
- do { \
- if (ctx->major_version != VF_DLOPEN_MAJOR_VERSION || \
- ctx->minor_version < VF_DLOPEN_MINOR_VERSION) \
- return -1; \
- } while (0)
-#else
-// workaround for "comparison is always false" warning
-# define VF_DLOPEN_CHECK_VERSION(ctx) \
- do { \
- if (ctx->major_version != VF_DLOPEN_MAJOR_VERSION) \
- return -1; \
- } while (0)
-#endif
-
-// some common valid pixel format names:
-// "gray": 8 bit grayscale
-// "yuv420p": planar YUV, U and V planes have an xshift and yshift of 1
-// "rgb24": packed RGB24
-struct vf_dlopen_formatpair {
- const char *from;
- const char *to; // if NULL, this means identical format as source
-};
-
-#define FILTER_MAX_OUTCNT 16
-
-struct vf_dlopen_picdata {
- unsigned int planes;
- unsigned char *plane[4];
- signed int planestride[4];
- unsigned int planewidth[4];
- unsigned int planeheight[4];
- unsigned int planexshift[4];
- unsigned int planeyshift[4];
- double pts;
-};
-
-struct vf_dlopen_context {
- unsigned short major_version;
- unsigned short minor_version;
-
- void *priv;
-
- struct vf_dlopen_formatpair *format_mapping;
- // {NULL, NULL} terminated list of supported format pairs
- // if NULL, anything goes
-
- int (*config)(struct vf_dlopen_context *ctx); // -1 = error
- // image config is put into the in_* members before calling this
- // fills in the out_* members (which are preinitialized for an identity vf_dlopen_context)
-
- int (*put_image)(struct vf_dlopen_context *ctx); // returns number of images written, or negative on error
- // before this is called, inpic_* and outpic_* are filled
-
- void (*uninit)(struct vf_dlopen_context *ctx);
-
- unsigned int in_width;
- unsigned int in_height;
- unsigned int in_d_width;
- unsigned int in_d_height;
- const char *in_fmt;
- unsigned int out_width;
- unsigned int out_height;
- unsigned int out_d_width;
- unsigned int out_d_height;
- const char *out_fmt;
- unsigned int out_cnt;
-
- struct vf_dlopen_picdata inpic;
- char *inpic_qscale;
- unsigned int inpic_qscalestride;
- unsigned int inpic_qscaleshift;
-
- struct vf_dlopen_picdata outpic[FILTER_MAX_OUTCNT];
-};
-typedef int (vf_dlopen_getcontext_func)(struct vf_dlopen_context *ctx, int argc, const char **argv); // negative on error
-vf_dlopen_getcontext_func vf_dlopen_getcontext;
-
-#endif