Added CLI option to skip the x264 version test.
This commit is contained in:
parent
74edad10e7
commit
2adc1ee50c
@ -104,7 +104,7 @@ static const unsigned int REV_MULT = 10000;
|
||||
// Constructor & Destructor
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EncodeThread::EncodeThread(const QString &sourceFileName, const QString &outputFileName, const OptionsModel *options, const QString &binDir, bool x264_x64, bool x264_10bit, bool avs2yuv_x64, int processPriroity)
|
||||
EncodeThread::EncodeThread(const QString &sourceFileName, const QString &outputFileName, const OptionsModel *options, const QString &binDir, bool x264_x64, bool x264_10bit, bool avs2yuv_x64, bool const skipVersionTest, int processPriroity)
|
||||
:
|
||||
m_jobId(QUuid::createUuid()),
|
||||
m_sourceFileName(sourceFileName),
|
||||
@ -114,6 +114,7 @@ EncodeThread::EncodeThread(const QString &sourceFileName, const QString &outputF
|
||||
m_x264_x64(x264_x64),
|
||||
m_x264_10bit(x264_10bit),
|
||||
m_avs2yuv_x64(avs2yuv_x64),
|
||||
m_skipVersionTest(skipVersionTest),
|
||||
m_processPriority(processPriroity),
|
||||
m_handle_jobObject(NULL),
|
||||
m_semaphorePaused(0)
|
||||
@ -629,6 +630,12 @@ QStringList EncodeThread::buildCommandLine(bool usePipe, bool use10Bit, unsigned
|
||||
|
||||
unsigned int EncodeThread::checkVersionX264(bool use_x64, bool use_10bit, bool &modified)
|
||||
{
|
||||
if(m_skipVersionTest)
|
||||
{
|
||||
log("Warning: Skipping x264 version check this time!");
|
||||
return (999 * REV_MULT) + (9999 % REV_MULT);
|
||||
}
|
||||
|
||||
QProcess process;
|
||||
QStringList cmdLine = QStringList() << "--version";
|
||||
|
||||
|
@ -37,7 +37,7 @@ class EncodeThread : public QThread
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EncodeThread(const QString &sourceFileName, const QString &outputFileName, const OptionsModel *options, const QString &binDir, bool x264_x64, bool x264_10bit, bool avs2yuv_x64, int processPriroity);
|
||||
EncodeThread(const QString &sourceFileName, const QString &outputFileName, const OptionsModel *options, const QString &binDir, bool x264_x64, bool x264_10bit, bool avs2yuv_x64, bool const skipVersionTest, int processPriroity);
|
||||
~EncodeThread(void);
|
||||
|
||||
QUuid getId(void) { return this->m_jobId; };
|
||||
@ -76,6 +76,7 @@ protected:
|
||||
const bool m_x264_x64;
|
||||
const bool m_x264_10bit;
|
||||
const bool m_avs2yuv_x64;
|
||||
const bool m_skipVersionTest;
|
||||
const int m_processPriority;
|
||||
|
||||
//Flags
|
||||
|
@ -21,11 +21,11 @@
|
||||
|
||||
#define VER_X264_MAJOR 2
|
||||
#define VER_X264_MINOR 1
|
||||
#define VER_X264_PATCH 6
|
||||
#define VER_X264_BUILD 502
|
||||
#define VER_X264_PATCH 7
|
||||
#define VER_X264_BUILD 510
|
||||
|
||||
#define VER_X264_MINIMUM_REV 2282
|
||||
#define VER_X264_CURRENT_API 133
|
||||
#define VER_X264_MINIMUM_REV 2339
|
||||
#define VER_X264_CURRENT_API 135
|
||||
#define VER_X264_AVS2YUV_VER 242
|
||||
|
||||
#define VER_X264_PRE_RELEASE (0)
|
||||
|
@ -75,6 +75,7 @@ MainWindow::MainWindow(const x264_cpu_t *const cpuFeatures)
|
||||
m_droppedFiles(NULL),
|
||||
m_preferences(NULL),
|
||||
m_recentlyUsed(NULL),
|
||||
m_skipVersionTest(false),
|
||||
m_firstShow(true)
|
||||
{
|
||||
//Init the dialog, from the .ui file
|
||||
@ -712,7 +713,7 @@ void MainWindow::init(void)
|
||||
}
|
||||
if(!binaryTypeOkay)
|
||||
{
|
||||
QMessageBox::critical(this, tr("Invalid File!"), tr("<nobr>At least on required tool is not a valid Win32 or Win64 binary:<br>%1<br><br>Please re-install the program in order to fix the problem!</nobr>").arg(QDir::toNativeSeparators(QString("%1/toolset/%2").arg(m_appDir, current))).replace("-", "−"));
|
||||
QMessageBox::critical(this, tr("Invalid File!"), tr("<nobr>At least on required tool is not a valid Win32 or Win64 binary:<br><tt style=\"whitespace:nowrap\">%1</tt><br><br>Please re-install the program in order to fix the problem!</nobr>").arg(QDir::toNativeSeparators(QString("%1/toolset/%2").arg(m_appDir, current))).replace("-", "−"));
|
||||
qFatal(QString("Binary is invalid: %1/toolset/%2").arg(m_appDir, current).toLatin1().constData());
|
||||
close(); qApp->exit(-1); return;
|
||||
}
|
||||
@ -721,7 +722,7 @@ void MainWindow::init(void)
|
||||
else
|
||||
{
|
||||
X264_DELETE(file);
|
||||
QMessageBox::critical(this, tr("File Not Found!"), tr("<nobr>At least on required tool could not be found:<br>%1<br><br>Please re-install the program in order to fix the problem!</nobr>").arg(QDir::toNativeSeparators(QString("%1/toolset/%2").arg(m_appDir, current))).replace("-", "−"));
|
||||
QMessageBox::critical(this, tr("File Not Found!"), tr("<nobr>At least on required tool could not be found:<br><tt style=\"whitespace:nowrap\">%1</tt><br><br>Please re-install the program in order to fix the problem!</nobr>").arg(QDir::toNativeSeparators(QString("%1/toolset/%2").arg(m_appDir, current))).replace("-", "−"));
|
||||
qFatal(QString("Binary not found: %1/toolset/%2").arg(m_appDir, current).toLatin1().constData());
|
||||
close(); qApp->exit(-1); return;
|
||||
}
|
||||
@ -767,6 +768,13 @@ void MainWindow::init(void)
|
||||
if(val != 1) { close(); qApp->exit(-1); return; }
|
||||
}
|
||||
|
||||
//Skip version check (not recommended!)
|
||||
if(qApp->arguments().contains("--skip-x264-version-check", Qt::CaseInsensitive))
|
||||
{
|
||||
qWarning("x264 version check disabled, you have been warned!\n");
|
||||
m_skipVersionTest = true;
|
||||
}
|
||||
|
||||
//Check for Avisynth support
|
||||
if(!qApp->arguments().contains("--skip-avisynth-check", Qt::CaseInsensitive))
|
||||
{
|
||||
@ -1120,6 +1128,7 @@ bool MainWindow::appendJob(const QString &sourceFileName, const QString &outputF
|
||||
m_cpuFeatures->x64,
|
||||
m_preferences->use10BitEncoding(),
|
||||
m_cpuFeatures->x64 && m_preferences->useAvisyth64Bit(),
|
||||
m_skipVersionTest,
|
||||
m_preferences->processPriority()
|
||||
);
|
||||
|
||||
|
@ -53,6 +53,7 @@ protected:
|
||||
|
||||
private:
|
||||
bool m_firstShow;
|
||||
bool m_skipVersionTest;
|
||||
QLabel *m_label;
|
||||
IPCThread *m_ipcThread;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user