summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-21 03:33:13 +0200
committerwm4 <wm4@nowhere>2013-04-21 04:39:57 +0200
commit04f1e2dc43b9d490c392751f0e812247e6609a30 (patch)
tree14bd840855e7e0a7f72371566ce52f6bd14fe59d /video
parent9fd2e449defa49128b07270ed9397970e0ca12ca (diff)
downloadmpv-04f1e2dc43b9d490c392751f0e812247e6609a30.tar.bz2
mpv-04f1e2dc43b9d490c392751f0e812247e6609a30.tar.xz
m_option: redo code for parsing -vf to accept quotes
Parsing sub-configs (like --rawvideo=subopts or the suboptions for --vo=opengl:subopts) was completely different from the -vf parsing code for a variety of reasons. This change at least makes -vf use the same splitter code as sub-config options. The main improvement is that -vf now accepts quotes, so you can write things like: -vf 'lavfi=graph="gradfun=10:20"' (The '' quotes are for shell escaping.) This is a rather big and intrusive change. Trying some -vf lines from etc/encoding-example-profiles.conf seems to confirm it still works. This also attempts to unify one subtle difference in handling of positional arguments. One consequence is that a minor detail changes. Sub-configs don't know positional arguments, and something like "-- opt=sub1=val1:sub2" means that sub2 has to be a flag option. In -vf parsing, sub2 would be a positional option value. To remove this conflict and to facilitate actual unification of the parsers in the future, the sub2 will be considered a flag option if and only if such a flag option exists. Otherwise, it's considered a value for a positional option. E.g. if there's a filter "foo" with a string option "sopt" and a flag option "fopt", the behavior of the following changes: -vf foo=fopt Before this commit, this would set "sopt=fopt" in the filter. Now, it enables the fopt flag, and the sopt option remains unset. This is not an actual problem to my knowledge.
Diffstat (limited to 'video')
0 files changed, 0 insertions, 0 deletions