1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Wenger
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
27 #include "encttssettings.h"
31 class EncBase
: public EncTtsSettingInterface
35 EncBase(QObject
*parent
);
37 //! Child class should encode a wav file
38 virtual bool encode(QString input
,QString output
) =0;
39 //! Child class should do startup
40 virtual bool start()=0;
41 //! Child class should stop
42 virtual bool stop()=0;
45 //! Child class should return true when configuration is ok
46 virtual bool configOk()=0;
47 //! Child class should fill in the setttingsList
48 virtual void generateSettings() = 0;
49 //! Chlid class should commit the from SettingsList to permanent storage
50 virtual void saveSettings() = 0;
53 static QString
getEncoderName(QString name
);
54 static EncBase
* getEncoder(QObject
* parent
,QString name
);
55 static QStringList
getEncoderList(void);
58 static void initEncodernamesList(void);
61 static QMap
<QString
,QString
> encoderList
;
65 class EncExes
: public EncBase
75 EncExes(QString name
,QObject
*parent
= NULL
);
76 bool encode(QString input
,QString output
);
78 bool stop() {return true;}
82 void generateSettings();
89 QMap
<QString
,QString
> m_TemplateMap
;
90 QString m_EncTemplate
;
93 class EncRbSpeex
: public EncBase
105 EncRbSpeex(QObject
*parent
= NULL
);
106 bool encode(QString input
,QString output
);
108 bool stop() {return true;}
112 void generateSettings();
121 float defaultQuality
;
123 int defaultComplexity
;