added support for Ogg Vorbis 1.0, removed support for rc2

This commit is contained in:
darkeye 2002-07-20 10:59:00 +00:00
parent 0913fefad2
commit e043b8784f
5 changed files with 21 additions and 38 deletions

View File

@ -3,6 +3,7 @@ DarkIce 0.10
o added possibility to select constant, average and variable bit rate
encoding modes with specifying encoding quality as well.
thanks to Nicu Pavel <npavel@ituner.com>
o added support for Ogg Vorbis 1.0 final, removed support for rc2
09-04-2002: DarkIce 0.9.1 released

View File

@ -102,23 +102,6 @@ else
fi
dnl-----------------------------------------------------------------------------
dnl find out which vorbis libs to use: rc2 or rc3
dnl-----------------------------------------------------------------------------
AC_ARG_WITH( vorbis-lib,
[ --with-vorbis-lib=VERSION use vorbis lib version rc2 or rc3 [rc3] ],
USE_VORBIS_LIB=${withval}, USE_VORBIS_LIB="rc3" )
if test "x${USE_VORBIS_LIB}" != "xrc2" -a "x${USE_VORBIS_LIB}" != "xrc3" ; then
AC_MSG_ERROR( [bad vorbis lib version specified: ${USE_VORBIS_LIB}])
fi
if test "x${USE_VORBIS_LIB}" = "xrc2" ; then
AC_DEFINE( VORBIS_LIB_RC2, 1, [use vorbis library verison rc2])
fi
if test "x${USE_VORBIS_LIB}" = "xrc3" ; then
AC_DEFINE( VORBIS_LIB_RC3, 1, [use vorbis library version rc3])
fi
dnl make sure at least one of lame and vorbis present
if test "x${LAME_LDFLAGS}" = "x" -a "x${VORBIS_LDFLAGS}" = "x" ; then
AC_MSG_ERROR( [neither lame nor Ogg Vorbis configured])

View File

@ -201,8 +201,8 @@ abr bit rate modes are specified.
.TP
.I quality
The quality of encoding a value between 0.0 .. 1.0 (e.g. 0.8), with 1.0 being
the highest quality. Use a value greater than 0.0. Only used when cbr or vbr
bit rate modes are specified.
the highest quality. Use a value greater than 0.0. Only used when vbr
bit rate mode is specified.
.TP
.I server
The

View File

@ -410,10 +410,6 @@ DarkIce :: configIceCast2 ( const Config & config,
throw Exception( __FILE__, __LINE__,
"bitrate not specified for CBR encoding");
}
if ( quality == 0 ) {
throw Exception( __FILE__, __LINE__,
"quality not specified for CBR encoding");
}
} else if ( Util::strEq( str, "abr") ) {
bitrateMode = AudioEncoder::abr;
@ -980,6 +976,9 @@ DarkIce :: run ( void ) throw ( Exception )
$Source$
$Log$
Revision 1.28 2002/07/20 10:59:00 darkeye
added support for Ogg Vorbis 1.0, removed support for rc2
Revision 1.27 2002/04/13 11:26:00 darkeye
added cbr, abr and vbr setting feature with encoding quality

View File

@ -76,18 +76,21 @@ VorbisLibEncoder :: open ( void )
switch ( getOutBitrateMode() ) {
case cbr:
case abr:
#ifdef VORBIS_LIB_RC3
if ( (ret = vorbis_encode_init( &vorbisInfo,
getInChannel(),
getOutSampleRate(),
getOutBitrate() * 1000,
getOutBitrate() * 1000,
-1 )) ) {
ret = vorbis_encode_setup_managed( &vorbisInfo,
getInChannel(),
getOutSampleRate(),
-1,
getOutBitrate() * 1000,
-1)
|| vorbis_encode_ctl( &vorbisInfo, OV_ECTL_RATEMANAGE_AVG, NULL)
|| vorbis_encode_setup_init( &vorbisInfo);
if ( ret ) {
throw Exception( __FILE__, __LINE__,
"vorbis encode init error", ret);
}
#else
break;
case abr:
if ( (ret = vorbis_encode_init( &vorbisInfo,
getInChannel(),
getOutSampleRate(),
@ -97,11 +100,9 @@ VorbisLibEncoder :: open ( void )
throw Exception( __FILE__, __LINE__,
"vorbis encode init error", ret);
}
#endif
break;
case vbr:
if ( (ret = vorbis_encode_init_vbr( &vorbisInfo,
getInChannel(),
getOutSampleRate(),
@ -263,11 +264,9 @@ VorbisLibEncoder :: vorbisBlocksOut ( void ) throw ()
ogg_page oggPage;
vorbis_analysis( &vorbisBlock, &oggPacket);
#ifdef VORBIS_LIB_RC3
vorbis_bitrate_addblock( &vorbisBlock);
while ( vorbis_bitrate_flushpacket( &vorbisDspState, &oggPacket) ) {
#endif
ogg_stream_packetin( &oggStreamState, &oggPacket);
@ -284,9 +283,7 @@ VorbisLibEncoder :: vorbisBlocksOut ( void ) throw ()
oggPage.header_len + oggPage.body_len - written);
}
}
#ifdef VORBIS_LIB_RC3
}
#endif
}
}
@ -319,6 +316,9 @@ VorbisLibEncoder :: close ( void ) throw ( Exception )
$Source$
$Log$
Revision 1.10 2002/07/20 10:59:00 darkeye
added support for Ogg Vorbis 1.0, removed support for rc2
Revision 1.9 2002/05/28 12:35:41 darkeye
code cleanup: compiles under gcc-c++ 3.1, using -pedantic option