1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-12-04 14:46:31 -05:00
Commit Graph

276 Commits

Author SHA1 Message Date
Moritz Grimm
71e5820df1 Make cmdline_parse() restartable 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
cec131e83a Fix misleading function name 2016-10-14 16:23:32 +02:00
Moritz Grimm
cce2455bc6 Rename config file (re)load function for clarity 2016-10-14 16:19:39 +02:00
Moritz Grimm
2124bf7486 Merge branch 'develop' of ssh://git.xiph.org/ezstream into develop 2016-05-19 14:59:23 +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
79ab90ef34 Fix typo in log message 2016-05-03 15:42:15 +02:00
Moritz Grimm
0f6de67977 Depend on TagLib unconditionally
- Removes effectively untested code paths
- Removes libvorbisfile dependency
2016-04-22 15:56:30 +02:00
Moritz Grimm
9eff442169 Squelch conversion warnings with explicit casts 2016-04-22 15:44:01 +02:00
Moritz Grimm
9738668129 Fix SET_INTNUM copypasta type error 2016-04-22 15:43:20 +02:00
Moritz Grimm
7491b868c5 Add explicit casts to squelch pointer signedness warnings 2016-04-22 15:31:20 +02:00
Moritz Grimm
a9728c54be ezstream.c/libshout untangle 1/2 2016-03-24 18:16:00 +01:00
Moritz Grimm
1fe0ab595c Improve fgets() error handling 2016-03-24 17:50:31 +01:00
Moritz Grimm
f05462c7ea Merge remote-tracking branch 'origin/feature/stream_refactor' into feature/https_support 2016-03-07 11:12:22 +01:00
Moritz Grimm
a337c74ea4 Update TLS configuration to match libshout requirements 2016-03-04 18:20:17 +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
744511ffe2 Expose "configuration stashing" API 2015-06-09 23:02:45 +02:00
Moritz Grimm
f367140d82 Rework stream_setup() 2015-06-02 23:45:55 +02:00
Moritz Grimm
b0eda7b48c Add cfg_get_stream_format_str() 2015-06-02 23:45:10 +02:00
Moritz Grimm
fb7d3b4e38 Check args prior to allocating resources 2015-06-01 14:57:20 +02:00
Moritz Grimm
8d9f475e38 Simplify playlist_program() 2015-05-30 21:48:46 +02:00
Moritz Grimm
cf141edd52 Fix crash in error path 2015-05-28 16:12:38 +02:00
Moritz Grimm
8b42aff63d Fix metadata.c includes (esp. for stat()) 2015-05-28 14:09:13 +02:00
Moritz Grimm
d929bd65a7 Fix whitespace 2015-05-28 14:02:17 +02:00
Moritz Grimm
2b004da593 Relax "group writeable!" error for compatibility w/ recent Linux 2015-05-28 08:38:51 +02:00
Moritz Grimm
6422607b1f Expect stat() availability 2015-05-28 08:37:49 +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
74dce6af5b Remove unneeded functionality 2015-05-27 00:26:59 +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
7a4c7291da Fix log level 2015-05-26 14:22:56 +02:00
Moritz Grimm
b4fe40532a Simplify log_syserr() (no need to be thread-safe)
Using strerror_r() w/ proper error checking is impossible, if the
system uses GNUisms (and losing _GNU_SOURCE's extensions is equally
painful)

