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 "rbsettings.h"
32 class EncBase
: public QObject
36 EncBase(QObject
*parent
);
38 virtual bool encode(QString input
,QString output
)
39 {(void)input
; (void)output
; return false;}
40 virtual bool start(){return false;}
41 virtual bool stop(){return false;}
42 virtual void showCfg(){}
43 virtual bool configOk(){return false;}
45 void setCfg(RbSettings
*sett
){settings
= sett
;}
46 static QString
getEncoderName(QString
);
47 static EncBase
* getEncoder(QString
);
48 static QStringList
getEncoderList(void);
51 virtual void accept(void){}
52 virtual void reject(void){}
53 virtual void reset(void){}
55 static void initEncodernamesList(void);
60 static QMap
<QString
,QString
> encoderList
;
61 static QMap
<QString
,EncBase
*> encoderCache
;
66 class EncExes
: public EncBase
70 EncExes(QString name
,QObject
*parent
= NULL
);
71 virtual bool encode(QString input
,QString output
);
73 virtual bool stop() {return true;}
74 virtual void showCfg();
75 virtual bool configOk();
81 QMap
<QString
,QString
> m_TemplateMap
;
82 QString m_EncTemplate
;
85 class EncRbSpeex
: public EncBase
89 EncRbSpeex(QObject
*parent
= NULL
);
90 virtual bool encode(QString input
,QString output
);
92 virtual bool stop() {return true;}
93 virtual void showCfg();
94 virtual bool configOk();
102 float defaultQuality
;
104 int defaultComplexity
;