summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-20 15:34:31 +0200
committerwm4 <wm4@nowhere>2016-09-20 15:44:16 +0200
commite13eb3fede680fdadb76efce957806654cda0f23 (patch)
treed3ae9bc7c32824256588a2896ae64afb57f97825 /options
parentbf385e1140069fb1c6d41161aece0fe099513ac0 (diff)
downloadmpv-e13eb3fede680fdadb76efce957806654cda0f23.tar.bz2
mpv-e13eb3fede680fdadb76efce957806654cda0f23.tar.xz
command: change update handling of some video-related properties
Use the new mechanism, instead of wrapped properties. As usual, extend the update handling to some options that were forgotten/neglected before. Rename video_reset_aspect() to video_reset_params() to make it more "general" (and we can amazingly include write access to video-aspect as well in this).
Diffstat (limited to 'options')
-rw-r--r--options/m_option.h3
-rw-r--r--options/options.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/options/m_option.h b/options/m_option.h
index e0f8979a66..63ba4fac03 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -386,7 +386,8 @@ struct m_option {
#define UPDATE_VIDEOPOS (1 << 9) // video position (panscan etc.)
#define UPDATE_OSD (1 << 10) // related to OSD rendering
#define UPDATE_BUILTIN_SCRIPTS (1 << 11) // osc/ytdl
-#define UPDATE_OPT_LAST (1 << 11)
+#define UPDATE_IMGPAR (1 << 12) // video image params overrides
+#define UPDATE_OPT_LAST (1 << 12)
// All bits between _FIRST and _LAST (inclusive)
#define UPDATE_OPTS_MASK \
diff --git a/options/options.c b/options/options.c
index 70d921ab73..1476b384b5 100644
--- a/options/options.c
+++ b/options/options.c
@@ -424,11 +424,11 @@ const m_option_t mp_opts[] = {
// -1 means auto aspect (prefer container size until aspect change)
// 0 means square pixels
- OPT_ASPECT("video-aspect", movie_aspect, 0, -1.0, 10.0),
- OPT_CHOICE("video-aspect-method", aspect_method, 0,
+ OPT_ASPECT("video-aspect", movie_aspect, UPDATE_IMGPAR, -1.0, 10.0),
+ OPT_CHOICE("video-aspect-method", aspect_method, UPDATE_IMGPAR,
({"hybrid", 0}, {"bitstream", 1}, {"container", 2})),
- OPT_CHOICE("field-dominance", field_dominance, 0,
+ OPT_CHOICE("field-dominance", field_dominance, UPDATE_IMGPAR,
({"auto", -1}, {"top", 0}, {"bottom", 1})),
OPT_SUBSTRUCT("vd-lavc", vd_lavc_params, vd_lavc_conf, 0),
@@ -531,9 +531,10 @@ const m_option_t mp_opts[] = {
OPT_STRING("force-media-title", media_title, 0),
// set aspect ratio of monitor - useful for 16:9 TV-out
OPT_FLAG("force-rgba-osd-rendering", force_rgba_osd, 0),
- OPT_CHOICE_OR_INT("video-rotate", video_rotate, 0, 0, 359,
+ OPT_CHOICE_OR_INT("video-rotate", video_rotate, UPDATE_IMGPAR, 0, 359,
({"no", -1})),
- OPT_CHOICE_C("video-stereo-mode", video_stereo_mode, 0, mp_stereo3d_names),
+ OPT_CHOICE_C("video-stereo-mode", video_stereo_mode, UPDATE_IMGPAR,
+ mp_stereo3d_names),
OPT_CHOICE_OR_INT("cursor-autohide", cursor_autohide_delay, 0,
0, 30000, ({"no", -1}, {"always", -2})),