summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/encoders.h
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-12-14 20:09:44 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-12-14 20:09:44 +0000
commited33c89f9ff67fb3c3b1004ab73a4bd2a0ff6d15 (patch)
treeee873699695c8d23c741e2f6f50b2d2785550865 /rbutil/rbutilqt/encoders.h
parent37113e69df30421c7a4713ab2e28f98fe4411cc0 (diff)
downloadrockbox-ed33c89f9ff67fb3c3b1004ab73a4bd2a0ff6d15.tar.gz
rockbox-ed33c89f9ff67fb3c3b1004ab73a4bd2a0ff6d15.zip
rbutil: ups again, more missing files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15928 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/encoders.h')
-rw-r--r--rbutil/rbutilqt/encoders.h125
1 files changed, 125 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/encoders.h b/rbutil/rbutilqt/encoders.h
new file mode 100644
index 0000000000..f69c3ba611
--- /dev/null
+++ b/rbutil/rbutilqt/encoders.h
@@ -0,0 +1,125 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: talkfile.h 15212 2007-10-19 21:49:07Z domonoky $
11 *
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.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef ENCODERS_H
21#define ENCODERS_H
22
23#include "ui_rbspeexcfgfrm.h"
24#include "ui_encexescfgfrm.h"
25#include <QtGui>
26
27extern "C"
28{
29 #include "rbspeex.h"
30}
31
32class EncBase;
33
34//inits the encoder List
35void initEncoderList();
36// function to get a specific encoder
37EncBase* getEncoder(QString encname);
38// get the list of encoders, nice names
39QStringList getEncoderList();
40
41
42
43class EncBase : public QDialog
44{
45 Q_OBJECT
46public:
47 EncBase(QWidget *parent );
48 virtual ~EncBase(){}
49 virtual bool encode(QString input,QString output) = 0;
50 virtual bool start() = 0;
51 virtual bool stop() = 0;
52 virtual void showCfg() = 0;
53 virtual bool configOk()=0;
54
55 void setUserCfg(QSettings *uSettings){userSettings = uSettings;}
56
57public slots:
58 virtual void accept(void)=0;
59 virtual void reject(void)=0;
60 virtual void reset(void)=0;
61
62protected:
63
64 QSettings *userSettings;
65};
66
67
68
69class EncExes : public EncBase
70{
71 Q_OBJECT
72public:
73 EncExes(QString name,QWidget *parent = NULL);
74 virtual bool encode(QString input,QString output);
75 virtual bool start();
76 virtual bool stop() {return true;}
77 virtual void showCfg();
78 virtual bool configOk();
79
80public slots:
81 virtual void accept(void);
82 virtual void reject(void);
83 virtual void reset(void);
84 void browse(void);
85
86private:
87 Ui::EncExesCfgFrm ui;
88 QString m_name;
89 QString m_EncExec;
90 QString m_EncOpts;
91 QMap<QString,QString> m_TemplateMap;
92 QString m_EncTemplate;
93};
94
95class EncRbSpeex : public EncBase
96{
97 Q_OBJECT
98public:
99 EncRbSpeex(QWidget *parent = NULL);
100 virtual bool encode(QString input,QString output);
101 virtual bool start();
102 virtual bool stop() {return true;}
103 virtual void showCfg();
104 virtual bool configOk();
105
106public slots:
107 virtual void accept(void);
108 virtual void reject(void);
109 virtual void reset(void);
110
111private:
112 Ui::RbSpeexCfgFrm ui;
113 float quality;
114 float volume;
115 int complexity;
116 bool narrowband;
117
118 float defaultQuality;
119 float defaultVolume;
120 int defaultComplexity;
121 bool defaultBand;
122};
123
124
125#endif