0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/demux
wm4 26f4f18c06 options: change option macros and all option declarations
Change all OPT_* macros such that they don't define the entire m_option
initializer, and instead expand only to a part of it, which sets certain
fields. This requires changing almost every option declaration, because
they all use these macros. A declaration now always starts with

   {"name", ...

followed by designated initializers only (possibly wrapped in macros).
The OPT_* macros now initialize the .offset and .type fields only,
sometimes also .priv and others.

I think this change makes the option macros less tricky. The old code
had to stuff everything into macro arguments (and attempted to allow
setting arbitrary fields by letting the user pass designated
initializers in the vararg parts). Some of this was made messy due to
C99 and C11 not allowing 0-sized varargs with ',' removal. It's also
possible that this change is pointless, other than cosmetic preferences.

Not too happy about some things. For example, the OPT_CHOICE()
indentation I applied looks a bit ugly.

Much of this change was done with regex search&replace, but some places
required manual editing. In particular, code in "obscure" areas (which I
didn't include in compilation) might be broken now.

In wayland_common.c the author of some option declarations confused the
flags parameter with the default value (though the default value was
also properly set below). I fixed this with this change.
2020-03-18 19:52:01 +01:00
..
cache.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
cache.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
codec_tags.c Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
codec_tags.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
cue.c cue: tolerate NBSP as whitespace 2020-02-03 19:13:44 +01:00
cue.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
demux_cue.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_disc.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
demux_edl.c ytdl_hook, edl: add fps, samplerate codec parameters 2020-02-21 14:48:23 +01:00
demux_lavf.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_libarchive.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_mf.c demux_mf: use stream API to open list files 2019-12-23 11:01:29 +01:00
demux_mkv_timeline.c playlist: change from linked list to an array 2019-12-28 21:32:15 +01:00
demux_mkv.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_null.c demux_null: mark as seekable 2018-01-06 14:42:22 -08:00
demux_playlist.c playlist: change from linked list to an array 2019-12-28 21:32:15 +01:00
demux_raw.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux_timeline.c demux_timeline: fix bad EOF reporting 2020-02-28 00:08:36 +01:00
demux.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
demux.h demux: add a way to block reading after seeks 2020-02-29 21:49:00 +01:00
ebml.c demux_mkv, stream: attempt to improve behavior in unseekable streams 2019-11-14 12:59:14 +01:00
ebml.h demux_mkv: rewrite packet reading to avoid 1 memcpy() 2017-11-05 18:13:34 +01:00
matroska.h ebml, matroska.h: change license to LGPL 2017-04-21 13:34:10 +02:00
packet.c Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
packet.h demux: add a on-disk cache 2019-09-19 20:37:05 +02:00
stheader.h video, demux: rip out unused spherical metadata code 2019-10-17 22:49:26 +02:00
timeline.c stream, demux: redo origin policy thing 2019-12-20 13:00:39 +01:00
timeline.h edl: make it possible to delay-load files with multiple tracks 2020-02-21 00:19:17 +01:00