Summary: | k3b uses 128kbps instead of selected preset while ripping to mp3 | ||
---|---|---|---|
Product: | [Applications] k3b | Reporter: | Klotz <klocuch> |
Component: | general | Assignee: | Sebastian Trueg <trueg> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Slackware | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Klotz
2007-04-13 21:11:49 UTC
SVN commit 653778 by trueg: Set the lame encoding to VBR/ABR when choosing a quality level. BUG: 144192 M +16 -8 k3blameencoder.cpp --- trunk/extragear/multimedia/k3b/plugins/encoder/lame/k3blameencoder.cpp #653777:653778 @@ -1,4 +1,4 @@ -/* +/* * * $Id$ * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org> @@ -240,13 +240,13 @@ if( c->readBoolEntry( "VBR", false ) ) { // we use the default algorithm here lame_set_VBR( d->flags, vbr_default ); - + if( c->readBoolEntry( "Use Maximum Bitrate", false ) ) { lame_set_VBR_max_bitrate_kbps( d->flags, c->readNumEntry( "Maximum Bitrate", 224 ) ); } if( c->readBoolEntry( "Use Minimum Bitrate", false ) ) { lame_set_VBR_min_bitrate_kbps( d->flags, c->readNumEntry( "Minimum Bitrate", 32 ) ); - + // TODO: lame_set_hard_min } if( c->readBoolEntry( "Use Average Bitrate", true ) ) { @@ -272,7 +272,15 @@ int q = c->readNumEntry( "Quality Level", 5 ); if( q < 0 ) q = 0; if( q > 9 ) q = 9; - + + kdDebug() << "(K3bLameEncoder) setting preset encoding value to " << q << endl; + + if ( q < 2 || q > 8 ) { + lame_set_VBR( d->flags, vbr_abr ); + } + else { + lame_set_VBR( d->flags, vbr_default ); + } lame_set_preset( d->flags, s_lame_presets[q] ); if( q < 2 ) @@ -282,7 +290,7 @@ // // file options - // + // lame_set_copyright( d->flags, c->readBoolEntry( "Copyright", false ) ); lame_set_original( d->flags, c->readBoolEntry( "Original", true ) ); lame_set_strict_ISO( d->flags, c->readBoolEntry( "ISO compliance", false ) ); @@ -588,8 +596,8 @@ if( c->readBoolEntry( "Use Maximum Bitrate", false ) ) bitrate = c->readNumEntry( "Maximum Bitrate", 224 ); if( c->readBoolEntry( "Use Minimum Bitrate", false ) ) - bitrate = ( bitrate > 0 - ? (bitrate - c->readNumEntry( "Minimum Bitrate", 32 )) / 2 + bitrate = ( bitrate > 0 + ? (bitrate - c->readNumEntry( "Minimum Bitrate", 32 )) / 2 : c->readNumEntry( "Minimum Bitrate", 32 ) ); if( c->readBoolEntry( "Use Average Bitrate", true ) ) bitrate = c->readNumEntry( "Average Bitrate", 128 ); @@ -609,7 +617,7 @@ } -K3bPluginConfigWidget* K3bLameEncoder::createConfigWidget( QWidget* parent, +K3bPluginConfigWidget* K3bLameEncoder::createConfigWidget( QWidget* parent, const char* name ) const { return new K3bLameEncoderSettingsWidget( parent, name ); |