From 849480d0c9d5ef76bd3296034b2ad5019fb9c21d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 2 Sep 2016 15:59:40 +0200 Subject: 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 . --- options/m_option.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'options/m_option.h') 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 */ -- cgit v1.2.3