From 8f60de98beef61c3631819a4e3a4be1ec56da00d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 11 Jun 2014 02:04:02 +0200 Subject: encode: make option struct local Similar to previous commits. --- options/options.c | 29 ++++------------------------- options/options.h | 23 ++--------------------- 2 files changed, 6 insertions(+), 46 deletions(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index a34f0e7bf5..7fb4060fca 100644 --- a/options/options.c +++ b/options/options.c @@ -66,6 +66,7 @@ extern const struct m_sub_options demux_lavf_conf; extern const struct m_sub_options vd_lavc_conf; extern const struct m_sub_options ad_lavc_conf; extern const struct m_sub_options input_config; +extern const struct m_sub_options encode_config; extern const struct m_obj_list vf_obj_list; extern const struct m_obj_list af_obj_list; @@ -505,29 +506,11 @@ const m_option_t mp_opts[] = { OPT_PRINT("version", print_version), OPT_PRINT("V", print_version), -#if HAVE_ENCODING - OPT_STRING("o", encode_output.file, CONF_GLOBAL | CONF_NOCFG | CONF_PRE_PARSE), - OPT_STRING("of", encode_output.format, CONF_GLOBAL), - OPT_STRINGLIST("ofopts*", encode_output.fopts, CONF_GLOBAL), - OPT_FLOATRANGE("ofps", encode_output.fps, CONF_GLOBAL, 0.0, 1000000.0), - OPT_FLOATRANGE("omaxfps", encode_output.maxfps, CONF_GLOBAL, 0.0, 1000000.0), - OPT_STRING("ovc", encode_output.vcodec, CONF_GLOBAL), - OPT_STRINGLIST("ovcopts*", encode_output.vopts, CONF_GLOBAL), - OPT_STRING("oac", encode_output.acodec, CONF_GLOBAL), - OPT_STRINGLIST("oacopts*", encode_output.aopts, CONF_GLOBAL), - OPT_FLAG("oharddup", encode_output.harddup, CONF_GLOBAL), - OPT_FLOATRANGE("ovoffset", encode_output.voffset, CONF_GLOBAL, -1000000.0, 1000000.0), - OPT_FLOATRANGE("oaoffset", encode_output.aoffset, CONF_GLOBAL, -1000000.0, 1000000.0), - OPT_FLAG("ocopyts", encode_output.copyts, CONF_GLOBAL), - OPT_FLAG("orawts", encode_output.rawts, CONF_GLOBAL), - OPT_FLAG("oautofps", encode_output.autofps, CONF_GLOBAL), - OPT_FLAG("oneverdrop", encode_output.neverdrop, CONF_GLOBAL), - OPT_FLAG("ovfirst", encode_output.video_first, CONF_GLOBAL), - OPT_FLAG("oafirst", encode_output.audio_first, CONF_GLOBAL), - OPT_FLAG("ometadata", encode_output.metadata, CONF_GLOBAL), +#ifdef HAVE_ENCODING + OPT_SUBSTRUCT("", encode_opts, encode_config, 0), #endif - {NULL, NULL, 0, 0, 0, 0, NULL} + {0} }; const struct MPOpts mp_default_opts = { @@ -643,10 +626,6 @@ const struct MPOpts mp_default_opts = { .dvd_angle = 1, .mf_fps = 1.0, - - .encode_output = { - .metadata = 1, - }, }; #endif /* MPLAYER_CFG_MPLAYER_H */ diff --git a/options/options.h b/options/options.h index ec66b33c8b..c89c6cfb19 100644 --- a/options/options.h +++ b/options/options.h @@ -265,27 +265,8 @@ typedef struct MPOpts { struct input_opts *input_opts; - struct encode_output_conf { - char *file; - char *format; - char **fopts; - float fps; - float maxfps; - char *vcodec; - char **vopts; - char *acodec; - char **aopts; - int harddup; - float voffset; - float aoffset; - int copyts; - int rawts; - int autofps; - int neverdrop; - int video_first; - int audio_first; - int metadata; - } encode_output; + // may be NULL if encoding is not compiled-in + struct encode_opts *encode_opts; } MPOpts; extern const m_option_t mp_opts[]; -- cgit v1.2.3