1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-06-02 06:01:10 +00:00
Commit Graph

146 Commits

Author SHA1 Message Date
Moritz Grimm
06e49d2313 Make relative path lookups configurable
Retain current behavior by default, where files are found based on
the current working directory.
2022-10-09 02:13:52 +02:00
Moritz Grimm
d59108b825 Look for non-absolute filenames relative to the playlist 2022-09-11 02:27:41 +02:00
Moritz Grimm
057ef6a218 Clean up stream before exiting
Gentle reminder by AddressSanitizer.
2021-02-09 01:15:21 +01:00
Moritz Grimm
f1efd079d4 Fix a crash when querying metadata program
Simple copy+paste mistake.
2020-09-02 22:20:51 +02:00
Moritz Grimm
5132687076 Fix mdata_t leak on error
Found by Coverity
2020-02-22 23:22:06 +01:00
Moritz Grimm
3d83b1ba66 pCommandString can be NULL; propagate result 2020-02-12 00:29:20 +01:00
Moritz Grimm
a59d29ee78 Try to find encoder instead of creating one on the fly
Fixes a segfault when there is a typo in the <encoder /> setting.
2020-02-12 00:08:38 +01:00
Moritz Grimm
75a9a410aa Style improvements 2018-01-23 11:10:04 +01:00
Moritz Grimm
5287bbdd4b Support pass-through encoder (again) 2018-01-23 00:44:04 +01:00
Moritz Grimm
86bd51b39a Decouple cfg from log 2018-01-19 12:32:30 +01:00
Moritz Grimm
d0cf1d8bbd Increase getTimeString static buffer 2018-01-18 11:42:37 +01:00
Moritz Grimm
0b260b3c08 Make media inputs ("intakes") a list of things, too 2017-11-23 18:34:57 +01:00
Moritz Grimm
ed9e84f387 Change config format to (eventually) support concurrent streams to many servers
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.
2017-11-18 01:54:14 +01:00
Moritz Grimm
cb997e549c Fix multiple issues in util_shellquote 2017-09-25 17:09:38 +02:00
Moritz Grimm
2cdda45c16 Unconditionally close allocated stderr FDs 2017-09-20 14:42:19 +02:00
Moritz Grimm
ae85c26cae Fix weird program logic by removing getMetadata() 2017-09-20 13:23:32 +02:00
Moritz Grimm
85abb3958c Revert bogus change that introduced a memory leak 2017-09-20 12:55:16 +02:00
Moritz Grimm
6616831590 Switch to a new (unit-tested) metadata handling API 2017-09-20 12:40:33 +02:00
Moritz Grimm
89b4260c83 Ensure that dup() succeeds (CID 172001) 2017-09-20 11:26:35 +02:00
Moritz Grimm
fef9b4625e Fix memory leak (CID 171996) 2017-09-15 20:21:45 +02:00
Moritz Grimm
8ea0197235 Fix memory leak (CID 172413) 2017-09-15 20:13:05 +02:00
Moritz Grimm
77f794a41e Rework quoting around metadata
* 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
2017-09-15 19:30:52 +02:00
Moritz Grimm
c21d47b8a9 Squelch conversion warnings around tolower() 2017-09-15 19:24:40 +02:00
Moritz Grimm
7729fa9773 Make configuration handling around streaming from stdin more robust 2017-09-15 19:23:16 +02:00
Moritz Grimm
59099c6ddf Update util function naming scheme 2017-09-13 23:35:30 +02:00
Moritz Grimm
43e26549f9 Add support for writing PID files 2017-07-10 11:39:00 +02:00
Moritz Grimm
f5998edcfd Remove dead ID3Tag structures 2017-07-07 16:44:58 +02:00
Moritz Grimm
cfbbc94751 Assume the availability of POSIX signals 2017-07-07 16:44:58 +02:00
redswitchio
582c0b67ad Fixed the copypasta mistake of using the PLACEHOLDER_ARTIST value in the PLACEHOLDER_ALBUM conditional. 2017-07-05 05:09:26 -04:00
redswitchio
cd98caa5fb Added additional code needed to support the album field when constructing the metadata string. 2017-07-04 21:34:58 -04:00
Moritz Grimm
cce2455bc6 Rename config file (re)load function for clarity 2016-10-14 16:19:39 +02:00
Moritz Grimm
b1aecc835a Put "get_metadata_str()" where it belongs 2016-05-19 14:37:21 +02:00
Moritz Grimm
3135c9e517 ezstream.c/libshout untangle 2/2 2016-05-19 14:19:31 +02:00
Moritz Grimm
4d787b10a3 Streamline set_metadata() behavior on error/success 2016-05-19 14:12:34 +02:00
Moritz Grimm
3ba4b06478 Move urlParse() to util.c 2016-05-19 14:06:31 +02:00
Moritz Grimm
a9728c54be ezstream.c/libshout untangle 1/2 2016-03-24 18:16:00 +01:00
Moritz Grimm
4b087df3ab Add plumbing for future encapsulation of libshout usage 2015-06-15 08:04:57 +02:00
Moritz Grimm
77fe651bff Move config plausibility check to CFG and test it 2015-06-11 23:50:31 +02:00
Moritz Grimm
f367140d82 Rework stream_setup() 2015-06-02 23:45:55 +02:00
Moritz Grimm
715be8094b Switch to clock_gettime(CLOCK_MONOTONIC) 2015-05-28 00:10:52 +02:00
Moritz Grimm
aab0afaa82 Fix media type handing wrt playlists
This was a regression introduced by the cfg refactor
2015-05-27 00:27:08 +02:00
Moritz Grimm
bf4150dcce Make playlist_t a truly opaque type
... and don't initialize global values twice while here
2015-05-26 23:40:48 +02:00
Moritz Grimm
c304dfe48a Support passthrough "encoders" again 2015-05-22 00:20:54 +02:00
Moritz Grimm
4cffc5102d Initialize cfg for refresh_interval 2015-05-14 23:28:08 +02:00
Moritz Grimm
b62d4b4317 Fix regression in handling of refresh_interval 2015-05-14 23:23:48 +02:00
Moritz Grimm
bd04a66c79 Add -r command line option: explicitly enable real-time status line 2015-05-12 17:35:04 +02:00
Moritz Grimm
33eb55ae34 Relocate config file check
* Stop supporting systems without stat(2) while here
* Remove some additional configure checks for ubiquitous functions (>=C99)
2015-05-06 17:00:23 +00:00
Moritz Grimm
43e48648fa Refactor configuration (work in progress)
* 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
2015-05-06 00:38:00 +02:00
Moritz Grimm
ab268e9616 Strip xalloc to something much simpler
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().
2015-04-22 23:38:19 +02:00
Moritz Grimm
c6747ef998 Prefer SIGSEGV over SIGABRT in case of explicit internal API abuse
While here, declare some module-internal functions static.
2015-04-22 19:50:00 +02:00