summaryrefslogtreecommitdiffstats
path: root/core/m_option.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-21 01:43:09 +0200
committerwm4 <wm4@nowhere>2013-04-21 03:48:30 +0200
commitc6037982fda4815cc36ead7370bce9fc60ef7747 (patch)
tree2ec70177c75dcfaa64a3252d5688d10937f656a5 /core/m_option.c
parent6526162bc0b14ac88e397451fa57b5ca8ba9a64d (diff)
downloadmpv-c6037982fda4815cc36ead7370bce9fc60ef7747.tar.bz2
mpv-c6037982fda4815cc36ead7370bce9fc60ef7747.tar.xz
options: untangle track range parsing for stream_cdda
Remove the "object settings" based track range parsing (needed by stream_cdda only), and make stream_cdda use CONF_TYPE_INT_PAIR. This makes the -vf parsing code completely independent from other options. A bit of that code was used by the mechanism removed with this commit.
Diffstat (limited to 'core/m_option.c')
-rw-r--r--core/m_option.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/core/m_option.c b/core/m_option.c
index 20391a5846..2feaa5a4b1 100644
--- a/core/m_option.c
+++ b/core/m_option.c
@@ -1863,62 +1863,6 @@ static int get_obj_params(struct bstr opt_name, struct bstr name,
return 1;
}
-static int parse_obj_params(const m_option_t *opt, struct bstr name,
- struct bstr param, void *dst)
-{
- char **opts;
- int r;
- m_obj_params_t *p = opt->priv;
- const m_struct_t *desc;
-
- // We need the object desc
- if (!p)
- return M_OPT_INVALID;
-
- desc = p->desc;
- r = get_obj_params(name, bstr0(desc->name), param, desc, p->separator,
- dst ? &opts : NULL);
- if (r < 0)
- return r;
- if (!dst)
- return 1;
- if (!opts) // no arguments given
- return 1;
-
- for (r = 0; opts[r]; r += 2)
- m_struct_set(desc, dst, opts[r], bstr0(opts[r + 1]));
-
- return 1;
-}
-
-
-const m_option_type_t m_option_type_obj_params = {
- .name = "Object params",
- .parse = parse_obj_params,
-};
-
-/// Some predefined types as a definition would be quite lengthy
-
-/// Span arguments
-static const m_span_t m_span_params_dflts = {
- -1, -1
-};
-static const m_option_t m_span_params_fields[] = {
- {"start", M_ST_OFF(m_span_t, start), CONF_TYPE_INT, M_OPT_MIN, 1, 0, NULL},
- {"end", M_ST_OFF(m_span_t, end), CONF_TYPE_INT, M_OPT_MIN, 1, 0, NULL},
- { NULL, NULL, 0, 0, 0, 0, NULL }
-};
-static const struct m_struct_st m_span_opts = {
- "m_span",
- sizeof(m_span_t),
- &m_span_params_dflts,
- m_span_params_fields
-};
-const m_obj_params_t m_span_params_def = {
- &m_span_opts,
- '-'
-};
-
static int parse_obj_settings(struct bstr opt, struct bstr str,
const m_obj_list_t *list,
m_obj_settings_t **_ret, int ret_n)