file is group or world writeable. This is actually what the warning about root
was all about.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12590 0101bb08-14d6-0310-b084-bc0e0c8e3800
complete ChangeLog and add mkcl.sh that contains the options to generate
ChangeLog.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12587 0101bb08-14d6-0310-b084-bc0e0c8e3800
This makes it more likely that installed libogg and libvorbis are found, when
the user (or autoconf) specifies a different --prefix. Users who installed
their libraries in their homedir now have to set $OGG_PREFIX and $VORBIS_PREFIX,
or set their respective --with arguments.
Let the snapshot target use distcheck now that it works.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12570 0101bb08-14d6-0310-b084-bc0e0c8e3800
a flurry of simultaneous SIGHUP and SIGUSR1 signals. From what I can tell,
signal handling is now quite solid now. Achieve this by moving most of
streamFile() into a new sendStream() function, which is called within a new
do-while loop inside streamFile(). There, proper behavior is ensured and
a race condition resolved in favor of SIGHUP.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12564 0101bb08-14d6-0310-b084-bc0e0c8e3800
be used. This is required for Solaris and possibly others, where signal handlers
have to be reinstalled after having caught one signal via signal(). Also prevent
Ezstream from being killed by a handled signal in streamFile(), where they
can interrupt fread()'s system calls. This improves matters, but isn't perfect,
yet. A SIGHUP signal can still cause skipping to the next track, which should
be triggered only by SIGUSR1.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12563 0101bb08-14d6-0310-b084-bc0e0c8e3800
* Make Makefile.am files look alike as much as possible.
* Remove debug: target and don't mess with the users DEBUG environment
variable: Autoconf checks for -g and automatically adds it to CFLAGS, which
is overridden by the user's $DEBUG. If the user didn't specify one, "make
install" will strip the resulting binaries and leave the debugging symbols
intact otherwise.
* Remove profile: target, as it is quite pointless in Ezstream. Also, the user
can add profiling flags via the $DEBUG variable as well.
* Remove -ffast-math and -fsigned-char from gcc, and enable two additional
warnings instead.
* Unconfuse Solaris compiler flags (unfortunately, the configure script still
fails in the libshout check with some obscure linker error): Do not force
-x04 and -fast optimizations, let the user decide (it doesn't matter for
Ezstream anyways.) Remove -xgc92, which is deprecated and actually makes
the resulting binary run slower on SPARC. Also remove -fsimple, which does
not help and has the potential of causing trouble, and don't enable verbose
warnings just to disable them afterwards with -w. Leave only -v for verbose
warnings.
* Const'ify getFormat*() functions and blankString, and squelch a few const-
related warnings.
* Squelch a signedness warning and fix two ;; syntax errors.
* Add a snapshot target to Makefile.am that creates a tarball of the form
ezstream-snapshot-YYYYMMDD.tar.gz.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12562 0101bb08-14d6-0310-b084-bc0e0c8e3800
after which the merge is complete. Changes in openResource():
* Let the caller know whether we're streaming from standard input, and give
it a copy of the metadata information.
* Make filename extension matching case insensitive. Ezstream can now stream
foo.Ogg out of playlist.tXt. (On that note, another item from the
parseConfig() commit log message was missing: <format/> and <match/> are
also case insensitive now.)
Changes in streamFile():
* New feature: Skip currently playing track when receiving SIGUSR1.
* New feature: When using both the new -q and -v command line parameters,
Ezstream now displays some "real-time" information: playlist position,
elapsed time streaming the current track, and approximate bitrate in kbps.
* Fix the fread() loop by moving the "if read bytes > 0" condition into the
while statement, and check with ferror() afterwards whether an error occured.
* Remove redundant shout_delay() call. Ezstream puts itself to sleep with
shout_sync().
* Return a value that makes sense in main()'s do-while loop, instead of
whatever shout_send() returned last.
* Remove or prettify a few messages.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12557 0101bb08-14d6-0310-b084-bc0e0c8e3800
* Fix how the metadata string is generated. Don't include the " - " in the
output if either artist or title are missing from ID3v1/Vorbis tags.
* Print the correct error message when ov_open() fails.
* Improve filename-based generation of metadata. Use a copy of fileName for
basename(), which may modify its argument in some places where the old, weird
POSIX implementation is used. Also, basename() is not infallible, but when
it fails, it is annoying for us. Assert that it cannot fail since we feed
it with path names < PATH_MAX (handled in playlist.c and configfile.c.) In
short, make processMetadata() always return something more or less useful
as long as the file in question can be opened.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12554 0101bb08-14d6-0310-b084-bc0e0c8e3800
nitpickery to setMetadata(). Changes in replaceString():
* Fix a heap overflow. replaceString() would happily replace multiple '@T@'
and '@M@' placeholders and write into *dest until things blow up. Fix this
by using safe string functions. Then completely prevent it by ensuring that
it replaces only one placeholder per call (adjusting buildCommandString()
accordingly) and already complaining to the user in parseConfig() about
illegal, multiple placeholders in their command lines. (That parseConfig()
change was missing from the commit log earlier.)
In buildCommandString():
* Use xcalloc() instead of malloc() and get rid of the now redundant memset()
calls.
* Allow decoder command lines to contain the '@M@' metadata placeholder.
Useful for combined de-/encoders like ffmpeg2theora.
* Tweak message about "unsupported" format, which used to be false in the case
of Ogg Theora streams.
* Plug several memory leaks.
* Don't print the "Executing command 'foo'" message in this function.
git-svn-id: https://svn.xiph.org/trunk/ezstream@12553 0101bb08-14d6-0310-b084-bc0e0c8e3800
* 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
* 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
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
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
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
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