1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 ****************************************************************************/
25 #include "rbsettings.h"
33 class EncBase
: public QObject
37 EncBase(QObject
*parent
);
39 virtual bool encode(QString input
,QString output
)
40 {(void)input
; (void)output
; return false;}
41 virtual bool start(){return false;}
42 virtual bool stop(){return false;}
43 virtual void showCfg(){}
44 virtual bool configOk(){return false;}
46 void setCfg(RbSettings
*sett
){settings
= sett
;}
47 static QString
getEncoderName(QString
);
48 static EncBase
* getEncoder(QString
);
49 static QStringList
getEncoderList(void);
52 virtual void accept(void){}
53 virtual void reject(void){}
54 virtual void reset(void){}
56 static void initEncodernamesList(void);
61 static QMap
<QString
,QString
> encoderList
;
62 static QMap
<QString
,EncBase
*> encoderCache
;
67 class EncExes
: public EncBase
71 EncExes(QString name
,QObject
*parent
= NULL
);
72 virtual bool encode(QString input
,QString output
);
74 virtual bool stop() {return true;}
75 virtual void showCfg();
76 virtual bool configOk();
82 QMap
<QString
,QString
> m_TemplateMap
;
83 QString m_EncTemplate
;
86 class EncRbSpeex
: public EncBase
90 EncRbSpeex(QObject
*parent
= NULL
);
91 virtual bool encode(QString input
,QString output
);
93 virtual bool stop() {return true;}
94 virtual void showCfg();
95 virtual bool configOk();
103 float defaultQuality
;
105 int defaultComplexity
;