summaryrefslogtreecommitdiffstats
path: root/core/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-21 22:59:01 +0100
committerwm4 <wm4@nowhere>2013-02-23 00:10:23 +0100
commit5374e26f9e2cfbc3b7323c1b4e16975ad7f2c5e9 (patch)
tree8a805febd6894681791b3af6541964d46dbd2bee /core/m_option.h
parentbfaebd26eefc9ae72cfe78377728a445f6ff3c26 (diff)
downloadmpv-5374e26f9e2cfbc3b7323c1b4e16975ad7f2c5e9.tar.bz2
mpv-5374e26f9e2cfbc3b7323c1b4e16975ad7f2c5e9.tar.xz
m_option: remove preset mechanism
Was very complicated to use, and its uses have been removed in the previous commits. (While this feature sounded kind of useful, it could be rewritten in a much simpler way, like storing presets as strings, and then using the option parser to apply a preset. The removed code did some major pointer juggling to handle raw values, which made it hard to use.)
Diffstat (limited to 'core/m_option.h')
-rw-r--r--core/m_option.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/core/m_option.h b/core/m_option.h
index 7b1e36eed7..90e41b1447 100644
--- a/core/m_option.h
+++ b/core/m_option.h
@@ -118,27 +118,6 @@ typedef struct m_obj_settings {
*/
extern const m_option_type_t m_option_type_obj_settings_list;
-// Extra definition needed for \ref m_option_type_obj_presets options.
-typedef struct {
- // Description of the struct holding the presets.
- const struct m_struct_st *in_desc;
- // Description of the struct that should be set by the presets.
- const struct m_struct_st *out_desc;
- // Pointer to an array of structs defining the various presets.
- const void *presets;
- // Offset of the preset's name inside the in_struct.
- void *name_off;
-} m_obj_presets_t;
-
-// Set several fields in a struct at once.
-/** For this two struct descriptions are used. One for the struct holding the
- * preset and one for the struct beeing set. Every field present in both
- * structs will be copied from the preset struct to the destination one.
- * The option priv field (\ref m_option::priv) must point to a correctly
- * filled \ref m_obj_presets_t.
- */
-extern const m_option_type_t m_option_type_obj_presets;
-
// Parse an URL into a struct.
/** The option priv field (\ref m_option::priv) must point to a
* \ref m_struct_st describing which fields of the URL must be used.
@@ -196,7 +175,6 @@ struct m_sub_options {
#define CONF_TYPE_AFMT (&m_option_type_afmt)
#define CONF_TYPE_SPAN (&m_option_type_span)
#define CONF_TYPE_OBJ_SETTINGS_LIST (&m_option_type_obj_settings_list)
-#define CONF_TYPE_OBJ_PRESETS (&m_option_type_obj_presets)
#define CONF_TYPE_CUSTOM_URL (&m_option_type_custom_url)
#define CONF_TYPE_OBJ_PARAMS (&m_option_type_obj_params)
#define CONF_TYPE_TIME (&m_option_type_time)