Also, this change probably fixes a "abort() instead of error" bug.
2015-05-24 11:26:04 +02:00
Moritz Grimm
4c6a879303 Make log testable: return true value when something was logged 2015-05-24 09:05:40 +02:00
Moritz Grimm
b920aadd70 Error string argument is no longer used 2015-05-22 22:34:48 +02:00
Moritz Grimm
c304dfe48a Support passthrough "encoders" again 2015-05-22 00:20:54 +02:00
Moritz Grimm
b8ea620f7a Default to port 8000 2015-05-22 00:19:57 +02:00
Moritz Grimm
34bdab6a36 Fix cfg_get_metadata_program() and add tests when NULL is expected from getters 2015-05-21 23:25:05 +02:00
Moritz Grimm
dcb5303b4b Consistently set errstrp 2015-05-21 01:24:09 +02:00
Moritz Grimm
d1ae8fa17d Properly traverse list 2015-05-21 01:23:47 +02:00
Moritz Grimm
8eef9842b1 cfg_init() returns int 2015-05-18 23:49:52 +02:00
Moritz Grimm
02b42c8446 Plug memory leak 2015-05-18 23:36:43 +02:00
Moritz Grimm
876660fc17 Test and fix cfg_*_get() 2015-05-16 00:39:36 +02:00
Moritz Grimm
1d02b841f0 Update ezstream-file(1) for new command line arguments 2015-05-15 22:47:19 +02:00
Moritz Grimm
0d66baf9f7 Merge branch 'feature/unit_tests' into feature/config_refactor 2015-05-14 23:37:22 +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
1115ab16db Return NULL in case of unset program_config_file 2015-05-12 17:33:08 +02:00
Moritz Grimm
36511d9408 Add script to generate coverage reports using lcov. 2015-05-12 12:06:49 +02:00
Moritz Grimm
9c842281fa Make LIBOBJS available to libtool libs 2015-05-12 11:32:21 +02:00
Moritz Grimm
8355fde68a Merge branch 'feature/config_refactor' into feature/unit_tests 2015-05-11 23:48:50 +02:00
Moritz Grimm
f7bc34e8f2 Use a macro to set UINT values 2015-05-11 23:48:07 +02:00
Moritz Grimm
9f975551ee Merge branch 'feature/config_refactor' into feature/unit_tests 2015-05-11 22:47:27 +02:00
Moritz Grimm
d2468432db Make behaviour of setters consistent 2015-05-11 22:45:22 +02:00
Moritz Grimm
f6ec4e1aeb Add check unit testing framework w/ 2 dummy tests 2015-05-06 23:45:52 +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
05c7e32997 Fix command line parsing regression 2015-05-06 16:59:05 +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
ffa2a01c96 Add missing change to xreallocarray() in previous 2015-04-23 00:02:51 +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
Moritz Grimm
41058dac79 Use log API for all regular output messages
This makes ezstream log via syslog and stderr. The "real-time status
line" remains unaffected.
While here, make the output more concise and consistent.
2015-04-22 19:29:20 +02:00
Moritz Grimm
19af508eae Add a simple logging API
Uses syslog
2015-04-16 19:30:41 +02:00
Moritz Grimm
85c90a3c80 Add support for compiler attributes 2015-04-16 19:30:36 +02:00
Moritz Grimm
9bc65bf717 Factor out command line parsing 2015-04-16 19:30:08 +02:00
Moritz Grimm
4062cc190a Streamline -s option by always requiring an option argument 2015-04-16 19:25:40 +02:00
Moritz Grimm
e3b3ed4cf9 Remove active support for Windows and certain legacy UNIX systems 2015-04-15 23:16:12 +02:00
Moritz Grimm
dd1ab911c9 Two more indent fixes. 2015-04-15 13:20:32 +02:00
Moritz Grimm
26dd4d2a8e Indent closer to my favorite style(9)
Why yes, it /is/ KNF!
2015-04-13 23:28:21 +02:00
Moritz Grimm
400ef3c9cc Remove comments mentioning the FSF postal address
I do not plan to ever keep that up to date in case they move again.
If you need a copy of the GPL, use the Internet or read COPYING.
2015-03-24 22:42:06 +01:00
Moritz Grimm
c243ed5971 Fix cast 2015-02-27 23:02:55 +01:00
Moritz Grimm
739a08b5b9 Untangle compatibility code
* update to latest strlc*(3) and strtonum(3) functions
* isolate local_basename()
2015-02-27 22:42:51 +01:00
Moritz Grimm
00017d2165 Unconditionally include compat 2015-02-27 15:17:24 +01:00
Moritz Grimm
291ed50044 Drop RCS ID tag 2015-02-23 13:51:55 +01:00
Moritz Grimm
8819f0f9f9 Require automake 1.10 everywhere 2015-02-23 13:51:47 +01:00
Moritz Grimm
a7f3ae476d Always include time.h. 2015-01-17 23:50:11 +01:00
Moritz Grimm
7790164cc3 Consolidate INCLUDES into AM_CPPFLAGS 2015-01-17 23:34:32 +01:00
Moritz Grimm
dd4c241fef Update copyright and/or author email 2015-01-17 22:34:34 +01:00
Moritz Grimm
6211bc8506 Fix a shell command injection vulnerability in metadata
This has been reported by Alexandre Rebert in February 2013(!).
The time to fix is terrible; luckily, the affected user base is likely to be
very small.
2015-01-07 22:49:09 +01:00
Moritz Grimm
29ae1b351b Remove unneccessary assignment 2015-01-04 23:43:25 +01:00
Moritz Grimm
10f739f6f3 Add option -m to disable active metadata updates
Requested by cmodyssey via ticket #1620:
"Allow ezstream to stop it sending metadata information by configuration"
2015-01-03 23:19:28 +01:00
Moritz Grimm
f04c395106 Do not close stdin on EOS
From gquintard via ticket #2045:
"Not sending data to stdin can throw ezstream into an infinite loop"
2015-01-03 00:08:12 +01:00
moritz
549af56184 Add new <metadata_refreshinterval/> feature
Add new <metadata_refreshinterval/> feature and configuration option. Based on
a patch by Matthew Adams (thanks!), with minor changes and documentation
additions by me.

