made some description options in the darkice config file optional

This commit is contained in:
darkeye 2001-08-29 21:08:30 +00:00
parent 5bdf95de9f
commit c14d9259c1
6 changed files with 93 additions and 62 deletions

View File

@ -146,6 +146,10 @@ server
.TP
.I mountPoint
Mount point for the stream on the server
.PP
Optional values:
.TP
.I name
Name of the stream
@ -161,10 +165,6 @@ Genre of the stream
.TP
.I public
"yes" or "no", wether the stream is public
.PP
Optional values:
.TP
.I remoteDumpFile
The file the

View File

@ -57,26 +57,26 @@ void
CastSink :: init ( TcpSocket * socket,
const char * password,
const char * mountPoint,
const char * remoteDumpFile,
unsigned int bitRate,
const char * name,
const char * description,
const char * url,
const char * genre,
unsigned int bitRate,
bool isPublic,
const char * remoteDumpFile,
unsigned int bufferDuration )
throw ( Exception )
{
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);
this->genre = Util::strDup( genre);
this->bitRate = bitRate;
this->name = name ? Util::strDup( name) : 0;
this->description = description ? Util::strDup( description) : 0;
this->url = url ? Util::strDup( url) : 0;
this->genre = genre ? Util::strDup( genre) : 0;
this->isPublic = isPublic;
this->remoteDumpFile = remoteDumpFile ? Util::strDup( remoteDumpFile) : 0;
this->bufferDuration = bufferDuration;
bufferedSink = new BufferedSink( socket,
@ -97,13 +97,21 @@ CastSink :: strip ( void ) throw ( Exception )
delete[] password;
delete[] mountPoint;
if ( name ) {
delete[] name;
}
if ( description ) {
delete[] description;
}
if ( url ) {
delete[] url;
}
if ( genre ) {
delete[] genre;
}
if ( remoteDumpFile ) {
delete[] remoteDumpFile;
}
delete[] name;
delete[] description;
delete[] url;
delete[] genre;
}
@ -136,6 +144,9 @@ CastSink :: open ( void ) throw ( Exception )
$Source$
$Log$
Revision 1.4 2001/08/29 21:08:30 darkeye
made some description options in the darkice config file optional
Revision 1.3 2000/11/12 14:54:50 darkeye
added kdoc-style documentation comments

View File

@ -143,13 +143,13 @@ class CastSink : public Sink
init ( TcpSocket * socket,
const char * password,
const char * mountPoint,
const char * remoteDumpFile,
unsigned int bitRate,
const char * name,
const char * description,
const char * url,
const char * genre,
unsigned int bitRate,
bool isPublic,
const char * remoteDumpFile,
unsigned int bufferDuration )
throw ( Exception );
@ -230,26 +230,26 @@ 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,
const char * genre,
unsigned int bitRate,
bool isPublic,
const char * name = 0,
const char * description = 0,
const char * url = 0,
const char * genre = 0,
bool isPublic = false,
const char * remoteDumpFile = 0,
unsigned int bufferDuration = 10 )
throw ( Exception )
{
init( socket,
password,
mountPoint,
remoteDumpFile,
bitRate,
name,
description,
url,
genre,
bitRate,
isPublic,
remoteDumpFile,
bufferDuration );
}
@ -265,13 +265,13 @@ class CastSink : public Sink
init( cs.socket.get(),
cs.password,
cs.mountPoint,
cs.remoteDumpFile,
cs.bitRate,
cs.name,
cs.description,
cs.url,
cs.genre,
cs.bitRate,
cs.isPublic,
cs.remoteDumpFile,
cs.bufferDuration );
}
@ -302,13 +302,13 @@ class CastSink : public Sink
init( cs.socket.get(),
cs.password,
cs.mountPoint,
cs.remoteDumpFile,
cs.bitRate,
cs.name,
cs.description,
cs.url,
cs.genre,
cs.bitRate,
cs.isPublic,
cs.remoteDumpFile,
cs.bufferDuration );
}
return *this;
@ -516,6 +516,9 @@ class CastSink : public Sink
$Source$
$Log$
Revision 1.5 2001/08/29 21:08:30 darkeye
made some description options in the darkice config file optional
Revision 1.4 2000/11/12 14:54:50 darkeye
added kdoc-style documentation comments

View File

