From 19bdccd7680d7c2a251d9dc05ed42d26d64e1a0c Mon Sep 17 00:00:00 2001 From: darkeye Date: Fri, 10 Nov 2000 20:14:11 +0000 Subject: [PATCH] added support for remote dump file --- darkice/trunk/src/CastSink.cpp | 14 +++++++++++--- darkice/trunk/src/CastSink.h | 16 ++++++++++++++++ darkice/trunk/src/IceCast.cpp | 10 ++++++++++ darkice/trunk/src/IceCast.h | 5 +++++ 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/darkice/trunk/src/CastSink.cpp b/darkice/trunk/src/CastSink.cpp index 0d60bfb..6c76083 100644 --- a/darkice/trunk/src/CastSink.cpp +++ b/darkice/trunk/src/CastSink.cpp @@ -62,6 +62,7 @@ void CastSink :: init ( TcpSocket * socket, const char * password, const char * mountPoint, + const char * remoteDumpFile, const char * name, const char * description, const char * url, @@ -74,6 +75,7 @@ CastSink :: init ( TcpSocket * socket, this->socket = socket; this->password = Util::strDup( password); this->mountPoint = Util::strDup( mountPoint); + this->remoteDumpFile = remoteDumpFile ? Util::strDup( remoteDumpFile) : 0; this->name = Util::strDup( name); this->description = Util::strDup( description); this->url = Util::strDup( url); @@ -83,7 +85,7 @@ CastSink :: init ( TcpSocket * socket, this->bufferDuration = bufferDuration; bufferedSink = new BufferedSink( socket, - (bitRate * 1024 / 8) * bufferDuration ); + (bitRate * 1024 / 8) * bufferDuration); } @@ -100,6 +102,9 @@ CastSink :: strip ( void ) throw ( Exception ) delete[] password; delete[] mountPoint; + if ( remoteDumpFile ) { + delete[] remoteDumpFile; + } delete[] name; delete[] description; delete[] url; @@ -136,8 +141,11 @@ CastSink :: open ( void ) throw ( Exception ) $Source$ $Log$ - Revision 1.1 2000/11/05 10:05:48 darkeye - Initial revision + Revision 1.2 2000/11/10 20:14:11 darkeye + added support for remote dump file + + Revision 1.1.1.1 2000/11/05 10:05:48 darkeye + initial version ------------------------------------------------------------------------------*/ diff --git a/darkice/trunk/src/CastSink.h b/darkice/trunk/src/CastSink.h index 7e3d6b4..e021d2c 100644 --- a/darkice/trunk/src/CastSink.h +++ b/darkice/trunk/src/CastSink.h @@ -66,6 +66,7 @@ class CastSink : public Sink Ref bufferedSink; char * password; char * mountPoint; + char * remoteDumpFile; char * name; char * description; @@ -80,6 +81,7 @@ class CastSink : public Sink init ( TcpSocket * socket, const char * password, const char * mountPoint, + const char * remoteDumpFile, const char * name, const char * description, const char * url, @@ -113,6 +115,7 @@ class CastSink : public Sink CastSink ( TcpSocket * socket, const char * password, const char * mountPoint, + const char * remoteDumpFile, const char * name, const char * description, const char * url, @@ -125,6 +128,7 @@ class CastSink : public Sink init( socket, password, mountPoint, + remoteDumpFile, name, description, url, @@ -142,6 +146,7 @@ class CastSink : public Sink init( cs.socket.get(), cs.password, cs.mountPoint, + cs.remoteDumpFile, cs.name, cs.description, cs.url, @@ -168,6 +173,7 @@ class CastSink : public Sink init( cs.socket.get(), cs.password, cs.mountPoint, + cs.remoteDumpFile, cs.name, cs.description, cs.url, @@ -249,6 +255,13 @@ class CastSink : public Sink } + inline const char * + getRemoteDumpFile ( void ) const throw () + { + return remoteDumpFile; + } + + inline const char * getName ( void ) const throw () { @@ -314,6 +327,9 @@ class CastSink : public Sink $Source$ $Log$ + Revision 1.3 2000/11/10 20:14:11 darkeye + added support for remote dump file + Revision 1.2 2000/11/05 17:37:24 darkeye removed clone() functions diff --git a/darkice/trunk/src/IceCast.cpp b/darkice/trunk/src/IceCast.cpp index e0d1ee5..7ff210e 100644 --- a/darkice/trunk/src/IceCast.cpp +++ b/darkice/trunk/src/IceCast.cpp @@ -158,6 +158,13 @@ IceCast :: sendLogin ( void ) throw ( Exception ) str = getIsPublic() ? "yes" : "no"; sink->write( str, strlen( str)); + if ( getRemoteDumpFile() ) { + str = "\nx-audiocast-dumpfile: "; + sink->write( str, strlen( str)); + str = getRemoteDumpFile(); + sink->write( str, strlen( str)); + } + str = "\n\n"; sink->write( str, strlen( str)); sink->flush(); @@ -185,6 +192,9 @@ IceCast :: sendLogin ( void ) throw ( Exception ) $Source$ $Log$ + Revision 1.3 2000/11/10 20:14:11 darkeye + added support for remote dump file + Revision 1.2 2000/11/05 14:08:28 darkeye changed builting to an automake / autoconf environment diff --git a/darkice/trunk/src/IceCast.h b/darkice/trunk/src/IceCast.h index f558ef5..b898577 100644 --- a/darkice/trunk/src/IceCast.h +++ b/darkice/trunk/src/IceCast.h @@ -82,6 +82,7 @@ class IceCast : public CastSink IceCast ( TcpSocket * socket, const char * password, const char * mountPoint, + const char * remoteDumpFile, const char * name, const char * description, const char * url, @@ -93,6 +94,7 @@ class IceCast : public CastSink : CastSink( socket, password, mountPoint, + remoteDumpFile, name, description, url, @@ -143,6 +145,9 @@ class IceCast : public CastSink $Source$ $Log$ + Revision 1.3 2000/11/10 20:14:11 darkeye + added support for remote dump file + Revision 1.2 2000/11/05 17:37:24 darkeye removed clone() functions