Permalink
Browse files

Presenting edcast2_jack special edition brought to you buy rawdod ind…

…ustrial software and krad radio broadcasting corporation
  • Loading branch information...
0 parents commit 4368b06f7cd8c44006201de7731a1bef76d8af12 @oneman committed Dec 1, 2010
Showing with 5,630 additions and 0 deletions.
  1. +17 −0 Makefile.am
  2. +12 −0 README
  3. +64 −0 autogen.sh
  4. +46 −0 conf/sample.cfg
  5. +212 −0 configure.in
  6. +539 −0 edcast.cpp
  7. +2 −0 edcast.h
  8. +17 −0 libedcast/Makefile.am
  9. +212 −0 libedcast/Socket.cpp
  10. +198 −0 libedcast/cbuffer.c
  11. +38 −0 libedcast/cbuffer.h
  12. +3,384 −0 libedcast/libedcast.cpp
  13. +466 −0 libedcast/libedcast.h
  14. +70 −0 libedcast/libedcast_socket.h
  15. +107 −0 m4/lame.m4
  16. +97 −0 m4/mad.m4
  17. +62 −0 m4/ogg.m4
  18. +87 −0 m4/vorbis.m4
@@ -0,0 +1,17 @@
+## Process this file with automake to produce Makefile.in
+
+AUTOMAKE_OPTIONS = foreign dist-zip
+
+SUBDIRS = libedcast
+
+bin_PROGRAMS = edcast2_jack
+
+edcast2_jack_SOURCES = edcast.cpp
+
+edcast2_jack_LDADD = libedcast/libedcast.a
+
+EXTRA_DIST = conf
+
+LIBS = @LIBS@ @OGG_LIBS@ @VORBIS_LIBS@ @MAD_LIBS@ @LAME_LIBS@ @VORBISENC_LIBS@ @VORBISFILE_LIBS@ @FAAC_LIBS@ @LIBFLAC_LIBS@ @JACK_LIBS@
+CFLAGS = -g @CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @MAD_CFLAGS@ @LAME_CFLAGS@ @FAAC_CFLAGS@ @LIBFLAC_CFLAGS@
+
12 README
@@ -0,0 +1,12 @@
+edcast_jack special edition!
+
+
+features removed: windows support, resampling support, metadata support
+
+features added: 24 bit flac support
+
+features to come: correct flushing of ogg packets to prevent buildup of silence in pages
+
+minor changes: correct printing of server port number, removal of depricated jack call
+
+
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Run this to set up the build system: configure, makefiles, etc.
+# (based on the version in enlightenment's cvs)
+
+package="edcast"
+
+
+olddir=`pwd`
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+cd "$srcdir"
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have autoconf installed to compile $package."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have automake installed to compile $package."
+ echo "Download the appropriate package for your system,"
+ echo "or get the source from one of the GNU ftp sites"
+ echo "listed in http://www.gnu.org/order/ftp.html"
+ DIE=1
+}
+
+(libtool --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have libtool installed to compile $package."
+ echo "Download the appropriate package for your system,"
+ echo "or get the source from one of the GNU ftp sites"
+ echo "listed in http://www.gnu.org/order/ftp.html"
+ DIE=1
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+if test -z "$*"; then
+ echo "I am going to run ./configure with no arguments - if you wish "
+ echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+echo "Generating configuration files for $package, please wait...."
+
+echo " aclocal $ACLOCAL_FLAGS"
+aclocal -I m4 $ACLOCAL_FLAGS
+#echo " autoheader"
+#autoheader
+echo " libtoolize --automake"
+libtoolize --automake
+echo " automake --add-missing"
+automake --add-missing
+echo " autoconf"
+autoconf
+
+cd $olddir
+$srcdir/configure "$@" && echo
@@ -0,0 +1,46 @@
+# Destination server details (to where you are encoding). Valid server types : Shoutcast, Icecast, Icecast2
+ServerType=Icecast2
+Server=192.168.1.100
+Port=8000
+ServerPassword=hackme
+ServerMountpoint=/stream
+# YP (Stream Directory) Settings
+ServerPublic=1
+ServerIRC=
+ServerAIM=
+ServerICQ=
+ServerStreamURL=http://www.google.com
+ServerName=I need a server name
+ServerDescription=I neglected to set my server description
+ServerGenre=Dubstep
+AutomaticReconnectSecs=10
+AutoConnect=0
+# Output codec selection (Valid selections : MP3, OggVorbis, Ogg FLAC, AAC, AAC Plus)
+Encode=MP3
+# General settings (non-codec related). Note : NumberChannels = 1 for MONO, 2 for STEREO
+BitrateNominal=48
+BitrateMin=256
+BitrateMax=256
+NumberChannels=1
+Samplerate=44100
+# Ogg Vorbis specific settings. Note: Valid settings for BitrateQuality flag are (Quality, Bitrate Management)
+OggQuality=5
+OggBitrateQualityFlag=Quality
+# LAME specific settings. Note: Setting the low/highpass freq to 0 will disable them.
+LameCBRFlag=1
+LameQuality=1
+LameCopywrite=0
+LameOriginal=0
+LameStrictISO=0
+LameDisableReservior=0
+LameVBRMode=vbr_abr
+LameLowpassfreq=0
+LameHighpassfreq=0
+LAMEPreset=0
+# AAC (FAAC) specific settings.
+AACQuality=100
+AACCutoff=
+# Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_WARNING, 3 = LOG_ERROR+LOG_WARNING+LOG_DEBUG
+LogLevel=3
+# Log File
+LogFile=streamTranscoder_1
@@ -0,0 +1,212 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(edcast-jack, 3.1.7)
+AC_CONFIG_SRCDIR(edcast.cpp)
+
+AM_INIT_AUTOMAKE
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_CANONICAL_HOST
+AM_PROG_LIBTOOL
+
+dnl Set some options based on environment
+
+SOCKET_LIBS=
+
+if test -z "$GCC"; then
+ case $host in
+ *-*-irix*)
+ DEBUG="-g -signed -D_REENTRANT"
+ CFLAGS="-O2 -w -signed -D_REENTRANT "
+ CXXFLAGS="-O2 -w -signed -D_REENTRANT "
+ PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
+ ;;
+ *-*-solaris*)
+ DEBUG="-v -g -D_REENTRANT"
+ CFLAGS="-xO4 -fast -w -fsimple -native -xcg92 -D_REENTRANT "
+ CXXFLAGS="-xO4 -fast -w -fsimple -native -xcg92 -D_REENTRANT "
+ PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc -D_REENTRANT"
+ SOCKET_LIBS="-lnsl -lsocket -lresolv"
+ ;;
+ *)
+ DEBUG="-g -D_REENTRANT"
+ CFLAGS="-O -D_REENTRANT "
+ CXXFLAGS="-O -D_REENTRANT "
+ PROFILE="-g -p -D_REENTRANT"
+ ;;
+ esac
+else
+ case $host in
+ *-*-linux*)
+ DEBUG="-g -Wall -fsigned-char -D_REENTRANT -D_GNU_SOURCE"
+ CFLAGS="-O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE "
+ CXXFLAGS="-O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE "
+ PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE"
+ LIBS=" $LIBS -lpthread"
+ ;;
+ sparc-sun-solaris*)
+ DEBUG="-g -Wall -fsigned-char -mv8 -D_REENTRANT"
+ CFLAGS="-O20 -ffast-math -fsigned-char -mv8 -D_REENTRANT "
+ CXXFLAGS="-O20 -ffast-math -fsigned-char -mv8 -D_REENTRANT "
+ PROFILE="-pg -g -O20 -fsigned-char -mv8 -D_REENTRANT"
+ SOCKET_LIBS="-lnsl -lsocket -lresolv"
+ LIBS=" $LIBS -lpthread"
+ ;;
+ *-pc-solaris*)
+ DEBUG="-g -Wall -fsigned-char -D_REENTRANT"
+ CFLAGS="-O20 -ffast-math -fsigned-char -D_REENTRANT "
+ CXXFLAGS="-O20 -ffast-math -fsigned-char -D_REENTRANT "
+ PROFILE="-pg -g -O20 -fsigned-char -D_REENTRANT"
+ SOCKET_LIBS="-lnsl -lsocket -lresolv"
+ LIBS=" $LIBS -lpthread"
+ ;;
+ *freebsd*)
+ DEBUG="-g -Wall -fsigned-char -D_REENTRANT"
+ CFLAGS="-O20 -fsigned-char -D_REENTRANT "
+ CXXFLAGS="-O20 -fsigned-char -D_REENTRANT "
+ PROFILE="-O20 -g -pg -fsigned-char -D_REENTRANT"
+ LIBS=" $LIBS -pthread"
+ ogg_prefix="/usr/local"
+ vorbis_prefix="/usr/local"
+ ;;
+ *)
+ DEBUG="-g -Wall -fsigned-char -D_REENTRANT "
+ CFLAGS="-O20 -fsigned-char -D_REENTRANT "
+ CXXFLAGS="-O20 -fsigned-char -D_REENTRANT "
+ PROFILE="-O20 -g -pg -fsigned-char -D_REENTRANT"
+ LIBS=" $LIBS -lpthread"
+ ;;
+ esac
+fi
+
+dnl Checks for programs.
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+AC_HEADER_STDC
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+dnl -- configure options --
+
+dnl -- XIPH_PATH_OGG(, AC_MSG_ERROR(must have Ogg installed!(Perhaps you need --with-ogg-prefix=/usr/local)))
+dnl -- XIPH_PATH_VORBIS(, AC_MSG_ERROR(must have Vorbis installed!(Perhaps you need --with-vorbis-prefix=/usr/local)))
+dnl -- AM_PATH_LAME(, AC_MSG_ERROR(must have libmp3lame installed!))
+
+AM_PATH_LIBFLAC([
+HAVE_FLAC=1
+use_flac=1
+], AC_MSG_WARN(libflac not installed))
+AC_CHECK_FUNC(pthread_create, [],
+ AC_CHECK_LIB(pthread, pthread_create, [],
+ AC_MSG_ERROR([*** edcast requires POSIX threads support])))
+
+####################################################################
+# CHECKING FOR JACK #
+####################################################################
+dnl **** Check for Jack sound server ****
+JACK_LIBS=error
+AC_CHECK_HEADERS(jack/jack.h)
+if test "${ac_cv_header_jack_jack_h}" = "no"
+then
+ AC_MSG_ERROR([Could not find jack/jack.h Install jack headers to build edcast])
+fi
+
+OLDCFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -lpthread -ljack -ldl"
+
+AC_CHECK_LIB(jack, jack_activate, JACK_LIBS="-ljack -ldl")
+if test "${ac_cv_lib_jack_jack_activate}" = "no"
+then
+ AC_MSG_ERROR([Could not find jack_activate in libjack. Ensure that you have libjack installed and that it a current version.])
+fi
+
+CFLAGS="$OLDCFLAGS"
+####################################################################
+# END OF JACK CHECK #
+####################################################################
+####################################################################
+# CHECKING FOR FAAC #
+####################################################################
+OLDCFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -lfaac -lm"
+
+AC_CHECK_LIB(faac, faacEncOpen, FAAC_LIBS="-lfaac -lm")
+if test "${ac_cv_lib_faac_faacEncOpen}" = "no"
+then
+ AC_MSG_WARN([Unable to find libfaac, building without FAAC support])
+ FAAC_CFLAGS=""
+else
+ FAAC_CFLAGS="-DHAVE_FAAC"
+ use_faac="1"
+fi
+
+CFLAGS="$OLDCFLAGS"
+####################################################################
+# END OF FAAC CHECK #
+####################################################################
+XIPH_PATH_OGG(, AC_MSG_ERROR(must have Ogg installed!(Perhaps you need --with-ogg-prefix=/usr/local)))
+XIPH_PATH_VORBIS(, AC_MSG_ERROR(must have Vorbis installed!(Perhaps you need --with-vorbis-prefix=/usr/local)))
+AM_PATH_MAD(, AC_MSG_ERROR(must have libmad installed!))
+AM_PATH_LIBFLAC(HAVE_FLAC=1, AC_MSG_WARN(libflac not installed, OggFLAC/FLAC encoding DISABLED.))
+AM_PATH_LAME(HAVE_LAME=1, AC_MSG_WARN(LAME not installed, MP3 encoding DISABLED.))
+
+
+dnl Make substitutions
+AC_SUBST(JACK_LIBS)
+
+
+AC_SUBST(FAAC_CFLAGS)
+AC_SUBST(FAAC_LIBS)
+AC_SUBST(LIBFLAC_CFLAGS)
+AC_SUBST(LIBFLAC_LIBS)
+
+AC_SUBST(MAD_CFLAGS)
+AC_SUBST(MAD_LIBS)
+AC_SUBST(LAME_CFLAGS)
+AC_SUBST(LAME_LIBS)
+AC_SUBST(OGG_CFLAGS)
+AC_SUBST(VORBIS_CFLAGS)
+AC_SUBST(OGG_LIBS)
+AC_SUBST(VORBIS_LIBS)
+AC_SUBST(LIBS)
+AC_SUBST(DEBUG)
+AC_SUBST(CFLAGS)
+
+
+AC_OUTPUT(Makefile libedcast/Makefile)
+echo
+echo
+echo "--------------------------------------------"
+if test "$use_vorbis" = "1"
+then
+ echo "Vorbis support: YES"
+else
+ echo "Vorbis support: NO"
+fi
+
+if test "$use_lame" = "1"
+then
+ echo "LAME support: YES"
+else
+ echo "LAME support: NO"
+fi
+
+if test "$use_faac" = "1"
+then
+ echo "AAC support: YES"
+else
+ echo "AAC support: NO"
+fi
+
+if test "$use_flac" = "1"
+then
+ echo "FLAC support: YES"
+else
+ echo "FLAC support: NO"
+fi
+echo "--------------------------------------------"
+echo
+echo
Oops, something went wrong.

0 comments on commit 4368b06

Please sign in to comment.