added fault tolerance in case a server connection is dropped
This commit is contained in:
parent
e043b8784f
commit
229095cb7e
|
@ -4,6 +4,8 @@ DarkIce 0.10
|
||||||
encoding modes with specifying encoding quality as well.
|
encoding modes with specifying encoding quality as well.
|
||||||
thanks to Nicu Pavel <npavel@ituner.com>
|
thanks to Nicu Pavel <npavel@ituner.com>
|
||||||
o added support for Ogg Vorbis 1.0 final, removed support for rc2
|
o added support for Ogg Vorbis 1.0 final, removed support for rc2
|
||||||
|
o added fault tolerance: if one of several server connection drops,
|
||||||
|
DarkIce carries on with the rest of the servers still connected
|
||||||
|
|
||||||
09-04-2002: DarkIce 0.9.1 released
|
09-04-2002: DarkIce 0.9.1 released
|
||||||
|
|
||||||
|
|
|
@ -283,20 +283,24 @@ Connector :: transfer ( unsigned long bytes,
|
||||||
for ( u = 0; u < numSinks; ++u ) {
|
for ( u = 0; u < numSinks; ++u ) {
|
||||||
|
|
||||||
if ( sinks[u]->canWrite( sec, usec) ) {
|
if ( sinks[u]->canWrite( sec, usec) ) {
|
||||||
e = sinks[u]->write( buf, d);
|
try {
|
||||||
} else {
|
e = sinks[u]->write( buf, d);
|
||||||
sinks[u]->close();
|
} catch ( Exception & e ) {
|
||||||
detach( sinks[u].get() );
|
sinks[u]->close();
|
||||||
/* with the call to detach, numSinks gets 1 lower,
|
detach( sinks[u].get() );
|
||||||
* and the next sink comes to sinks[u] */
|
/* with the call to detach, numSinks gets 1 lower,
|
||||||
--u;
|
* and the next sink comes to sinks[u] */
|
||||||
|
--u;
|
||||||
|
|
||||||
reportEvent( 5,
|
reportEvent( 4,
|
||||||
"Connector :: transfer, sink removed, remaining", u);
|
"Connector :: transfer, sink removed, remaining",
|
||||||
|
numSinks);
|
||||||
|
|
||||||
if ( numSinks == 0 ) {
|
if ( numSinks == 0 ) {
|
||||||
reportEvent( 4, "Connector :: transfer, no more sinks");
|
reportEvent( 4,
|
||||||
break;
|
"Connector :: transfer, no more sinks");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,6 +338,9 @@ Connector :: close ( void ) throw ( Exception )
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.8 2002/07/20 16:37:06 darkeye
|
||||||
|
added fault tolerance in case a server connection is dropped
|
||||||
|
|
||||||
Revision 1.7 2002/05/28 12:35:41 darkeye
|
Revision 1.7 2002/05/28 12:35:41 darkeye
|
||||||
code cleanup: compiles under gcc-c++ 3.1, using -pedantic option
|
code cleanup: compiles under gcc-c++ 3.1, using -pedantic option
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ TcpSocket :: write ( const void * buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ret = send( sockfd, buf, len, MSG_DONTWAIT);
|
// ret = send( sockfd, buf, len, MSG_DONTWAIT);
|
||||||
ret = send( sockfd, buf, len, 0);
|
ret = send( sockfd, buf, len, MSG_NOSIGNAL);
|
||||||
|
|
||||||
if ( ret == -1 ) {
|
if ( ret == -1 ) {
|
||||||
if ( errno == EAGAIN ) {
|
if ( errno == EAGAIN ) {
|
||||||
|
@ -349,6 +349,9 @@ TcpSocket :: close ( void ) throw ( Exception )
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.7 2002/07/20 16:37:06 darkeye
|
||||||
|
added fault tolerance in case a server connection is dropped
|
||||||
|
|
||||||
Revision 1.6 2001/09/18 16:44:10 darkeye
|
Revision 1.6 2001/09/18 16:44:10 darkeye
|
||||||
TcpSocket did not report closed state when could not connect()
|
TcpSocket did not report closed state when could not connect()
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ VorbisLibEncoder :: flush ( void )
|
||||||
* Send pending Vorbis blocks to the underlying stream
|
* Send pending Vorbis blocks to the underlying stream
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
VorbisLibEncoder :: vorbisBlocksOut ( void ) throw ()
|
VorbisLibEncoder :: vorbisBlocksOut ( void ) throw ( Exception )
|
||||||
{
|
{
|
||||||
while ( 1 == vorbis_analysis_blockout( &vorbisDspState, &vorbisBlock) ) {
|
while ( 1 == vorbis_analysis_blockout( &vorbisDspState, &vorbisBlock) ) {
|
||||||
ogg_packet oggPacket;
|
ogg_packet oggPacket;
|
||||||
|
@ -316,6 +316,9 @@ VorbisLibEncoder :: close ( void ) throw ( Exception )
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.11 2002/07/20 16:37:06 darkeye
|
||||||
|
added fault tolerance in case a server connection is dropped
|
||||||
|
|
||||||
Revision 1.10 2002/07/20 10:59:00 darkeye
|
Revision 1.10 2002/07/20 10:59:00 darkeye
|
||||||
added support for Ogg Vorbis 1.0, removed support for rc2
|
added support for Ogg Vorbis 1.0, removed support for rc2
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter
|
||||||
* Send pending Vorbis blocks to the underlying stream
|
* Send pending Vorbis blocks to the underlying stream
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vorbisBlocksOut( void ) throw ();
|
vorbisBlocksOut( void ) throw ( Exception );
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -445,6 +445,9 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.6 2002/07/20 16:37:06 darkeye
|
||||||
|
added fault tolerance in case a server connection is dropped
|
||||||
|
|
||||||
Revision 1.5 2002/04/13 11:26:00 darkeye
|
Revision 1.5 2002/04/13 11:26:00 darkeye
|
||||||
added cbr, abr and vbr setting feature with encoding quality
|
added cbr, abr and vbr setting feature with encoding quality
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue