diff options
Diffstat (limited to 'src/conversionoptions.cpp')
-rwxr-xr-x | src/conversionoptions.cpp | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/src/conversionoptions.cpp b/src/conversionoptions.cpp new file mode 100755 index 0000000..2c5ad22 --- /dev/null +++ b/src/conversionoptions.cpp @@ -0,0 +1,86 @@ + +#include "conversionoptions.h" + +ConversionOptions::ConversionOptions() // TODO reset all values +{} + +ConversionOptions::~ConversionOptions() +{} + +bool ConversionOptions::nearlyEqual( const ConversionOptions& other ) +{ + if( encodingOptions.sFormat != other.encodingOptions.sFormat || + encodingOptions.sQualityMode != other.encodingOptions.sQualityMode || + encodingOptions.iQuality != other.encodingOptions.iQuality || + encodingOptions.sBitrateMode != other.encodingOptions.sBitrateMode || + encodingOptions.bBitrateRange != other.encodingOptions.bBitrateRange || + encodingOptions.samplingRate.bEnabled != other.encodingOptions.samplingRate.bEnabled || + encodingOptions.channels.bEnabled != other.encodingOptions.channels.bEnabled || + encodingOptions.replaygain.bEnabled != other.encodingOptions.replaygain.bEnabled || + encodingOptions.sInOutFiles != other.encodingOptions.sInOutFiles ) { + return false; + } + if( encodingOptions.bBitrateRange ) { + if( encodingOptions.iMinBitrate != other.encodingOptions.iMinBitrate || + encodingOptions.iMaxBitrate != other.encodingOptions.iMaxBitrate ) { + return false; + } + } + if( encodingOptions.samplingRate.bEnabled ) { + if( encodingOptions.samplingRate.iSamplingRate != other.encodingOptions.samplingRate.iSamplingRate ) { + return false; + } + } + if( encodingOptions.channels.bEnabled ) { + if( encodingOptions.channels.sChannels != other.encodingOptions.channels.sChannels ) { + return false; + } + } + + if( outputOptions.mode != other.outputOptions.mode || + outputOptions.directory != other.outputOptions.directory ) { + return false; + } + + return true; +} + +/*bool ConversionOptions::nearlyEqual( ConversionOptions* other ) +{ + if( encodingOptions.sFormat != other->encodingOptions.sFormat || + encodingOptions.sQualityMode != other->encodingOptions.sQualityMode || + encodingOptions.iQuality != other->encodingOptions.iQuality || + encodingOptions.sBitrateMode != other->encodingOptions.sBitrateMode || + encodingOptions.bBitrateRange != other->encodingOptions.bBitrateRange || + encodingOptions.samplingRate.bEnabled != other->encodingOptions.samplingRate.bEnabled || + encodingOptions.channels.bEnabled != other->encodingOptions.channels.bEnabled || + encodingOptions.replaygain.bEnabled != other->encodingOptions.replaygain.bEnabled || + encodingOptions.sInOutFiles != other->encodingOptions.sInOutFiles ) { + return false; + } + if( encodingOptions.bBitrateRange ) { + if( encodingOptions.iMinBitrate != other->encodingOptions.iMinBitrate || + encodingOptions.iMaxBitrate != other->encodingOptions.iMaxBitrate ) { + return false; + } + } + if( encodingOptions.samplingRate.bEnabled ) { + if( encodingOptions.samplingRate.iSamplingRate != other->encodingOptions.samplingRate.iSamplingRate ) { + return false; + } + } + if( encodingOptions.channels.bEnabled ) { + if( encodingOptions.channels.sChannels != other->encodingOptions.channels.sChannels ) { + return false; + } + } + + if( outputOptions.mode != other->outputOptions.mode || + outputOptions.directory != other->outputOptions.directory ) { + return false; + } + + return true; +}*/ + + |