summaryrefslogtreecommitdiffstats
path: root/src/conversionoptions.h
blob: 1f46b543f4c89e33e992e0acb2df2f17d99dd37f (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


#ifndef CONVERSIONOPTIONS_H
#define CONVERSIONOPTIONS_H

#include "outputdirectory.h"

#include <tqstring.h>

/**
 * @short Here the options for the conversion process can be stored
 * @author Daniel Faust <hessijames@gmail.com>
 * @version 0.3
 */
class ConversionOptions
{
public:
    struct EncodingOptions {
        TQString sFormat;                  // output format
        TQString sQualityMode;             // which mode are we using? quality, bitrate, lossless? i18n()!!!
        int iQuality;                     // the encoding quality / bitrate
        TQString sBitrateMode;             // when using bitrate mode, which? abr, cbr?
        bool bBitrateRange;               // enable bitrate range?
        int iMinBitrate, iMaxBitrate;     // when using bitrate range
        struct SamplingRateOptions {      // special options, when sampling rate is enabled
            bool bEnabled;
            int iSamplingRate;
        } samplingRate;
        struct ChannelsOptions {          // special options, when channels is enabled
            bool bEnabled;
            TQString sChannels;
        } channels;
        struct ReplaygainOptions {        // special options, when replaygain is enabled
            bool bEnabled;
        } replaygain;
        TQString sInOutFiles;               // could be called 'user defined parameter'
                                           // but it is analog to the in_out_files option in the plugins
    };
    struct OutputOptions {
        OutputDirectory::Mode mode;
        TQString directory;
    };

    /**
     * Constructor
     */
    ConversionOptions();

    /**
     * Destructor
     */
    virtual ~ConversionOptions();

    /**
     * Checks whether this ConversionOptions and @p other are equal, except the 'filePathName' and 'outputFilePathName' members
     */
    bool nearlyEqual( const ConversionOptions& other );

    TQString filePathName;            // the path and name of the file
    TQString outputFilePathName;      // if the user wants to change the output directory/file name per file!
    EncodingOptions encodingOptions; // what shall we do with the file?
    OutputOptions outputOptions;     // where to save the file?
};

#endif // CONVERSIONOPTIONS_H