diff --git a/doc/Changelog.html b/doc/Changelog.html
index d00de317..1d74b205 100644
--- a/doc/Changelog.html
+++ b/doc/Changelog.html
@@ -20,7 +20,7 @@ a:visited { color: #0000EE; }
Added support for the QAAC Encoder, requires QuickTime v7.7.1 or newer (see FAQ doc for details)
Updated LAME encoder to v3.99.2 Final (2011-11-18), compiled with ICL 12.1.7 and MSVC 10.0 (details)
Updated MediaInfo to v0.7.51+ (2011-11-19), compiled with ICL 12.1.6 and MSVC 10.0
-Implemented coalescing of update signals in order to reduce the CPU usage of the LameXP process
+Implemented coalescing of update signals to reduce the CPU usage of the LameXP process (details)
Run more than four instances in parallel on systems with more than four CPU cores (details)
diff --git a/doc/FAQ.html b/doc/FAQ.html
index 50fec8b0..6ef481d6 100644
--- a/doc/FAQ.html
+++ b/doc/FAQ.html
@@ -489,7 +489,7 @@ we create, the more CPU cores can be utilized. In reality, however, there are so
computer. And, the more instances we run in parallel, the more processes will be competing for these shared
resources! More specifically, the amount of main memory (RAM) is limited. Creating a huge number of instances
in parallel can easily use up all RAM, which will cause the operating system to make heavy use of the page
-file. This can result in HDD thrasing and may significantly hurt the overall performance! But even when there
+file. This can result in HDD thrashing and may significantly hurt the overall performance! But even if there
is enough RAM available on the system, each encoder or decoder instance needs to access the HDD, e.g. for
reading the input file and for writing the output file. Thus too many instances will cause an I/O bottleneck!
If, however, you think that LameXP's choice of the number of parallel instances is too conservative, you may
diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts
index 8a9b784b..b405f76b 100644
--- a/etc/Translation/Blank.ts
+++ b/etc/Translation/Blank.ts
@@ -606,7 +606,7 @@
DiskObserverThread
-
+
@@ -2633,127 +2633,154 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
-
+
-
+
diff --git a/etc/Translation/LameXP_DE.ts b/etc/Translation/LameXP_DE.ts
index 0d3143dd..e39dc321 100644
--- a/etc/Translation/LameXP_DE.ts
+++ b/etc/Translation/LameXP_DE.ts
@@ -2125,6 +2125,26 @@
Freier Festplattenspeicher (Temp Ordner)
+
+
+ Vorgang abgeschlossen nach %1.
+
+
+
+ Stunde(n)
+
+
+
+ Minute(n)
+
+
+
+ Sekunde(n)
+
+
+
+ Millisekunde(n)
+
ProgressModel
diff --git a/etc/Translation/LameXP_ES.ts b/etc/Translation/LameXP_ES.ts
index 14537289..96b84e77 100644
--- a/etc/Translation/LameXP_ES.ts
+++ b/etc/Translation/LameXP_ES.ts
@@ -2124,6 +2124,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_FR.ts b/etc/Translation/LameXP_FR.ts
index fcc0b4d8..dd69e419 100644
--- a/etc/Translation/LameXP_FR.ts
+++ b/etc/Translation/LameXP_FR.ts
@@ -2134,6 +2134,26 @@ Ouvrir le dossier récursivement...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_IT.ts b/etc/Translation/LameXP_IT.ts
index 22b697a7..ed698285 100644
--- a/etc/Translation/LameXP_IT.ts
+++ b/etc/Translation/LameXP_IT.ts
@@ -2125,6 +2125,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_KR.ts b/etc/Translation/LameXP_KR.ts
index 0cc50eab..96b38026 100644
--- a/etc/Translation/LameXP_KR.ts
+++ b/etc/Translation/LameXP_KR.ts
@@ -2124,6 +2124,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_PL.ts b/etc/Translation/LameXP_PL.ts
index 3253669b..70bf7861 100644
--- a/etc/Translation/LameXP_PL.ts
+++ b/etc/Translation/LameXP_PL.ts
@@ -606,7 +606,7 @@
DiskObserverThread
-
+
Mało miejsca na dysku '%1' (tylko %2 MB dostępnych), mogą wystąpić problemy!
@@ -2633,127 +2633,154 @@
Powrót
-
+
Pokaż szczegóły wybranego zadania
-
+
Wybierz lokalizację dla plików wyjściowych
-
+
Kompresowanie plików
-
+
Twoje pliki są właśnie kompresowane, prosze być cierpliwy...
-
+
Kompresowanie plików, prosze czekać...
-
+
Wielowątkowosć włączona: Równolegle wykonywanych jest %1 kodowań!
-
+
Przerwano! Czekanie na wyłączenie procesu...
-
+
Kompresja: Prosze czekać, jak dotąd wykonano %1 z %2 plików...
-
+
Tworzenie pliku playlisty, prosze czekać...
-
+
Proces został przerwany przez użytkownika po wykonaniu %1 plików!
-
+
Proces został przedwcześnie zakończony przez użytkownika!
-
+
LameXP - Przerwano
-
+
Proces został przerwany przez użytkownika.
-
+
+
+
+
+
+
Błąd: %1 z %2 plików nie zostało skompresowanych. Kliknij dwukrotnie na plik aby zobaczyć szczegóły!
-
+
LameXP - Błąd
-
+
Przynajmniej jeden plik nie został skompresowany!
-
-
+
+
Kompresja wszystkich plików zakończona powodzeniem.
-
+
LameXP - Zrobione
-
+
Tworzenie playlisty zakończone niepowodzeniem
-
+
Playlista nie mogła zostać utworzona:
-
+
Ostrzeżenie: Komputer zostanie zamknięty za %1 sekund/y...
-
-
+
+
Anuluj wyłączenie komputera
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
-
+
Zadanie
-
+
Status
diff --git a/etc/Translation/LameXP_RU.ts b/etc/Translation/LameXP_RU.ts
index 5a9836ec..67b367a5 100644
--- a/etc/Translation/LameXP_RU.ts
+++ b/etc/Translation/LameXP_RU.ts
@@ -2132,6 +2132,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
diff --git a/etc/Translation/LameXP_UK.ts b/etc/Translation/LameXP_UK.ts
index 87caabea..bcfc046d 100644
--- a/etc/Translation/LameXP_UK.ts
+++ b/etc/Translation/LameXP_UK.ts
@@ -2125,6 +2125,26 @@
Вільне місце на диску (тека тимчасових файлів)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ProgressModel
diff --git a/etc/Translation/update.lst b/etc/Translation/update.lst
index 2ec4c8c2..36f22f64 100644
--- a/etc/Translation/update.lst
+++ b/etc/Translation/update.lst
@@ -36,6 +36,7 @@
..\..\src\Dialog_WorkingBanner.cpp
..\..\src\Encoder_AAC.cpp
..\..\src\Encoder_AAC_FHG.cpp
+..\..\src\Encoder_AAC_QAAC.cpp
..\..\src\Encoder_Abstract.cpp
..\..\src\Encoder_AC3.cpp
..\..\src\Encoder_FLAC.cpp
@@ -103,6 +104,7 @@
..\..\src\Dialog_WorkingBanner.h
..\..\src\Encoder_AAC.h
..\..\src\Encoder_AAC_FHG.h
+..\..\src\Encoder_AAC_QAAC.h
..\..\src\Encoder_Abstract.h
..\..\src\Encoder_AC3.h
..\..\src\Encoder_FLAC.h
diff --git a/res/Icons.qrc b/res/Icons.qrc
index 5eaa89a2..b3d07a77 100644
--- a/res/Icons.qrc
+++ b/res/Icons.qrc
@@ -23,6 +23,7 @@
icons/cd_delete.png
icons/cd_edit.png
icons/cd_go.png
+ icons/clock.png
icons/clock_play.png
icons/cog.png
icons/comment.png
diff --git a/res/localization/LameXP_DE.qm b/res/localization/LameXP_DE.qm
index 0c133e09..65f8db1c 100644
Binary files a/res/localization/LameXP_DE.qm and b/res/localization/LameXP_DE.qm differ
diff --git a/src/Config.h b/src/Config.h
index 63a9eff0..6dc4f194 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -29,8 +29,8 @@
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Alpha
-#define VER_LAMEXP_PATCH 4
-#define VER_LAMEXP_BUILD 793
+#define VER_LAMEXP_PATCH 5
+#define VER_LAMEXP_BUILD 796
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)
diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp
index 31e845c8..74e2c16d 100644
--- a/src/Dialog_Processing.cpp
+++ b/src/Dialog_Processing.cpp
@@ -61,6 +61,7 @@
#include
#include
#include
+#include
#include
#include
@@ -73,6 +74,7 @@
//Function to calculate the number of instances
static int cores2instances(int cores);
+static QString time2text(const double timeVal);
////////////////////////////////////////////////////////////
@@ -180,6 +182,7 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel
m_succeededJobs.clear();
m_failedJobs.clear();
m_userAborted = false;
+ m_timerStart = 0I64;
}
////////////////////////////////////////////////////////////
@@ -345,7 +348,7 @@ void ProcessingDialog::initEncoding(void)
if(!m_diskObserver)
{
m_diskObserver = new DiskObserverThread(m_settings->customTempPathEnabled() ? m_settings->customTempPath() : lamexp_temp_folder2());
- connect(m_diskObserver, SIGNAL(messageLogged(QString,bool)), m_progressModel, SLOT(addSystemMessage(QString,bool)), Qt::QueuedConnection);
+ connect(m_diskObserver, SIGNAL(messageLogged(QString,int)), m_progressModel, SLOT(addSystemMessage(QString,int)), Qt::QueuedConnection);
connect(m_diskObserver, SIGNAL(freeSpaceChanged(quint64)), this, SLOT(diskUsageHasChanged(quint64)), Qt::QueuedConnection);
m_diskObserver->start();
}
@@ -379,6 +382,12 @@ void ProcessingDialog::initEncoding(void)
{
startNextJob();
}
+
+ LARGE_INTEGER counter;
+ if(QueryPerformanceCounter(&counter))
+ {
+ m_timerStart = counter.QuadPart;
+ }
}
void ProcessingDialog::abortEncoding(void)
@@ -447,6 +456,16 @@ void ProcessingDialog::doneEncoding(void)
}
else
{
+ LARGE_INTEGER counter, frequency;
+ if(QueryPerformanceCounter(&counter) && QueryPerformanceFrequency(&frequency))
+ {
+ if((m_timerStart > 0I64) && (frequency.QuadPart > 0I64) && (m_timerStart < counter.QuadPart))
+ {
+ double timeElapsed = static_cast(counter.QuadPart - m_timerStart) / static_cast(frequency.QuadPart);
+ m_progressModel->addSystemMessage(tr("Process finished after %1.").arg(time2text(timeElapsed)), ProgressModel::SysMsg_Performance);
+ }
+ }
+
if(m_failedJobs.count() > 0)
{
CHANGE_BACKGROUND_COLOR(frame_header, QColor("#FFBABA"));
@@ -981,6 +1000,33 @@ bool ProcessingDialog::shutdownComputer(void)
return true;
}
+QString ProcessingDialog::time2text(const double timeVal) const
+{
+ double intPart = 0;
+ double frcPart = modf(timeVal, &intPart);
+ int x = 0, y = 0; QString a, b;
+
+ QTime time = QTime().addSecs(qRound(intPart)).addMSecs(qRound(frcPart * 1000.0));
+
+ if(time.hour() > 0)
+ {
+ x = time.hour(); a = tr("hour(s)");
+ y = time.minute(); b = tr("minute(s)");
+ }
+ else if(time.minute() > 0)
+ {
+ x = time.minute(); a = tr("minute(s)");
+ y = time.second(); b = tr("second(s)");
+ }
+ else
+ {
+ x = time.second(); a = tr("second(s)");
+ y = time.msec(); b = tr("millisecond(s)");
+ }
+
+ return QString("%1 %2, %3 %4").arg(QString::number(x), a, QString::number(y), b);
+}
+
////////////////////////////////////////////////////////////
// HELPER FUNCTIONS
////////////////////////////////////////////////////////////
diff --git a/src/Dialog_Processing.h b/src/Dialog_Processing.h
index b4732c2b..2deb92e3 100644
--- a/src/Dialog_Processing.h
+++ b/src/Dialog_Processing.h
@@ -82,6 +82,7 @@ private:
AudioFileModel updateMetaInfo(const AudioFileModel &audioFile);
void writePlayList(void);
bool shutdownComputer(void);
+ QString time2text(const double timeVal) const;
QList m_pendingJobs;
SettingsModel *m_settings;
@@ -102,4 +103,5 @@ private:
CPUObserverThread *m_cpuObserver;
RAMObserverThread *m_ramObserver;
DiskObserverThread *m_diskObserver;
+ qint64 m_timerStart;
};
diff --git a/src/Model_Progress.cpp b/src/Model_Progress.cpp
index 57da24b2..8d66813a 100644
--- a/src/Model_Progress.cpp
+++ b/src/Model_Progress.cpp
@@ -32,7 +32,8 @@ ProgressModel::ProgressModel(void)
m_iconComplete(":/icons/tick.png"),
m_iconFailed(":/icons/exclamation.png"),
m_iconSystem(":/icons/computer.png"),
- m_iconWarning(":/icons/error.png")
+ m_iconWarning(":/icons/error.png"),
+ m_iconPerformance(":/icons/clock.png")
{
}
@@ -88,6 +89,9 @@ QVariant ProgressModel::data(const QModelIndex &index, int role) const
case JobWarning:
return m_iconWarning;
break;
+ case JobPerformance:
+ return m_iconPerformance;
+ break;
default:
return m_iconFailed;
break;
@@ -205,7 +209,7 @@ const QUuid &ProgressModel::getJobId(const QModelIndex &index)
return *(reinterpret_cast(NULL));
}
-void ProgressModel::addSystemMessage(const QString &text, bool isWarning)
+void ProgressModel::addSystemMessage(const QString &text, int type)
{
const QUuid &jobId = QUuid::createUuid();
@@ -222,12 +226,27 @@ void ProgressModel::addSystemMessage(const QString &text, bool isWarning)
}
int newIndex = m_jobList.count();
+ JobState jobState = JobState(-1);
+
+ switch(type)
+ {
+ case SysMsg_Warning:
+ jobState = JobWarning;
+ break;
+ case SysMsg_Performance:
+ jobState = JobPerformance;
+ break;
+ default:
+ jobState = JobSystem;
+ break;
+ }
+
beginInsertRows(QModelIndex(), newIndex, newIndex);
m_jobList.append(jobId);
m_jobName.insert(jobId, text);
m_jobStatus.insert(jobId, QString());
- m_jobState.insert(jobId, isWarning ? JobWarning : JobSystem);
+ m_jobState.insert(jobId, jobState);
m_jobLogFile.insert(jobId, QStringList());
endInsertRows();
diff --git a/src/Model_Progress.h b/src/Model_Progress.h
index 6dafead6..43dc3485 100644
--- a/src/Model_Progress.h
+++ b/src/Model_Progress.h
@@ -45,7 +45,14 @@ public:
JobComplete = 2,
JobFailed = 3,
JobSystem = 4,
- JobWarning = 5
+ JobWarning = 5,
+ JobPerformance = 6
+ };
+ enum SysMsgType
+ {
+ SysMsg_Info = 0,
+ SysMsg_Performance = 1,
+ SysMsg_Warning = 2
};
//Model functions
@@ -63,7 +70,7 @@ public slots:
void addJob(const QUuid &jobId, const QString &jobName, const QString &jobInitialStatus = QString("Initializing..."), int jobInitialState = JobRunning);
void updateJob(const QUuid &jobId, const QString &newStatus, int newState);
void appendToLog(const QUuid &jobId, const QString &line);
- void addSystemMessage(const QString &text, bool isWarning = false);
+ void addSystemMessage(const QString &text, int type = SysMsg_Info);
private:
QList m_jobList;
@@ -79,4 +86,5 @@ private:
const QIcon m_iconFailed;
const QIcon m_iconSystem;
const QIcon m_iconWarning;
+ const QIcon m_iconPerformance;
};
diff --git a/src/Thread_DiskObserver.cpp b/src/Thread_DiskObserver.cpp
index 266f666e..20ad2e6d 100644
--- a/src/Thread_DiskObserver.cpp
+++ b/src/Thread_DiskObserver.cpp
@@ -22,6 +22,7 @@
#include "Thread_DiskObserver.h"
#include "Global.h"
+#include "Model_Progress.h"
#include
@@ -79,7 +80,7 @@ void DiskObserverThread::observe(void)
if(freeSpace < minimumSpace)
{
qWarning("Free diskspace on '%s' dropped below %s MB, only %s MB free!", m_path.toUtf8().constData(), QString::number(minimumSpace / 1048576ui64).toUtf8().constData(), QString::number(freeSpace / 1048576ui64).toUtf8().constData());
- emit messageLogged(tr("Low diskspace on drive '%1' detected (only %2 MB are free), problems can occur!").arg(QDir::toNativeSeparators(m_path), QString::number(freeSpace / 1048576ui64)), true);
+ emit messageLogged(tr("Low diskspace on drive '%1' detected (only %2 MB are free), problems can occur!").arg(QDir::toNativeSeparators(m_path), QString::number(freeSpace / 1048576ui64)), ProgressModel::SysMsg_Warning);
minimumSpace = qMin(freeSpace, (minimumSpace >> 1));
}
if(freeSpace != previousSpace)
diff --git a/src/Thread_DiskObserver.h b/src/Thread_DiskObserver.h
index f7ffb015..3c1181ed 100644
--- a/src/Thread_DiskObserver.h
+++ b/src/Thread_DiskObserver.h
@@ -41,7 +41,7 @@ protected:
static QString makeRootDir(const QString &baseDir);
signals:
- void messageLogged(const QString &text, bool isWarning);
+ void messageLogged(const QString &text, int type);
void freeSpaceChanged(const quint64);
private: