From 4ab860cddc177047663bbe8940b0d34c621b6425 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 5 Sep 2016 21:04:17 +0200 Subject: options: add a mechanism to make sub-option replacement slightly easier Instead of requiring each VO or AO to manually add members to MPOpts and the global option table, make it possible to register them automatically via vo_driver/ao_driver.global_opts members. This avoids modifying options.c/options.h every time, including having to duplicate the exact ifdeffery used to enable a driver. --- video/out/vo.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'video/out/vo.h') diff --git a/video/out/vo.h b/video/out/vo.h index 15f9f9e7df..6a6101692c 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -296,6 +296,10 @@ struct vo_driver { // List of options to parse into priv struct (requires priv_size to be set) const struct m_option *options; + + // Global options to register if the VO is compiled in. + // mp_get_config_group() or other function can be used to access them. + const struct m_sub_options *global_opts; }; struct vo { -- cgit v1.2.3