From 09179b384e1058e6852662afb4450cb68ce95d22 Mon Sep 17 00:00:00 2001 From: darkeye Date: Thu, 28 Mar 2002 16:40:55 +0000 Subject: [PATCH] slight changes to allow for variable bitrate streams (where the value of bitrate is 0) --- darkice/trunk/src/CastSink.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/darkice/trunk/src/CastSink.cpp b/darkice/trunk/src/CastSink.cpp index 18ff083..3759a53 100644 --- a/darkice/trunk/src/CastSink.cpp +++ b/darkice/trunk/src/CastSink.cpp @@ -75,10 +75,12 @@ CastSink :: init ( TcpSocket * socket, this->isPublic = isPublic; this->bufferDuration = bufferDuration; - bufferedSink = socket ? new BufferedSink( socket, - (bitRate * 1024 / 8) * bufferDuration) - : 0; + int bufferSize = bitRate ? (bitRate * 1024 / 8) * bufferDuration + : (128 * 1024 / 8) * bufferDuration; + bufferedSink = socket ? new BufferedSink( socket, + (bufferSize * 1024 / 8) * bufferDuration) + : 0; } @@ -144,6 +146,10 @@ CastSink :: open ( void ) throw ( Exception ) $Source$ $Log$ + Revision 1.8 2002/03/28 16:40:55 darkeye + slight changes to allow for variable bitrate streams + (where the value of bitrate is 0) + Revision 1.7 2002/02/28 09:49:25 darkeye added possibility to save the encoded stream to a local file only (no streaming server needed)