mpv/stream
wm4 94782e464d options: get rid of ambiguous option parsing
Options parsing used to be ambiguous, as in the splitting into option
and values pairs was ambiguous. Example:

    -option -something

It wasn't clear whether -option actually takes an argument or not. The
string "-something" could either be a separate option, or an argument
to "-option". The code had to call the option specific parser function
to resolve this.

This made everything complicated and didn't even have a real use. There
was only one case where this was actually used: string lists
(m_option_type_string_list) and options based on it. That is because
this option type actually turns a single option into a proxy for several
real arguments, e.g. "vf*" can handle "-vf-add" and "-vf-clr". Options
suffixed with "-clr" are the only options of this group which take no
arguments.

This is ambiguous only with the "old syntax" (as shown above). The "new"
option syntax always puts option name and value into same argument.
(E.g. "--option=--something" or "--option" "--something".)

Simplify the code by making it statically known whether an option takes
a parameter or not with the flag M_OPT_TYPE_OLD_SYNTAX_NO_PARAM. If it's
set, the option parser assumes the option takes no argument.

The only real ambiguity left, string list options that end on "-clr",
are special cased in the parser.

Remove some duplication of the logic in the command line parser by
moving all argument splitting logic into split_opt(). (It's arguable
whether that can be considered code duplication, but now the code is a
bit simpler anyway. This might be subjective.)

Remove the "ambiguous" parameter from all option parsing related code.

Make m_config unaware of the pre-parsing concept.

Make most CONF_NOCFG options also CONF_GLOBAL (except those explicitly
usable as per-file options.)
2012-08-05 23:51:49 +02:00
..
ai_alsa1x.c cleanup: remove more warnings 2011-05-02 00:46:48 +03:00
ai_oss.c
asf_mmst_streaming.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
asf_mmst_streaming.h
asf_streaming.c build: switch to libavutil bswap.h and intreadwrite.h 2012-02-01 22:46:27 +02:00
audio_in.c
audio_in.h
cache2.c commands, dvd, dvdnav, bluray: cleanup sub/audio track language display 2012-08-03 01:59:15 +02:00
cache2.h
cdd.h
cdinfo.c
cookies.c windows support: unicode filenames 2012-03-09 20:48:54 +02:00
cookies.h
dvb_tune.c cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
dvb_tune.h
dvbin.h
frequencies.c
frequencies.h
http.c stream/http: add a test file for ultravox in comment 2012-08-03 01:36:27 +02:00
http.h
network.c Remove some demuxers and decoders 2012-07-30 22:14:32 +02:00
network.h stream: http: Allow setting custom http header 2011-04-13 03:17:05 +03:00
open.c Add support for playing video from streaming sites with libquvi 2012-07-28 22:05:34 +02:00
pvr.h
stream.c options: get rid of ambiguous option parsing 2012-08-05 23:51:49 +02:00
stream.h commands, dvd, dvdnav, bluray: cleanup sub/audio track language display 2012-08-03 01:59:15 +02:00
stream_bluray.c commands, dvd, dvdnav, bluray: cleanup sub/audio track language display 2012-08-03 01:59:15 +02:00
stream_cdda.c stream: add new stream control command STREAM_CTRL_GET_NUM_TITLES 2012-08-03 01:43:03 +02:00
stream_cddb.c build: remove OS/2 support 2012-04-06 17:45:56 +03:00
stream_dvb.c
stream_dvd.c commands, dvd, dvdnav, bluray: cleanup sub/audio track language display 2012-08-03 01:59:15 +02:00
stream_dvd.h commands, dvd, dvdnav, bluray: cleanup sub/audio track language display 2012-08-03 01:59:15 +02:00
stream_dvd_common.c build: switch to libavutil bswap.h and intreadwrite.h 2012-02-01 22:46:27 +02:00
stream_dvd_common.h
stream_dvdnav.c commands, dvd, dvdnav, bluray: cleanup sub/audio track language display 2012-08-03 01:59:15 +02:00
stream_dvdnav.h commands, dvd, dvdnav, bluray: cleanup sub/audio track language display 2012-08-03 01:59:15 +02:00
stream_ffmpeg.c stream_ffmpeg: fix broken line from 30afc64532 2012-04-18 01:27:55 +03:00
stream_file.c Merge remote-tracking branch 'origin/master' into my_master 2012-03-16 19:14:44 +01:00
stream_ftp.c
stream_live555.c
stream_mf.c
stream_nemesi.c
stream_netstream.c
stream_netstream.h
stream_null.c
stream_pvr.c stream_pvr: fix buffer overflow 2012-08-03 03:34:38 +02:00
stream_radio.c stream: remove V4L TV input and V4L radio support 2012-08-02 23:51:54 +02:00
stream_radio.h
stream_smb.c Merge branch 'mplayer1_changes' 2011-05-02 00:46:03 +03:00
stream_tv.c mplayer, stream_tv: move variable initialization 2012-08-03 04:51:55 +02:00
stream_udp.c
stream_vcd.c stream: add new stream control command STREAM_CTRL_GET_NUM_TITLES 2012-08-03 01:43:03 +02:00
stream_vstream.c stream_vstream: fix vstream_error format string 2012-04-01 17:35:01 +03:00
tcp.c
tcp.h
tv.c tv: reduce code duplication 2012-08-03 03:44:44 +02:00
tv.h Remove teletext support 2012-08-03 00:12:46 +02:00
tvi_bsdbt848.c
tvi_def.h
tvi_dshow.c Remove teletext support 2012-08-03 00:12:46 +02:00
tvi_dshow.h
tvi_dummy.c
tvi_v4l2.c Remove teletext support 2012-08-03 00:12:46 +02:00
udp.c
udp.h
url.c
url.h
vcd_read.h build: switch to libavutil bswap.h and intreadwrite.h 2012-02-01 22:46:27 +02:00
vcd_read_darwin.h cleanup: Make vcd_seek_to_track() static in more files 2011-06-29 09:26:00 +03:00
vcd_read_fbsd.h build: switch to libavutil bswap.h and intreadwrite.h 2012-02-01 22:46:27 +02:00
vcd_read_win32.h cleanup: Make vcd_seek_to_track() static in more files 2011-06-29 09:26:00 +03:00