1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-09-15 04:08:07 -04:00
Commit Graph

645 Commits

Author SHA1 Message Date
moritz
710570627d Merge changes to main(), urlParse() and streamPlaylist(). In main():
* Install the signal handler as late as possible.
 * Add new command line options: -v (verbose, use twice for even more verbose
   output) and -q (quiet, redirect standard error output from external de-/
   encoders to /dev/null.)
 * It is now an error to supply more than one -c parameter. This prevents
   unexpected results.
 * Add a stern warning when ezstream is running as root. Just Don't Do It.
   Leaving the configfile writeable to others by accident could mean instant
   root compromise.
 * Before handing the config file over to libxml, try to open it ourselves
   first. The error message from strerror() is a lot more helpful than the
   cryption I/O error printed by libxml.
 * Don't preallocate memory for urlParse().
 * Fix command line error messages, they seem to be for a different program
   than Ezstream.
 * More terse libshout error messages, just print which function failed.
   I consider these errors of questionable value for an end user, but at least
   a knowledgeable one will know instantly what went wrong.
 * Case insensitive matching of playlist file extensions.
 * Print the address, port and mountpoint that Ezstream is actually trying to
   connect to, instead of what the user supplied. That should make it easier
   to spot reasons for connect failures (e.g. typos.)
Changes in urlParse():
 * Let urlParse() allocate memory for hostname and mountpoint, as it knows
   how much memory is actually required.
 * Fix a buffer overflow of the tmpPort buffer by adding checks and using safe
   string functions.
 * Let the caller print an error message, instead of having the same printf()
   twice in urlParse().
The streamPlaylist() function has been rewritten to use the new playlist_*()
routines. Apart from the added playlist shuffle feature no functional change.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12552 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-25 01:14:36 +00:00
moritz
b59da7de0c Add check for geteuid(), which is better than checking for WIN32.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12551 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-25 00:35:48 +00:00
moritz
5a233a4e03 Begin merging ezstream.c changes. This first batch includes:
* License reference and various #include cleanups and additions that are
   required later.
 * Add new usage() and usageHelp() functions (which already contain what's
   to come.) Move them close to main() where getopt() is called.
 * New signal handler, which now no longer uses printf(). printf() is not safe
   to use in signal handlers. Use volatile sig_atomic_t types instead of ints
   as flags to set in the handler.
 * Formatting and const'ifying of WIN32-basename() and strrcmp(). Rearrange
   them so that the actual "worker functions" are grouped together.
 * Add function prototypes for those that are already up-to-date.
 * Rename ReplaceString() to replaceString() for consistency with other
   function names in Ezstream.
 * Prepare for portable *__progname usage.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12550 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-25 00:25:07 +00:00
moritz
52e249f73f Merge new parseConfig() function. There were many changes, but those are too
cumbersome to merge separately. They are:
 * The usual formatting nitpickings.
 * Don't leak memory in case of duplicate entries. Instead make it an error
   and print a helpful error message, with config file line number, to the
   user.
 * Replace the manual cast to (const xmlChar *) with libxml2's BAD_CAST.
   There probably won't be any UTF8 support in Ezstream any time soon ...
 * Remove redundant strlen() check - xmlNodeListGetString() never returns
   an empty string if (cur->xmlChildrenNode != NULL).
 * Use xstrdup() instead of malloc() + memset() + strcpy().
 * Ensure that boolean configration options are always either 1 or 0.
 * Ensure that path names given via <filename /> do not exceed PATH_MAX.
 * Add <shuffle /> configuration option for playlist shuffling.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12549 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 23:26:16 +00:00
moritz
99e0d7b8bf Add function to free a configuration in case of an error.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12548 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 23:05:51 +00:00
moritz
2874fca043 Fix typo in comment.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12547 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 23:03:51 +00:00
moritz
9d2434c46c Replace three if-conditionals with one, both in getFormatEncoder() and
getFormatDecoder(), with prettier formatting.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12546 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 22:56:18 +00:00
moritz
94ed7d1672 Const'ify configfile functions.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12545 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 22:50:14 +00:00
moritz
d912dfe302 Add license reference to configfile.c, sync #includes with what will be required
later, getEZConfig() formatting and remove unused printConfig() function.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12544 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 22:25:28 +00:00
moritz
4cd0959aa8 Begin merging configfile.* changes by cleaning up the .h file: Add license
reference, remove prototype of nonexistent getMetadataGrabber() function, and
do some formatting.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12543 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 22:16:39 +00:00
moritz
68acca112f Clean core and backup files in this directory as well. Only ~2500 lines of
diffs left to merge.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12542 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 22:03:36 +00:00
moritz
5d3fc1ddda Commit header with three macros that help with signal handling. Will be actually
used later. Now, all new files are in.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12541 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 22:01:35 +00:00
moritz
1fca228230 Let the configure script set a (hard-coded, for now) examples installation
directory. This will be made configurable later.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12540 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:59:07 +00:00
moritz
e74272332e Add several checks that we need now, i.e. very soon.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12539 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:50:54 +00:00
moritz
e811f2578b AM_CONFIG_HEADER -> AC_CONFIG_HEADERS, and move config.h into src/.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12538 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:46:05 +00:00
moritz
d196074741 Autoconf 2.61 has a nice macro AC_USE_SYSTEM_EXTENSIONS. Use it, depend on
autoconf-2.61 for it and remove the annoying _GNU_SOURCE and _XOPEN_SOURCE ...
dung. Autoconf takes care of this, and even checks for more useful stuff for
us.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12537 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:44:35 +00:00
moritz
aab6c56ae2 Generate a Makefile in doc/, and switch to AC_CONFIG_FILES.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12536 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:37:06 +00:00
moritz
c7a3eda868 Ezstream does not need libtool, so remove it. Remove other redundant configure
checks as well: AC_PROG_CC and AC_HEADER_STDC are automatically checked in
packages written in C, no need to do it twice. This shaves a lot off configure
runtime.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12535 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:34:05 +00:00
moritz
dbf12f4c16 Start to incrementally merge configure.in changes by simply shuffling code
around a bit. No functional change, yet.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12534 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:29:27 +00:00
moritz
a4bac0230f Hook up doc/ with the build, depend on automake 1.9 and remove dist-zip for now.
The latter will come back after testing on Windows has been done.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12533 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:19:20 +00:00
moritz
7671474055 Replace the autogen behemoth with something much simpler. AC_PREREQ and
AUTOMAKE_OPTIONS already take care of version checks.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12532 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:16:26 +00:00
moritz
e89737c651 Clean up and install example configuration files.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12531 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:12:54 +00:00
moritz
4b5c770f29 Commit rewritten README file.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12530 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 21:11:49 +00:00
moritz
25494f8fdb Remove AUTHORS. Credits are in the man page.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12529 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 20:59:16 +00:00
moritz
db113a36db Add INSTALL file for those not familiar with the configure+make dance. From
autoconf-2.61.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12528 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 20:58:18 +00:00
moritz
d21d0873f8 Add files with safe strlc*() string functions, and hook all new files into
Makefile.am. Also let "make clean" clean up coredumps and editor backup files.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12527 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 20:57:02 +00:00
moritz
1c22223dcb Add ezstream man page.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12526 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 20:52:57 +00:00
moritz
2b0c3e6149 Add new playlist handling functions.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12525 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 20:50:33 +00:00
moritz
5d932e4191 Add new utility functions, for memory management. These do The Right Thing and
never return NULL.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12524 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 20:49:25 +00:00
moritz
a90b52665d Begin to incrementally merge my changes to Ezstream by bumping the version
number and shifting blame to me. This should keep most of the history in my
local CVS repository. There may be temporary breakages where it doesn't build
or package until I'm done.


