1
0
Fork 0
forked from len0rd/rockbox

rbutil: Make TTS and encoders run on all cores \n FS#11160 by Delyan Kratunov

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26558 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2010-06-04 21:22:25 +00:00
parent 081bda8ab2
commit a8c1934c9d
12 changed files with 204 additions and 111 deletions

View file

@ -49,14 +49,29 @@ public:
QString target;
bool voiced;
bool encoded;
/* We need the following members because
* 1) the QtConcurrent entry points are all static methods (and we
* need to communicate with the TalkGenerator)
* 2) we are not guaranteed to go through the list in any
* particular order, so we can't use the progress slot
* for error checking */
struct
{
EncBase* encoder;
TTSBase* tts;
TalkGenerator* generator;
int wavtrim;
} refs;
};
TalkGenerator(QObject* parent);
Status process(QList<TalkEntry>* list,int wavtrimth = -1);
public slots:
void abort();
void encProgress(int value);
void ttsProgress(int value);
signals:
void done(bool);
@ -64,13 +79,21 @@ signals:
void logProgress(int, int); //! set progress bar.
private:
QFutureWatcher<void> encFutureWatcher;
QFutureWatcher<void> ttsFutureWatcher;
void encFailEntry(const TalkEntry& entry);
void ttsFailEntry(const TalkEntry& entry, TTSStatus status, QString error);
Status voiceList(QList<TalkEntry>* list,int wavetrimth);
Status encodeList(QList<TalkEntry>* list);
static void encEntryPoint(TalkEntry& entry);
static void ttsEntryPoint(TalkEntry& entry);
TTSBase* m_tts;
EncBase* m_enc;
bool m_abort;
bool m_ttsWarnings;
};