diff options
author | wm4 <wm4@nowhere> | 2013-03-01 21:19:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-28 21:46:17 +0100 |
commit | 6ef06aa145067b816aaf3b941aba11e36bfca545 (patch) | |
tree | 116401ac1bc8fd443e936cd8ae5e8f1424afdd51 /core | |
parent | 16e951c2cdfa6710f0d5cc77b513e0f2a5f1377d (diff) | |
download | mpv-6ef06aa145067b816aaf3b941aba11e36bfca545.tar.bz2 mpv-6ef06aa145067b816aaf3b941aba11e36bfca545.tar.xz |
vo_opengl: split into multiple files, convert to new option API
gl_video.c contains all rendering code, gl_lcms.c the .icc loader and
creation of 3D LUT (and all LittleCMS specific code). vo_opengl.c is
reduced to interfacing between the various parts.
Diffstat (limited to 'core')
-rw-r--r-- | core/m_option.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/m_option.h b/core/m_option.h index d34b6b8495..fd0ebbd44c 100644 --- a/core/m_option.h +++ b/core/m_option.h @@ -152,6 +152,10 @@ struct m_opt_choice_alternatives { int value; }; +// For OPT_STRING_VALIDATE(). Behaves like m_option_type.parse(). +typedef int (*m_opt_string_validate_fn)(const m_option_t *opt, struct bstr name, + struct bstr param); + // m_option.priv points to this if M_OPT_TYPE_USE_SUBSTRUCT is used struct m_sub_options { const struct m_option *opts; @@ -614,6 +618,12 @@ static inline void m_option_free(const m_option_t *opt, void *dst) #define OPT_TRACKCHOICE(name, var) \ OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1})) +#define OPT_STRING_VALIDATE_(optname, varname, flags, validate_fn, ...) \ + OPT_GENERAL(char*, optname, varname, flags, __VA_ARGS__, \ + .priv = MP_EXPECT_TYPE(m_opt_string_validate_fn, validate_fn)) +#define OPT_STRING_VALIDATE(...) \ + OPT_STRING_VALIDATE_(__VA_ARGS__, .type = &m_option_type_string) + // subconf must have the type struct m_sub_options. // All sub-options are prefixed with "name-" and are added to the current // (containing) option list. |