summaryrefslogtreecommitdiffstats
path: root/core/mp_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-21 19:33:08 +0200
committerwm4 <wm4@nowhere>2013-07-21 23:27:31 +0200
commit6629a95b928499a46c9686f0800b65aec7fcbb22 (patch)
tree67e158d3678b54fc521b4fedb19a7dd20b823512 /core/mp_common.h
parent111a455ec621103b714a199217471af5f3efe35a (diff)
downloadmpv-6629a95b928499a46c9686f0800b65aec7fcbb22.tar.bz2
mpv-6629a95b928499a46c9686f0800b65aec7fcbb22.tar.xz
options: use m_config for options instead of m_struct
For some reason, both m_config and m_struct are somewhat similar, except that m_config is much more powerful. m_config is used for VOs and some other things, so to unify them. We plan to kick out m_struct and use m_config for everything. (Unfortunately, m_config is also a bit more bloated, so this commit isn't all that great, but it will allow to reduce the option parser mess somewhat.) This commit also switches all video filters to use the option macros. One reason is that m_struct and m_config, even though they both use m_option, store the offsets of the option fields differently (sigh...), meaning the options defined for either are incompatible. It's easier to switch everything in one go. This commit will allow using the -vf option parser for other things, like VOs and AOs.
Diffstat (limited to 'core/mp_common.h')
-rw-r--r--core/mp_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/mp_common.h b/core/mp_common.h
index bc6d4f3d32..71e24604ec 100644
--- a/core/mp_common.h
+++ b/core/mp_common.h
@@ -36,6 +36,7 @@
#define MPMAX(a, b) ((a) > (b) ? (a) : (b))
#define MPMIN(a, b) ((a) > (b) ? (b) : (a))
+#define MP_ARRAY_SIZE(s) (sizeof(s) / sizeof((s)[0]))
#define CONTROL_OK 1
#define CONTROL_TRUE 1