diff options
author | wm4 <wm4@nowhere> | 2016-09-08 21:46:48 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-08 21:46:48 +0200 |
commit | 5e30e7a04125e3c503160a76bbfe9361bff561fd (patch) | |
tree | 6aa17c781f70382471e331e4e9754aaf45ebe64b /options | |
parent | 35e8b6c1e68ae936ca0aeee4f30732cd13ef9932 (diff) | |
download | mpv-5e30e7a04125e3c503160a76bbfe9361bff561fd.tar.bz2 mpv-5e30e7a04125e3c503160a76bbfe9361bff561fd.tar.xz |
stream_dvd, stream_dvdnav: remove weird option parsing stuff
Same deal as with stream_bluray.
Untested because I don't give a fuck about your shitty DVDs.
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 22 | ||||
-rw-r--r-- | options/options.h | 12 |
2 files changed, 25 insertions, 9 deletions
diff --git a/options/options.c b/options/options.c index 64b264323e..078f606289 100644 --- a/options/options.c +++ b/options/options.c @@ -213,6 +213,22 @@ const struct m_sub_options vo_sub_opts = { }; #undef OPT_BASE_STRUCT +#define OPT_BASE_STRUCT struct dvd_opts + +const struct m_sub_options dvd_conf = { + .opts = (const struct m_option[]){ + OPT_STRING("dvd-device", device, M_OPT_FILE), + OPT_INT("dvd-speed", speed, 0), + OPT_INTRANGE("dvd-angle", angle, 0, 1, 99), + {0} + }, + .size = sizeof(struct dvd_opts), + .defaults = &(const struct dvd_opts){ + .angle = 1, + }, +}; + +#undef OPT_BASE_STRUCT #define OPT_BASE_STRUCT struct MPOpts const m_option_t mp_opts[] = { @@ -275,9 +291,7 @@ const m_option_t mp_opts[] = { OPT_SUBSTRUCT("", stream_cache, stream_cache_conf, 0), #if HAVE_DVDREAD || HAVE_DVDNAV - OPT_STRING("dvd-device", dvd_device, M_OPT_FILE), - OPT_INT("dvd-speed", dvd_speed, 0), - OPT_INTRANGE("dvd-angle", dvd_angle, 0, 1, 99), + OPT_SUBSTRUCT("", dvd_opts, dvd_conf, 0), #endif /* HAVE_DVDREAD */ OPT_INTPAIR("chapter", chapterrange, 0), OPT_CHOICE_OR_INT("edition", edition_id, 0, 0, 8190, @@ -855,8 +869,6 @@ const struct MPOpts mp_default_opts = { .index_mode = 1, - .dvd_angle = 1, - .mf_fps = 1.0, .display_tags = (char **)(const char*[]){ diff --git a/options/options.h b/options/options.h index 34ca1f320e..b0871a1d8f 100644 --- a/options/options.h +++ b/options/options.h @@ -290,10 +290,6 @@ typedef struct MPOpts { struct stream_lavf_params *stream_lavf_opts; char *cdrom_device; - int dvd_title; - int dvd_angle; - int dvd_speed; - char *dvd_device; char *bluray_device; double mf_fps; @@ -318,11 +314,19 @@ typedef struct MPOpts { char *input_file; struct gl_video_opts *gl_video_opts; + struct dvd_opts *dvd_opts; } MPOpts; +struct dvd_opts { + int angle; + int speed; + char *device; +}; + extern const m_option_t mp_opts[]; extern const struct MPOpts mp_default_opts; extern const struct m_sub_options vo_sub_opts; extern const struct m_sub_options stream_cache_conf; +extern const struct m_sub_options dvd_conf; #endif |