summaryrefslogtreecommitdiffstats
path: root/src/conversionoptions.cpp
blob: 2c5ad2219d99e2aadb5aca709757a5d7f52ae5ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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;
}*/