Move C linkage binding for c++ to exporting header files instead of includes.
[Rockbox.git] / rbutil / rbutilqt / encoders.h
blob160041b4acdef95e1542053f05455254e1d19c33
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: encoders.h 15212 2007-10-19 21:49:07Z domonoky $
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef ENCODERS_H
21 #define ENCODERS_H
23 #include <QtCore>
25 #include "rbsettings.h"
27 #include "rbspeex.h"
30 class EncBase : public QObject
32 Q_OBJECT
33 public:
34 EncBase(QObject *parent );
36 virtual bool encode(QString input,QString output)
37 {(void)input; (void)output; return false;}
38 virtual bool start(){return false;}
39 virtual bool stop(){return false;}
40 virtual void showCfg(){}
41 virtual bool configOk(){return false;}
43 void setCfg(RbSettings *sett){settings = sett;}
44 static QString getEncoderName(QString);
45 static EncBase* getEncoder(QString);
46 static QStringList getEncoderList(void);
48 public slots:
49 virtual void accept(void){}
50 virtual void reject(void){}
51 virtual void reset(void){}
52 private:
53 static void initEncodernamesList(void);
55 protected:
56 RbSettings* settings;
58 static QMap<QString,QString> encoderList;
59 static QMap<QString,EncBase*> encoderCache;
64 class EncExes : public EncBase
66 Q_OBJECT
67 public:
68 EncExes(QString name,QObject *parent = NULL);
69 virtual bool encode(QString input,QString output);
70 virtual bool start();
71 virtual bool stop() {return true;}
72 virtual void showCfg();
73 virtual bool configOk();
75 private:
76 QString m_name;
77 QString m_EncExec;
78 QString m_EncOpts;
79 QMap<QString,QString> m_TemplateMap;
80 QString m_EncTemplate;
83 class EncRbSpeex : public EncBase
85 Q_OBJECT
86 public:
87 EncRbSpeex(QObject *parent = NULL);
88 virtual bool encode(QString input,QString output);
89 virtual bool start();
90 virtual bool stop() {return true;}
91 virtual void showCfg();
92 virtual bool configOk();
94 private:
95 float quality;
96 float volume;
97 int complexity;
98 bool narrowband;
100 float defaultQuality;
101 float defaultVolume;
102 int defaultComplexity;
103 bool defaultBand;
107 #endif