git-svn-id: https://svn.xiph.org/trunk/ezstream@12521 0101bb08-14d6-0310-b084-bc0e0c8e3800
2007-02-24 18:55:55 +00:00
oddsock
f42b4a4f35 forgot to add the inno setup installer to the dist
git-svn-id: https://svn.xiph.org/trunk/ezstream@10593 0101bb08-14d6-0310-b084-bc0e0c8e3800
2005-12-14 21:40:12 +00:00
oddsock
2562d62146 version bump
git-svn-id: https://svn.xiph.org/trunk/ezstream@10592 0101bb08-14d6-0310-b084-bc0e0c8e3800
2005-12-14 21:16:51 +00:00
oddsock
0c42daccb5 added changelog
git-svn-id: https://svn.xiph.org/trunk/ezstream@10590 0101bb08-14d6-0310-b084-bc0e0c8e3800
2005-12-14 21:14:41 +00:00
oddsock
480000c33a added some reconnect logic
fixed a buffer overflow on large id3tags
use pclose for popen'd file handles


git-svn-id: https://svn.xiph.org/trunk/ezstream@10589 0101bb08-14d6-0310-b084-bc0e0c8e3800
2005-12-14 21:13:25 +00:00
oddsock
e48b3b61aa cleanup of config files
fixed reencoding bug on win32
bump to version 0.2.0

git-svn-id: https://svn.xiph.org/trunk/ezstream@8612 0101bb08-14d6-0310-b084-bc0e0c8e3800
2005-01-05 00:38:09 +00:00
oddsock
d23ebe69e8 add passthorough support for unknown types
git-svn-id: https://svn.xiph.org/trunk/ezstream@8519 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-12-22 01:49:56 +00:00
oddsock
07688873e2 some win32 compilation fixes
git-svn-id: https://svn.xiph.org/trunk/ezstream@7171 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-07-19 03:48:12 +00:00
oddsock
0968f1773c Added reencoding capabilities to ezstream.
git-svn-id: https://svn.xiph.org/trunk/ezstream@7170 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-07-19 03:12:31 +00:00
oddsock
ef2bdf0ba2 git-svn-id: https://svn.xiph.org/trunk/ezstream@7152 0101bb08-14d6-0310-b084-bc0e0c8e3800 2004-07-16 04:02:28 +00:00
oddsock
7dcb27fcf4 support for theora streams
git-svn-id: https://svn.xiph.org/trunk/ezstream@7103 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-07-12 19:13:14 +00:00
oddsock
b85a6a2ca3 added ability to send a signal (SIGHUP) which will re-read the current playlist (m3u) that is being processed. When this happens, ezstream will pick up from the last track that was played.
git-svn-id: https://svn.xiph.org/trunk/ezstream@6563 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-04-21 13:48:22 +00:00
oddsock
214c97a30b stdin now working :)
git-svn-id: https://svn.xiph.org/trunk/ezstream@5806 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-02-02 04:56:34 +00:00
oddsock
d9d28a752a * version bump
* remove unneeded file


git-svn-id: https://svn.xiph.org/trunk/ezstream@5805 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-02-02 04:39:24 +00:00
oddsock
4315ddd571 * set read mode to binary for stdin on win32
* add libXML to project file
* bump version number


git-svn-id: https://svn.xiph.org/trunk/ezstream@5804 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-02-02 04:37:42 +00:00
oddsock
35f54caeba Initial revision
git-svn-id: https://svn.xiph.org/trunk/ezstream@5800 0101bb08-14d6-0310-b084-bc0e0c8e3800
2004-01-30 17:19:45 +00:00