@ -200,12 +200,12 @@ DarkIce :: configLameLib ( const Config & config,
password = cs->getForSure( "password", " missing in section ", lame);
mountPoint = cs->getForSure( "mountPoint"," missing in section ",lame);
remoteDumpFile = cs->get( "remoteDumpFile");
name = cs->getForSure( "name", " missing in section ", lame);
description = cs->getForSure("description"," missing in section ",lame);
url = cs->getForSure( "url", " missing in section ", lame);
genre = cs->getForSure( "genre", " missing in section ", lame);
str = cs->getForSure( "public", " missing in section ", lame);
isPublic = Util::strEq( str, "yes") ? true : false;
name = cs->get( "name");
description = cs->get("description");
url = cs->get( "url");
genre = cs->get( "genre");
str = cs->get( "public");
isPublic = str ? (Util::strEq( str, "yes") ? true : false) : false;
str = cs->get( "lowpass");
lowpass = str ? Util::strToL( str) : 0;
str = cs->get( "highpass");
@ -225,13 +225,13 @@ DarkIce :: configLameLib ( const Config & config,
lameLibOuts[u].ice = new IceCast( lameLibOuts[u].socket.get(),
password,
mountPoint,
remoteDumpFile,
bitrate,
name,
description,
url,
genre,
bitrate,
isPublic );
isPublic,
remoteDumpFile );
lameLibOuts[u].encoder = new LameLibEncoder( lameLibOuts[u].ice.get(),
dsp.get(),
@ -380,6 +380,9 @@ DarkIce :: run ( void ) throw ( Exception )
$Source$
$Log$
Revision 1.14 2001/08/29 21:08:30 darkeye
made some description options in the darkice config file optional
Revision 1.13 2001/08/26 20:44:30 darkeye
removed external command-line encoder support
replaced it with a shared-object support for lame with the possibility

View File

@ -120,25 +120,33 @@ IceCast :: sendLogin ( void ) throw ( Exception )
}
/* send the x-audiocast headers */
str = "x-audiocast-name: ";
sink->write( str, strlen( str));
str = getName();
sink->write( str, strlen( str));
if ( getName() ) {
str = "x-audiocast-name: ";
sink->write( str, strlen( str));
str = getName();
sink->write( str, strlen( str));
}
str = "\nx-audiocast-description: ";
sink->write( str, strlen( str));
str = getDescription();
sink->write( str, strlen( str));
if ( getDescription() ) {
str = "\nx-audiocast-description: ";
sink->write( str, strlen( str));
str = getDescription();
sink->write( str, strlen( str));
}
str = "\nx-audiocast-url: ";
sink->write( str, strlen( str));
str = getUrl();
sink->write( str, strlen( str));
if ( getUrl() ) {
str = "\nx-audiocast-url: ";
sink->write( str, strlen( str));
str = getUrl();
sink->write( str, strlen( str));
}
str = "\nx-audiocast-genre: ";
sink->write( str, strlen( str));
str = getGenre();
sink->write( str, strlen( str));
if ( getGenre() ) {
str = "\nx-audiocast-genre: ";
sink->write( str, strlen( str));
str = getGenre();
sink->write( str, strlen( str));
}
str = "\nx-audiocast-bitrate: ";
sink->write( str, strlen( str));
@ -186,6 +194,9 @@ IceCast :: sendLogin ( void ) throw ( Exception )
$Source$
$Log$
Revision 1.5 2001/08/29 21:08:30 darkeye
made some description options in the darkice config file optional
Revision 1.4 2000/11/12 14:54:50 darkeye
added kdoc-style documentation comments

View File

@ -107,25 +107,25 @@ 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,
const char * genre,
unsigned int bitRate,
bool isPublic,
const char * name = 0,
const char * description = 0,
const char * url = 0,
const char * genre = 0,
bool isPublic = false,
const char * remoteDumpFile = 0,
unsigned int bufferDuration = 10 )
throw ( Exception )
: CastSink( socket,
password,
mountPoint,
remoteDumpFile,
bitRate,
name,
description,
url,
genre,
bitRate,
isPublic,
remoteDumpFile,
bufferDuration )
{
}
@ -184,6 +184,9 @@ class IceCast : public CastSink
$Source$
$Log$
Revision 1.5 2001/08/29 21:08:30 darkeye
made some description options in the darkice config file optional
Revision 1.4 2000/11/12 14:54:50 darkeye
added kdoc-style documentation comments