diff options
author | wm4 <wm4@nowhere> | 2013-01-23 10:56:36 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-23 10:56:36 +0100 |
commit | 7885fce7ea68d4c64e034b152f2a0b08bb648adc (patch) | |
tree | 1287161e93f05b5964347d008b82c18f0aad0ca8 /core/m_option.h | |
parent | ccaed5eb071319f9d412f42610302765b844f978 (diff) | |
download | mpv-7885fce7ea68d4c64e034b152f2a0b08bb648adc.tar.bz2 mpv-7885fce7ea68d4c64e034b152f2a0b08bb648adc.tar.xz |
video: add --autofit and --autofit-larger options
--autofit=WxH sets the window size to a maximum width and/or height,
without changing the window's aspect ratio.
--autofit-larger=WxH does the same, but only if the video size is
actually larger than the window size that would result when using
the --autofit=WxH option with the same arguments.
Diffstat (limited to 'core/m_option.h')
-rw-r--r-- | core/m_option.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/m_option.h b/core/m_option.h index 87fa959992..81ab73e98b 100644 --- a/core/m_option.h +++ b/core/m_option.h @@ -57,6 +57,7 @@ extern const m_option_type_t m_option_type_fourcc; extern const m_option_type_t m_option_type_afmt; extern const m_option_type_t m_option_type_color; extern const m_option_type_t m_option_type_geometry; +extern const m_option_type_t m_option_type_size_box; // Callback used by m_option_type_print_func options. typedef int (*m_opt_func_full_t)(const m_option_t *, const char *, const char *); @@ -219,6 +220,7 @@ union m_option_value { struct m_rel_time rel_time; struct m_color color; struct m_geometry geometry; + struct m_geometry size_box; }; //////////////////////////////////////////////////////////////////////////// @@ -534,6 +536,7 @@ static inline void m_option_free(const m_option_t *opt, void *dst) #define OPT_REL_TIME(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_rel_time) #define OPT_COLOR(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_color) #define OPT_GEOMETRY(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_geometry) +#define OPT_SIZE_BOX(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_size_box) #define OPT_TRACKCHOICE(name, var) OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1})) |