Fixed a bug in job name generation.

This commit is contained in:
LoRd_MuldeR 2016-01-04 20:52:19 +01:00
parent 1e48f22eea
commit 653eeee98e
2 changed files with 10 additions and 24 deletions

View File

@ -239,39 +239,25 @@ QVariant JobListModel::data(const QModelIndex &index, int role) const
QModelIndex JobListModel::insertJob(EncodeThread *thread) QModelIndex JobListModel::insertJob(EncodeThread *thread)
{ {
QUuid id = thread->getId(); const QUuid id = thread->getId();
if(m_jobs.contains(id)) if(m_jobs.contains(id))
{ {
return QModelIndex(); return QModelIndex();
} }
QString config = "N/A"; QString config = QLatin1String("N/A");
switch(thread->options()->encType())
switch(thread->options()->rcMode())
{ {
case OptionsModel::EncType_X264: case OptionsModel::EncType_X264: config = QLatin1String("x264"); break;
config = QString("x264"); case OptionsModel::EncType_X265: config = QLatin1String("x265"); break;
break;
case OptionsModel::EncType_X265:
config = QString("x265");
break;
} }
switch(thread->options()->rcMode()) switch(thread->options()->rcMode())
{ {
case OptionsModel::RCMode_CRF: case OptionsModel::RCMode_CRF: config.append(QString(" CRF@%1") .arg(QString::number(thread->options()->quantizer()))); break;
config = QString("%1 CRF@%2") .arg(config, QString::number(thread->options()->quantizer())); case OptionsModel::RCMode_CQ: config.append(QString(" CQ@%1") .arg(QString::number(qRound(thread->options()->quantizer())))); break;
break; case OptionsModel::RCMode_2Pass: config.append(QString(" 2Pass@%1").arg(QString::number(thread->options()->bitrate()))); break;
case OptionsModel::RCMode_CQ: case OptionsModel::RCMode_ABR: config.append(QString(" ABR@%1") .arg(QString::number(thread->options()->bitrate()))); break;
config = QString("%1 CQ@%2") .arg(config, QString::number(qRound(thread->options()->quantizer())));
break;
case OptionsModel::RCMode_2Pass:
config = QString("%1 2Pass@%2").arg(config, QString::number(thread->options()->bitrate()));
break;
case OptionsModel::RCMode_ABR:
config = QString("%1 ABR@%2") .arg(config, QString::number(thread->options()->bitrate()));
break;
} }
int n = 2; int n = 2;

View File

@ -26,7 +26,7 @@
#define VER_X264_MAJOR 2 #define VER_X264_MAJOR 2
#define VER_X264_MINOR 6 #define VER_X264_MINOR 6
#define VER_X264_PATCH 5 #define VER_X264_PATCH 5
#define VER_X264_BUILD 1006 #define VER_X264_BUILD 1007
#define VER_X264_PORTABLE_EDITION (0) #define VER_X264_PORTABLE_EDITION (0)