Increase process timeout interval to 180 seconds. Should avoid Timeout errors on "very slow" systems, although I think 30 seconds should be sufficient (so the actual problem might be something else).

This commit is contained in:
LoRd_MuldeR 2011-06-14 13:06:27 +02:00
parent 251a70cc91
commit 252d48ed6b
28 changed files with 33 additions and 28 deletions

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 2
#define VER_LAMEXP_TYPE RC
#define VER_LAMEXP_PATCH 4
#define VER_LAMEXP_BUILD 576
#define VER_LAMEXP_BUILD 577
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -68,7 +68,7 @@ bool AACDecoder::decode(const QString &sourceFile, const QString &outputFile, vo
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -68,7 +68,7 @@ bool AC3Decoder::decode(const QString &sourceFile, const QString &outputFile, vo
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -72,7 +72,7 @@ bool ADPCMDecoder::decode(const QString &sourceFile, const QString &outputFile,
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -70,11 +70,11 @@ bool ALACDecoder::decode(const QString &sourceFile, const QString &outputFile, v
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead(180000);
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();
qWarning("TTAEnc process timed out <-- killing!");
qWarning("ALAC process timed out <-- killing!");
emit messageLogged("\nPROCESS TIMEOUT !!!");
bTimeout = true;
break;

View File

@ -70,7 +70,7 @@ bool AvisynthDecoder::decode(const QString &sourceFile, const QString &outputFil
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -69,7 +69,7 @@ bool FLACDecoder::decode(const QString &sourceFile, const QString &outputFile, v
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -69,7 +69,7 @@ bool MACDecoder::decode(const QString &sourceFile, const QString &outputFile, vo
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -68,7 +68,7 @@ bool MP3Decoder::decode(const QString &sourceFile, const QString &outputFile, vo
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -70,7 +70,7 @@ bool MusepackDecoder::decode(const QString &sourceFile, const QString &outputFil
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead(180000);
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -71,7 +71,7 @@ bool ShortenDecoder::decode(const QString &sourceFile, const QString &outputFile
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead(180000);
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -69,7 +69,7 @@ bool SpeexDecoder::decode(const QString &sourceFile, const QString &outputFile,
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -70,7 +70,7 @@ bool TTADecoder::decode(const QString &sourceFile, const QString &outputFile, vo
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead(180000);
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -68,7 +68,7 @@ bool VorbisDecoder::decode(const QString &sourceFile, const QString &outputFile,
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -79,7 +79,7 @@ bool WMADecoder::decode(const QString &sourceFile, const QString &outputFile, vo
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -69,7 +69,7 @@ bool WavPackDecoder::decode(const QString &sourceFile, const QString &outputFile
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -114,7 +114,7 @@ bool AACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaInf
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();
@ -206,7 +206,7 @@ bool AACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaInf
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -108,7 +108,7 @@ bool AC3Encoder::encode(const QString &sourceFile, const AudioFileModel &metaInf
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -86,7 +86,7 @@ bool FLACEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -151,7 +151,7 @@ bool MP3Encoder::encode(const QString &sourceFile, const AudioFileModel &metaInf
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -112,7 +112,7 @@ bool VorbisEncoder::encode(const QString &sourceFile, const AudioFileModel &meta
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -73,7 +73,7 @@ bool DownmixFilter::apply(const QString &sourceFile, const QString &outputFile,
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -76,7 +76,7 @@ bool NormalizeFilter::apply(const QString &sourceFile, const QString &outputFile
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -76,7 +76,7 @@ bool ResampleFilter::apply(const QString &sourceFile, const QString &outputFile,
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -85,7 +85,7 @@ bool ToneAdjustFilter::apply(const QString &sourceFile, const QString &outputFil
emit messageLogged("\nABORTED BY USER !!!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -300,7 +300,7 @@ void CueSplitter::splitFile(const QString &output, const int trackNo, const QStr
qWarning("Process was aborted on user request!");
break;
}
process.waitForReadyRead();
process.waitForReadyRead(m_processTimeoutInterval);
if(!process.bytesAvailable() && process.state() == QProcess::Running)
{
process.kill();

View File

@ -70,6 +70,8 @@ private:
unsigned int m_nTracksSuccess;
unsigned int m_nTracksSkipped;
static const int m_processTimeoutInterval = 180000;
bool m_bAborted;
bool m_bSuccess;

View File

@ -42,6 +42,9 @@ signals:
void statusUpdated(int progress);
void messageLogged(const QString &line);
protected:
static const int m_processTimeoutInterval = 180000;
private:
static QMutex *m_mutex_startProcess;
static void *m_handle_jobObject;