Everything ties together in stream configurations, of which there can be many
now.
For the time being, every stream configuration but the "default" is ignored.
Every stream/server/encoder/decoder configuration now has the name "default"
by default, so that configuring names is only needed to resolve ambiguities.
Decoder configurations are now also constrained in this manner for consistency,
meaning they are no longer uniquely identified by a number of file extensions
but also a name.
* Do not shell-quote strings in the metadata token expansion function
* This fixes https://github.com/xiph/ezstream/issues/6
* Expand all tokens at the same time in a way that ensures metadata
is not additional input to expansion
* Simplify several functions and remove unused functionality
* Move -m and -n command line options into the config file
* Restructure configuration file:
- Group into "server", "stream", "media", "metadata", "decoders", and
"encoders"
- Untangle decoder and encoder:
o Decoders match on file extensions and convert to a canonical "internal"
format
o Encoders create one of the supported stream formats, potentially using
different parameters (like bitrate)
- Consistently specify stream format
- Enable reencoding by selecting an encoder
* Architecturally separate configuration file storage from parsing
- Allows for different configuration back-ends in the future, like
YAML, SQL, REST API, ...
* Support roll-back in case of error on (re)load
* Anticipate HTTPS support
The libxalloc was reincarnated long ago in a separate utility library.
It did a good job help make ezstream have robust memory management years ago,
but now it's time to move on and get back to basics.
The replacement introduces reallocarray(), which is an overflow-checking
alternative to both malloc (NULL ptr) and realloc().