(cherry picked from commit 4176545211)
2015-01-01 23:41:31 +01:00
moritz
000320afa5 Teach ezstream a different mode of operation, as a one-shot line shuffling tool.
git-svn-id: https://svn.xiph.org/trunk/ezstream@16537 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-30 21:55:24 +00:00
moritz
c59c0c9847 Support reading playlists from standard input.
git-svn-id: https://svn.xiph.org/trunk/ezstream@16536 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-30 21:46:15 +00:00
moritz
c7f262ddf8 Move the verbose error check where it belongs.
git-svn-id: https://svn.xiph.org/trunk/ezstream@16534 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-30 19:41:59 +00:00
moritz
5121dd35de Do not quote $EZSTREAM, which breaks paths with whitespace but allows to
smuggle in default command line arguments.


git-svn-id: https://svn.xiph.org/trunk/ezstream@16531 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-30 18:23:12 +00:00
moritz
d3151cd65a Add new wrapper/convenience script ezstream-file.sh -- generates ezstreams on-
the-fly.


git-svn-id: https://svn.xiph.org/trunk/ezstream@16529 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-30 12:49:06 +00:00
moritz
f8c39fa992 Remove pointless and (at this point) irritating warning message.
git-svn-id: https://svn.xiph.org/trunk/ezstream@16528 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-29 09:37:39 +00:00
moritz
995c5d2b77 The original reason to abort ezstream when running into problems opening a media
file was to prevent a very verbose infinite loop (e.g. when accidentially
playing an outdated playlist.) Bring that back by aborting after 100 subsequent
errors.


git-svn-id: https://svn.xiph.org/trunk/ezstream@16527 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-29 09:36:18 +00:00
moritz
322b88412f ... also fix ezstream in this regard: No need to complain when receiving such
an empty line, and not receiving any output should not be a fatal error.
Consider the latter to be "end-of-playlist", too.


git-svn-id: https://svn.xiph.org/trunk/ezstream@16526 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-29 09:14:12 +00:00
moritz
cae7e0029a #1585: Continue when openResource() fails.
git-svn-id: https://svn.xiph.org/trunk/ezstream@16497 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-08-22 10:03:45 +00:00
moritz
c6a686560e Akos Veres suggested that ezstream should be able to set the login username,
and I concur.


git-svn-id: https://svn.xiph.org/trunk/ezstream@16319 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-07-22 20:19:38 +00:00
moritz
1951ddd827 Actually, we agreed on GPLv2 only ...
git-svn-id: https://svn.xiph.org/trunk/ezstream@16150 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-06-21 14:35:27 +00:00
moritz
5a0bfa143b Finish up the modifications to the Windows build. In case anything remains to be done, it'll be nits.
git-svn-id: https://svn.xiph.org/trunk/ezstream@15798 0101bb08-14d6-0310-b084-bc0e0c8e3800
2009-03-18 20:24:35 +00:00