From 9e6b9d8a982eb07a05fd059a92f1d6b2f01460a0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 5 Sep 2016 21:04:55 +0200 Subject: vo_image: move to global options This is a bit "special", because the config tree wants unique m_sub_options pointers in the whole thing. --- options/options.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index e5de82d8a3..e2bd3d8d95 100644 --- a/options/options.c +++ b/options/options.c @@ -40,6 +40,7 @@ #include "stream/stream.h" #include "video/csputils.h" #include "video/hwdec.h" +#include "video/image_writer.h" #include "sub/osd.h" #include "audio/filter/af.h" #include "audio/decode/dec_audio.h" @@ -72,7 +73,6 @@ 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_sub_options image_writer_conf; extern const struct m_sub_options gl_video_conf; extern const struct m_sub_options ao_alsa_conf; @@ -99,6 +99,12 @@ const struct m_opt_choice_alternatives mp_hwdec_names[] = { {0} }; +static const struct m_sub_options screenshot_conf = { + .opts = image_writer_opts, + .size = sizeof(struct image_writer_opts), + .defaults = &image_writer_opts_defaults, +}; + #define OPT_BASE_STRUCT struct mp_vo_opts static const m_option_t mp_vo_opt_list[] = { @@ -632,7 +638,7 @@ const m_option_t mp_opts[] = { OPT_STRING("input-file", input_file, M_OPT_FILE | M_OPT_GLOBAL), OPT_STRING("input-ipc-server", ipc_path, M_OPT_FILE | M_OPT_FIXED), - OPT_SUBSTRUCT("screenshot", screenshot_image_opts, image_writer_conf, 0), + OPT_SUBSTRUCT("screenshot", screenshot_image_opts, screenshot_conf, 0), OPT_STRING("screenshot-template", screenshot_template, 0), OPT_STRING("screenshot-directory", screenshot_directory, 0), -- cgit v1.2.3