diff options
author | wm4 <wm4@nowhere> | 2016-09-02 15:59:40 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-02 21:21:47 +0200 |
commit | 849480d0c9d5ef76bd3296034b2ad5019fb9c21d (patch) | |
tree | ef72fcfbbcce7fb0c88048ae70a0ec42cdf7866a /options/m_option.h | |
parent | a07dae57e31882024518008c5c1c45f932c15193 (diff) | |
download | mpv-849480d0c9d5ef76bd3296034b2ad5019fb9c21d.tar.bz2 mpv-849480d0c9d5ef76bd3296034b2ad5019fb9c21d.tar.xz |
vo_opengl: deprecate sub-options, add them as global options
vo_opengl sub-option were always rather annoying to handle. It seems
better to make them global options instead. This is simpler and easier
to use. The only disadvantage we are aware of is that it's not clear
that many/all of these new global options work with vo_opengl only.
--vo=opengl-hq is also deprecated.
There is extensive compatibility with the old behavior. One exception is
that --vo-defaults will not apply to opengl-hq (though with opengl it
still works). vo-cmdline is also dysfunctional and will be removed in a
following commit.
These changes also affect opengl-cb.
The update mechanism is still rather inefficient: it requires syncing
with the VO after each option change, rather than batching updates.
There's also no granularity (video.c just updates "everything", and if
auto-ICC profiles are enabled, vo_opengl.c will fetch them on each
update).
Most of the manpage changes were done by Niklas Haas <git@haasn.xyz>.
Diffstat (limited to 'options/m_option.h')
-rw-r--r-- | options/m_option.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/options/m_option.h b/options/m_option.h index 548db319a1..d1426467e7 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -63,6 +63,7 @@ extern const m_option_type_t m_option_type_size_box; extern const m_option_type_t m_option_type_channels; extern const m_option_type_t m_option_type_aspect; extern const m_option_type_t m_option_type_node; +extern const m_option_type_t m_option_type_subopt_legacy; // Used internally by m_config.c extern const m_option_type_t m_option_type_alias; @@ -694,6 +695,12 @@ extern const char m_option_path_separator; .type = &m_option_type_subconfig, \ .priv = (void*)&subconf) +// Same as above, but for legacy suboption usage, which have no associated +// field (no actual data anywhere). +#define OPT_SUBSTRUCT_LEGACY(optname, subconf) \ + {.name = optname, .offset = -1, .type = &m_option_type_subconfig, \ + .priv = (void*)&subconf} + // Provide a another name for the option. #define OPT_ALIAS(optname, newname) \ {.name = optname, .type = &m_option_type_alias, .priv = newname, \ @@ -710,4 +717,10 @@ extern const char m_option_path_separator; {.name = optname, .type = &m_option_type_removed, .priv = msg, \ .deprecation_message = "", .offset = -1} +// Redirect a suboption (e.g. from --vo) to a global option. The redirection +// is handled as a special case instead of being applied automatically. +#define OPT_SUBOPT_LEGACY(optname, globalname) \ + {.name = optname, .type = &m_option_type_subopt_legacy, .priv = globalname, \ + .offset = -1} + #endif /* MPLAYER_M_OPTION_H */ |