mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
Make encoder name conversion functions static to the base class.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16305 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
22a5c60af3
commit
8f0c7908b0
7 changed files with 42 additions and 44 deletions
|
|
@ -29,40 +29,37 @@ extern "C"
|
|||
#include "rbspeex.h"
|
||||
}
|
||||
|
||||
class EncBase;
|
||||
|
||||
//inits the encoder List
|
||||
void initEncodernamesList(void);
|
||||
// function to get a specific encoder
|
||||
EncBase* getEncoder(QString encname);
|
||||
// get the list of encoders, nice names
|
||||
QString getEncoderName(QString encoder);
|
||||
QStringList getEncoderList(void);
|
||||
|
||||
|
||||
class EncBase : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EncBase(QObject *parent );
|
||||
|
||||
virtual bool encode(QString input,QString output)
|
||||
{(void)input; (void)output; return false;}
|
||||
virtual bool start(){return false;}
|
||||
virtual bool stop(){return false;}
|
||||
virtual void showCfg(){}
|
||||
virtual bool configOk(){return false;}
|
||||
public:
|
||||
EncBase(QObject *parent );
|
||||
|
||||
void setCfg(RbSettings *sett){settings = sett;}
|
||||
|
||||
public slots:
|
||||
virtual void accept(void){}
|
||||
virtual void reject(void){}
|
||||
virtual void reset(void){}
|
||||
virtual bool encode(QString input,QString output)
|
||||
{(void)input; (void)output; return false;}
|
||||
virtual bool start(){return false;}
|
||||
virtual bool stop(){return false;}
|
||||
virtual void showCfg(){}
|
||||
virtual bool configOk(){return false;}
|
||||
|
||||
protected:
|
||||
|
||||
RbSettings* settings;
|
||||
void setCfg(RbSettings *sett){settings = sett;}
|
||||
static QString getEncoderName(QString);
|
||||
static EncBase* getEncoder(QString);
|
||||
static QStringList getEncoderList(void);
|
||||
|
||||
public slots:
|
||||
virtual void accept(void){}
|
||||
virtual void reject(void){}
|
||||
virtual void reset(void){}
|
||||
private:
|
||||
static void initEncodernamesList(void);
|
||||
|
||||
protected:
|
||||
RbSettings* settings;
|
||||
|
||||
static QMap<QString,QString> encoderList;
|
||||
static QMap<QString,EncBase*> encoderCache;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue