Fix help display. Regression introduced when 8-Bit/10-Bit support was added.
This commit is contained in:
parent
b7acf86d6e
commit
d55e24e3be
@ -299,7 +299,7 @@ bool EncodeThread::runEncodingPass(bool x264_x64, bool x264_10bit, bool avs2yuv_
|
|||||||
processAvisynth.setStandardOutputProcess(&processEncode);
|
processAvisynth.setStandardOutputProcess(&processEncode);
|
||||||
|
|
||||||
log("Creating Avisynth process:");
|
log("Creating Avisynth process:");
|
||||||
if(!startProcess(processAvisynth, QString("%1/%2.exe").arg(m_binDir, avs2yuv_x64 ? "avs2yuv_x64" : "avs2yuv"), cmdLine_Avisynth, false))
|
if(!startProcess(processAvisynth, QString("%1/%2.exe").arg(m_binDir, avs2yuv_x64 ? "avs2yuv_x64" : "avs2yuv_x86"), cmdLine_Avisynth, false))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -693,7 +693,7 @@ unsigned int EncodeThread::checkVersionAvs2yuv(bool x64)
|
|||||||
QProcess process;
|
QProcess process;
|
||||||
|
|
||||||
log("\nCreating process:");
|
log("\nCreating process:");
|
||||||
if(!startProcess(process, QString("%1/%2.exe").arg(m_binDir, x64 ? "avs2yuv_x64" : "avs2yuv"), QStringList()))
|
if(!startProcess(process, QString("%1/%2.exe").arg(m_binDir, x64 ? "avs2yuv_x64" : "avs2yuv_x86"), QStringList()))
|
||||||
{
|
{
|
||||||
return false;;
|
return false;;
|
||||||
}
|
}
|
||||||
@ -802,7 +802,7 @@ bool EncodeThread::checkProperties(bool x64, unsigned int &frames)
|
|||||||
cmdLine << pathToLocal(QDir::toNativeSeparators(m_sourceFileName)) << "NUL";
|
cmdLine << pathToLocal(QDir::toNativeSeparators(m_sourceFileName)) << "NUL";
|
||||||
|
|
||||||
log("Creating process:");
|
log("Creating process:");
|
||||||
if(!startProcess(process, QString("%1/%2.exe").arg(m_binDir, x64 ? "avs2yuv_x64" : "avs2yuv"), cmdLine))
|
if(!startProcess(process, QString("%1/%2.exe").arg(m_binDir, x64 ? "avs2yuv_x64" : "avs2yuv_x86"), cmdLine))
|
||||||
{
|
{
|
||||||
return false;;
|
return false;;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define VER_X264_MAJOR 2
|
#define VER_X264_MAJOR 2
|
||||||
#define VER_X264_MINOR 0
|
#define VER_X264_MINOR 0
|
||||||
#define VER_X264_PATCH 3
|
#define VER_X264_PATCH 3
|
||||||
#define VER_X264_BUILD 291
|
#define VER_X264_BUILD 294
|
||||||
|
|
||||||
#define VER_X264_MINIMUM_REV 2164
|
#define VER_X264_MINIMUM_REV 2164
|
||||||
#define VER_X264_CURRENT_API 122
|
#define VER_X264_CURRENT_API 122
|
||||||
|
@ -185,12 +185,13 @@ public:
|
|||||||
// Constructor & Destructor
|
// Constructor & Destructor
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
AddJobDialog::AddJobDialog(QWidget *parent, OptionsModel *options, bool x64supported)
|
AddJobDialog::AddJobDialog(QWidget *parent, OptionsModel *options, bool x64supported, bool use10BitEncoding)
|
||||||
:
|
:
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
m_defaults(new OptionsModel()),
|
m_defaults(new OptionsModel()),
|
||||||
m_options(options),
|
m_options(options),
|
||||||
m_x64supported(x64supported),
|
m_x64supported(x64supported),
|
||||||
|
m_use10BitEncoding(use10BitEncoding),
|
||||||
m_initialDir_src(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation))),
|
m_initialDir_src(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation))),
|
||||||
m_initialDir_out(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation))),
|
m_initialDir_out(QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation))),
|
||||||
m_lastFilterIndex(0)
|
m_lastFilterIndex(0)
|
||||||
@ -310,13 +311,13 @@ bool AddJobDialog::eventFilter(QObject *o, QEvent *e)
|
|||||||
{
|
{
|
||||||
if((o == labelHelpScreenX264) && (e->type() == QEvent::MouseButtonPress))
|
if((o == labelHelpScreenX264) && (e->type() == QEvent::MouseButtonPress))
|
||||||
{
|
{
|
||||||
HelpDialog *helpScreen = new HelpDialog(this, false, m_x64supported);
|
HelpDialog *helpScreen = new HelpDialog(this, false, m_x64supported, m_use10BitEncoding);
|
||||||
helpScreen->exec();
|
helpScreen->exec();
|
||||||
X264_DELETE(helpScreen);
|
X264_DELETE(helpScreen);
|
||||||
}
|
}
|
||||||
else if((o == labelHelpScreenAvs2YUV) && (e->type() == QEvent::MouseButtonPress))
|
else if((o == labelHelpScreenAvs2YUV) && (e->type() == QEvent::MouseButtonPress))
|
||||||
{
|
{
|
||||||
HelpDialog *helpScreen = new HelpDialog(this, true, m_x64supported);
|
HelpDialog *helpScreen = new HelpDialog(this, true, m_x64supported, m_use10BitEncoding);
|
||||||
helpScreen->exec();
|
helpScreen->exec();
|
||||||
X264_DELETE(helpScreen);
|
X264_DELETE(helpScreen);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class AddJobDialog : public QDialog, private Ui::AddJobDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AddJobDialog(QWidget *parent, OptionsModel *options, bool x64supported);
|
AddJobDialog(QWidget *parent, OptionsModel *options, bool x64supported, bool use10BitEncoding);
|
||||||
~AddJobDialog(void);
|
~AddJobDialog(void);
|
||||||
|
|
||||||
QString sourceFile(void);
|
QString sourceFile(void);
|
||||||
@ -51,6 +51,7 @@ protected:
|
|||||||
OptionsModel *m_defaults;
|
OptionsModel *m_defaults;
|
||||||
|
|
||||||
const bool m_x64supported;
|
const bool m_x64supported;
|
||||||
|
const bool m_use10BitEncoding;
|
||||||
|
|
||||||
QStringList m_types;
|
QStringList m_types;
|
||||||
QString m_initialDir_src;
|
QString m_initialDir_src;
|
||||||
|
@ -26,16 +26,19 @@
|
|||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
|
#define X264_BINARY(BIN_DIR, IS_10BIT, IS_X64) QString("%1/x264_%2_%3.exe").arg((BIN_DIR), ((IS_10BIT) ? "10bit" : "8bit"), ((IS_X64) ? "x64" : "x86"))
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Constructor & Destructor
|
// Constructor & Destructor
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
HelpDialog::HelpDialog(QWidget *parent, bool avs2yuv, bool x64supported)
|
HelpDialog::HelpDialog(QWidget *parent, bool avs2yuv, bool x64supported, bool use10BitEncoding)
|
||||||
:
|
:
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
m_appDir(QApplication::applicationDirPath()),
|
m_appDir(QApplication::applicationDirPath() + "/toolset"),
|
||||||
m_avs2yuv(avs2yuv),
|
m_avs2yuv(avs2yuv),
|
||||||
m_x64supported(x64supported),
|
m_x64supported(x64supported),
|
||||||
|
m_use10BitEncoding(use10BitEncoding),
|
||||||
m_process(new QProcess())
|
m_process(new QProcess())
|
||||||
{
|
{
|
||||||
//Init the dialog, from the .ui file
|
//Init the dialog, from the .ui file
|
||||||
@ -74,11 +77,11 @@ void HelpDialog::showEvent(QShowEvent *event)
|
|||||||
|
|
||||||
if(!m_avs2yuv)
|
if(!m_avs2yuv)
|
||||||
{
|
{
|
||||||
m_process->start(QString("%1/toolset/%2.exe").arg(m_appDir, m_x64supported ? "x264_x64" : "x264"), QStringList() << "--version");
|
m_process->start(X264_BINARY(m_appDir, m_use10BitEncoding, m_x64supported), QStringList() << "--version");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_process->start(QString("%1/toolset/%2.exe").arg(m_appDir, m_x64supported ? "avs2yuv_x64" : "avs2yuv"), QStringList());
|
m_process->start(QString("%1/%2.exe").arg(m_appDir, m_x64supported ? "avs2yuv_x64" : "avs2yuv_x86"), QStringList());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!m_process->waitForStarted())
|
if(!m_process->waitForStarted())
|
||||||
@ -123,7 +126,7 @@ void HelpDialog::finished(void)
|
|||||||
m_startAgain = false;
|
m_startAgain = false;
|
||||||
if(!m_avs2yuv)
|
if(!m_avs2yuv)
|
||||||
{
|
{
|
||||||
m_process->start(QString("%1/toolset/x264.exe").arg(m_appDir), QStringList() << "--fullhelp");
|
m_process->start(X264_BINARY(m_appDir, m_use10BitEncoding, m_x64supported), QStringList() << "--fullhelp");
|
||||||
plainTextEdit->appendPlainText("\n--------\n");
|
plainTextEdit->appendPlainText("\n--------\n");
|
||||||
|
|
||||||
if(!m_process->waitForStarted())
|
if(!m_process->waitForStarted())
|
||||||
|
@ -30,7 +30,7 @@ class HelpDialog : public QDialog, private Ui::HelpDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HelpDialog(QWidget *parent, bool avs2yuv, bool x64supported);
|
HelpDialog(QWidget *parent, bool avs2yuv, bool x64supported, bool use10BitEncoding);
|
||||||
~HelpDialog(void);
|
~HelpDialog(void);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@ -46,6 +46,7 @@ private:
|
|||||||
protected:
|
protected:
|
||||||
const bool m_avs2yuv;
|
const bool m_avs2yuv;
|
||||||
const bool m_x64supported;
|
const bool m_x64supported;
|
||||||
|
const bool m_use10BitEncoding;
|
||||||
|
|
||||||
virtual void showEvent(QShowEvent *event);
|
virtual void showEvent(QShowEvent *event);
|
||||||
virtual void closeEvent(QCloseEvent *e);
|
virtual void closeEvent(QCloseEvent *e);
|
||||||
|
@ -209,7 +209,7 @@ void MainWindow::addButtonPressed(const QString &filePathIn, const QString &file
|
|||||||
|
|
||||||
if(ok) *ok = false;
|
if(ok) *ok = false;
|
||||||
|
|
||||||
AddJobDialog *addDialog = new AddJobDialog(this, options ? options : m_options, m_cpuFeatures->x64);
|
AddJobDialog *addDialog = new AddJobDialog(this, options ? options : m_options, m_cpuFeatures->x64, m_preferences.use10BitEncoding);
|
||||||
addDialog->setRunImmediately(countRunningJobs() < (m_preferences.autoRunNextJob ? m_preferences.maxRunningJobCount : 1));
|
addDialog->setRunImmediately(countRunningJobs() < (m_preferences.autoRunNextJob ? m_preferences.maxRunningJobCount : 1));
|
||||||
|
|
||||||
if(options) addDialog->setWindowTitle(tr("Restart Job"));
|
if(options) addDialog->setWindowTitle(tr("Restart Job"));
|
||||||
@ -630,7 +630,7 @@ void MainWindow::shutdownComputer(void)
|
|||||||
*/
|
*/
|
||||||
void MainWindow::init(void)
|
void MainWindow::init(void)
|
||||||
{
|
{
|
||||||
static const char *binFiles = "x264_8bit_x86.exe:x264_8bit_x64.exe:x264_10bit_x86.exe:x264_10bit_x64.exe:avs2yuv.exe:avs2yuv_x64.exe";
|
static const char *binFiles = "x264_8bit_x86.exe:x264_8bit_x64.exe:x264_10bit_x86.exe:x264_10bit_x64.exe:avs2yuv_x86.exe:avs2yuv_x64.exe";
|
||||||
QStringList binaries = QString::fromLatin1(binFiles).split(":", QString::SkipEmptyParts);
|
QStringList binaries = QString::fromLatin1(binFiles).split(":", QString::SkipEmptyParts);
|
||||||
|
|
||||||
updateLabelPos();
|
updateLabelPos();
|
||||||
|
Loading…
Reference in New Issue
Block a user