Refactored "common" thread code into a separate base class. Make additional thread classes use the "common" base class.

This commit is contained in:
LoRd_MuldeR 2019-05-10 20:40:46 +02:00
parent 3c6316df82
commit df9b5afb68
17 changed files with 272 additions and 128 deletions

99
src/thread_abstract.cpp Normal file
View File

@ -0,0 +1,99 @@
///////////////////////////////////////////////////////////////////////////////
// Simple x264 Launcher
// Copyright (C) 2004-2019 LoRd_MuldeR <MuldeR2@GMX.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
#include "thread_abstract.h"
//MUtils
#include <MUtils/Global.h>
//Qt
#include <QDir>
#include <QElapsedTimer>
#include <QProcess>
//-------------------------------------
// Constructor
//-------------------------------------
AbstractThread::AbstractThread(void)
{
m_exception = false;
m_success = 0;
}
AbstractThread::~AbstractThread(void)
{
}
//-------------------------------------
// Thread entry point
//-------------------------------------
void AbstractThread::run(void)
{
m_exception = false;
m_success = 0;
runChecked1(this, m_success, &m_exception);
}
void AbstractThread::runChecked1(AbstractThread *const thread, volatile int &success, volatile bool *exception)
{
#if !defined(_DEBUG)
__try
{
return runChecked2(thread, success, exception);
}
__except(1)
{
*exception = true;
qWarning("Unhandled structured exception in worker thread !!!");
}
#else
return runChecked2(thread, success, exception);
#endif
}
void AbstractThread::runChecked2(AbstractThread *const thread, volatile int &success, volatile bool *exception)
{
#if !defined(_DEBUG)
try
{
success = thread->threadMain();
}
catch(const std::exception &e)
{
*exception = true;
qWarning("Worker thread raised an C++ exception: %s", e.what());
}
catch(char *const msg)
{
*exception = true;
qWarning("Worker thread raised an C++ exception: %s", msg);
}
catch(...)
{
*exception = true;
qWarning("Worker thread raised an C++ exception!");
}
#else
success = thread->threadMain();
#endif
}

51
src/thread_abstract.h Normal file
View File

@ -0,0 +1,51 @@
///////////////////////////////////////////////////////////////////////////////
// Simple x264 Launcher
// Copyright (C) 2004-2019 LoRd_MuldeR <MuldeR2@GMX.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
#pragma once
//Qt
#include <QThread>
class AbstractThread : public QThread
{
Q_OBJECT
public:
AbstractThread(void);
~AbstractThread(void);
bool getException(void) { return m_exception; }
int getSuccess(void) { return m_success; }
protected:
volatile int m_success;
volatile bool m_exception;
//Entry point
virtual void run(void);
//Error handling
static void runChecked1(AbstractThread *const thread, volatile int &success, volatile bool *exception);
static void runChecked2(AbstractThread *const thread, volatile int &success, volatile bool *exception);
//Thread main
virtual int threadMain(void) = 0;
};

View File

@ -86,13 +86,13 @@ private:
log("\nPROCESS ABORTED BY USER !!!"); \ log("\nPROCESS ABORTED BY USER !!!"); \
setStatus(JobStatus_Aborted); \ setStatus(JobStatus_Aborted); \
if(QFileInfo(m_outputFileName).exists() && (QFileInfo(m_outputFileName).size() == 0)) QFile::remove(m_outputFileName); \ if(QFileInfo(m_outputFileName).exists() && (QFileInfo(m_outputFileName).size() == 0)) QFile::remove(m_outputFileName); \
return; \ return 0; \
} \ } \
else if(!(OK_FLAG)) \ else if(!(OK_FLAG)) \
{ \ { \
setStatus(JobStatus_Failed); \ setStatus(JobStatus_Failed); \
if(QFileInfo(m_outputFileName).exists() && (QFileInfo(m_outputFileName).size() == 0)) QFile::remove(m_outputFileName); \ if(QFileInfo(m_outputFileName).exists() && (QFileInfo(m_outputFileName).size() == 0)) QFile::remove(m_outputFileName); \
return; \ return 0; \
} \ } \
} \ } \
while(0) while(0)
@ -168,18 +168,16 @@ EncodeThread::~EncodeThread(void)
void EncodeThread::run(void) void EncodeThread::run(void)
{ {
#if !defined(_DEBUG) m_progress = 0;
__try m_status = JobStatus_Starting;
AbstractThread::run();
if (m_exception)
{ {
checkedRun(); log(tr("UNHANDLED EXCEPTION ERROR IN THREAD !!!"));
setStatus(JobStatus_Failed);
} }
__except(1)
{
qWarning("STRUCTURED EXCEPTION ERROR IN ENCODE THREAD !!!");
}
#else
checkedRun();
#endif
if(m_jobObject) if(m_jobObject)
{ {
@ -188,40 +186,6 @@ void EncodeThread::run(void)
} }
} }
void EncodeThread::checkedRun(void)
{
m_progress = 0;
m_status = JobStatus_Starting;
try
{
try
{
ExecutionStateHandler executionStateHandler;
encode();
}
catch(const std::exception &e)
{
log(tr("EXCEPTION ERROR IN THREAD: ").append(QString::fromLatin1(e.what())));
setStatus(JobStatus_Failed);
}
catch(char *msg)
{
log(tr("EXCEPTION ERROR IN THREAD: ").append(QString::fromLatin1(msg)));
setStatus(JobStatus_Failed);
}
catch(...)
{
log(tr("UNHANDLED EXCEPTION ERROR IN THREAD !!!"));
setStatus(JobStatus_Failed);
}
}
catch(...)
{
MUtils::OS::fatal_exit(L"Unhandeled exception error in encode thread!");
}
}
void EncodeThread::start(Priority priority) void EncodeThread::start(Priority priority)
{ {
qDebug("Thread starting..."); qDebug("Thread starting...");
@ -230,14 +194,14 @@ void EncodeThread::start(Priority priority)
m_pause = false; m_pause = false;
while(m_semaphorePaused.tryAcquire(1, 0)); while(m_semaphorePaused.tryAcquire(1, 0));
QThread::start(priority); AbstractThread::start(priority);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Encode functions // Encode functions
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void EncodeThread::encode(void) int EncodeThread::threadMain(void)
{ {
QDateTime startTime = QDateTime::currentDateTime(); QDateTime startTime = QDateTime::currentDateTime();
@ -355,6 +319,8 @@ void EncodeThread::encode(void)
int timePassed = startTime.secsTo(QDateTime::currentDateTime()); int timePassed = startTime.secsTo(QDateTime::currentDateTime());
log(tr("Job finished at %1, %2. Process took %3 minutes, %4 seconds.").arg(QDate::currentDate().toString(Qt::ISODate), QTime::currentTime().toString(Qt::ISODate), QString::number(timePassed / 60), QString::number(timePassed % 60))); log(tr("Job finished at %1, %2. Process took %3 minutes, %4 seconds.").arg(QDate::currentDate().toString(Qt::ISODate), QTime::currentTime().toString(Qt::ISODate), QString::number(timePassed / 60), QString::number(timePassed % 60)));
setStatus(JobStatus_Completed); setStatus(JobStatus_Completed);
return 1; /*completed*/
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -21,6 +21,7 @@
#pragma once #pragma once
#include "thread_abstract.h"
#include "model_status.h" #include "model_status.h"
#include <QThread> #include <QThread>
@ -37,7 +38,7 @@ class JobObject;
class AbstractEncoder; class AbstractEncoder;
class AbstractSource; class AbstractSource;
class EncodeThread : public QThread class EncodeThread : public AbstractThread
{ {
Q_OBJECT Q_OBJECT
@ -100,10 +101,9 @@ protected:
//Entry point //Entry point
virtual void run(void); virtual void run(void);
virtual void checkedRun(void);
//Main encoding functions //Thread main
void encode(void); virtual int threadMain(void);
//Static functions //Static functions
static QString getPasslogFile(const QString &outputFile); static QString getPasslogFile(const QString &outputFile);

View File

@ -60,9 +60,14 @@ IPCThread_Recv::~IPCThread_Recv(void)
// Thread Main // Thread Main
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void IPCThread_Recv::run() void IPCThread_Recv::run(void)
{ {
setTerminationEnabled(true); setTerminationEnabled(true);
AbstractThread::run();
}
int IPCThread_Recv::threadMain(void)
{
QStringList params; QStringList params;
quint32 command, flags; quint32 command, flags;
@ -81,6 +86,8 @@ void IPCThread_Recv::run()
break; break;
} }
} }
return 1;
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -22,14 +22,14 @@
#pragma once #pragma once
#include <QThread> #include "thread_abstract.h"
namespace MUtils namespace MUtils
{ {
class IPCChannel; class IPCChannel;
} }
class IPCThread_Recv: public QThread class IPCThread_Recv: public AbstractThread
{ {
Q_OBJECT Q_OBJECT
@ -46,5 +46,9 @@ protected:
volatile bool m_stopFlag; volatile bool m_stopFlag;
MUtils::IPCChannel *const m_ipcChannel; MUtils::IPCChannel *const m_ipcChannel;
void run(); //Entry point
virtual void run(void);
//Thread main
virtual int threadMain(void);
}; };

View File

@ -55,9 +55,18 @@ IPCThread_Send::~IPCThread_Send(void)
{ {
} }
void IPCThread_Send::run() ////////////////////////////////////////////////////////////
// Thread Main
////////////////////////////////////////////////////////////
void IPCThread_Send::run(void)
{ {
setTerminationEnabled(true); setTerminationEnabled(true);
AbstractThread::run();
}
int IPCThread_Send::threadMain(void)
{
bool bSentFiles = false; bool bSentFiles = false;
const MUtils::OS::ArgumentMap &args = MUtils::OS::arguments(); const MUtils::OS::ArgumentMap &args = MUtils::OS::arguments();
@ -114,6 +123,8 @@ void IPCThread_Send::run()
qWarning("Failed to send IPC message!"); qWarning("Failed to send IPC message!");
} }
} }
return 1;
} }
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -22,14 +22,14 @@
#pragma once #pragma once
#include <QThread> #include "thread_abstract.h"
namespace MUtils namespace MUtils
{ {
class IPCChannel; class IPCChannel;
} }
class IPCThread_Send: public QThread class IPCThread_Send: public AbstractThread
{ {
Q_OBJECT Q_OBJECT
@ -37,7 +37,11 @@ public:
IPCThread_Send(MUtils::IPCChannel *const ipcChannel); IPCThread_Send(MUtils::IPCChannel *const ipcChannel);
~IPCThread_Send(void); ~IPCThread_Send(void);
void run(); //Entry point
virtual void run(void);
//Thread main
virtual int threadMain(void);
protected: protected:
MUtils::IPCChannel *const m_ipcChannel; MUtils::IPCChannel *const m_ipcChannel;

View File

@ -35,51 +35,12 @@
StarupThread::StarupThread(void) StarupThread::StarupThread(void)
{ {
m_exception = false;
m_success = 0;
} }
StarupThread::~StarupThread(void) StarupThread::~StarupThread(void)
{ {
} }
//-------------------------------------
// Thread entry point
//-------------------------------------
void StarupThread::run(void)
{
m_exception = false;
m_success = 0;
runChecked1(this, m_success, &m_exception);
}
void StarupThread::runChecked1(StarupThread *const thread, volatile int &success, volatile bool *exception)
{
__try
{
return runChecked2(thread, success, exception);
}
__except(1)
{
*exception = true;
qWarning("Unhandled exception error in startup thread !!!");
}
}
void StarupThread::runChecked2(StarupThread *const thread, volatile int &success, volatile bool *exception)
{
try
{
success = thread->threadMain();
}
catch(...)
{
*exception = true;
qWarning("Startup thread raised an C++ exception!");
}
}
//------------------------------------- //-------------------------------------
// Utility functions // Utility functions
//------------------------------------- //-------------------------------------

View File

@ -21,11 +21,12 @@
#pragma once #pragma once
#include "thread_abstract.h"
//Qt //Qt
#include <QThread>
#include <QStringList> #include <QStringList>
class StarupThread : public QThread class StarupThread : public AbstractThread
{ {
Q_OBJECT Q_OBJECT
@ -33,26 +34,9 @@ public:
StarupThread(void); StarupThread(void);
~StarupThread(void); ~StarupThread(void);
bool getException(void) { return m_exception; }
int getSuccess(void) { return m_success; }
protected slots: protected slots:
void start(Priority priority = InheritPriority) { QThread::start(priority); } void start(Priority priority = InheritPriority) { QThread::start(priority); }
protected: protected:
volatile int m_success;
volatile bool m_exception;
//Entry point
virtual void run(void);
//Error handling
static void runChecked1(StarupThread *const thread, volatile int &success, volatile bool *exception);
static void runChecked2(StarupThread *const thread, volatile int &success, volatile bool *exception);
//Thread main
virtual int threadMain(void) = 0;
//Utility functions
static QStringList runProcess(const QString &exePath, const QStringList &args, const QStringList *const extraPaths = NULL); static QStringList runProcess(const QString &exePath, const QStringList &args, const QStringList *const extraPaths = NULL);
}; };

View File

@ -26,7 +26,7 @@
#define VER_X264_MAJOR 2 #define VER_X264_MAJOR 2
#define VER_X264_MINOR 9 #define VER_X264_MINOR 9
#define VER_X264_PATCH 0 #define VER_X264_PATCH 0
#define VER_X264_BUILD 1156 #define VER_X264_BUILD 1157
#define VER_X264_PORTABLE_EDITION (0) #define VER_X264_PORTABLE_EDITION (0)

View File

@ -312,6 +312,14 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="src\thread_abstract.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp"</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp"</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild>
<ClInclude Include="tmp\x264_launcher\UIC_win_about.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_about.h" />
<ClInclude Include="tmp\x264_launcher\UIC_win_addJob.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_addJob.h" />
<ClInclude Include="tmp\x264_launcher\UIC_win_editor.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_editor.h" />
@ -471,6 +479,7 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<ClCompile Include="src\source_factory.cpp" /> <ClCompile Include="src\source_factory.cpp" />
<ClCompile Include="src\source_vapoursynth.cpp" /> <ClCompile Include="src\source_vapoursynth.cpp" />
<ClCompile Include="src\string_validator.cpp" /> <ClCompile Include="src\string_validator.cpp" />
<ClCompile Include="src\thread_abstract.cpp" />
<ClCompile Include="src\thread_avisynth.cpp" /> <ClCompile Include="src\thread_avisynth.cpp" />
<ClCompile Include="src\thread_binaries.cpp" /> <ClCompile Include="src\thread_binaries.cpp" />
<ClCompile Include="src\thread_encode.cpp" /> <ClCompile Include="src\thread_encode.cpp" />
@ -492,6 +501,7 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<ClCompile Include="tmp\x264_launcher\MOC_input_filter.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_input_filter.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_model_jobList.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_model_jobList.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_model_logFile.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_model_logFile.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_abstract.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_avisynth.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_avisynth.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_binaries.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_binaries.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_encode.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_encode.cpp" />

View File

@ -119,9 +119,6 @@
<ClInclude Include="src\encoder_nvencc.h"> <ClInclude Include="src\encoder_nvencc.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\thread_startup.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\main.cpp"> <ClCompile Include="src\main.cpp">
@ -292,6 +289,12 @@
<ClCompile Include="tmp\x264_launcher\MOC_thread_startup.cpp"> <ClCompile Include="tmp\x264_launcher\MOC_thread_startup.cpp">
<Filter>Generated Files</Filter> <Filter>Generated Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\thread_abstract.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tmp\x264_launcher\MOC_thread_abstract.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="src\win_main.h"> <CustomBuild Include="src\win_main.h">
@ -369,6 +372,12 @@
<CustomBuild Include="src\thread_binaries.h"> <CustomBuild Include="src\thread_binaries.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="src\thread_startup.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="src\thread_abstract.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="x264_launcher.rc"> <ResourceCompile Include="x264_launcher.rc">

View File

@ -312,6 +312,14 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="src\thread_abstract.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp"</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp"</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild>
<ClInclude Include="tmp\x264_launcher\UIC_win_about.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_about.h" />
<ClInclude Include="tmp\x264_launcher\UIC_win_addJob.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_addJob.h" />
<ClInclude Include="tmp\x264_launcher\UIC_win_editor.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_editor.h" />
@ -471,6 +479,7 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<ClCompile Include="src\source_factory.cpp" /> <ClCompile Include="src\source_factory.cpp" />
<ClCompile Include="src\source_vapoursynth.cpp" /> <ClCompile Include="src\source_vapoursynth.cpp" />
<ClCompile Include="src\string_validator.cpp" /> <ClCompile Include="src\string_validator.cpp" />
<ClCompile Include="src\thread_abstract.cpp" />
<ClCompile Include="src\thread_avisynth.cpp" /> <ClCompile Include="src\thread_avisynth.cpp" />
<ClCompile Include="src\thread_binaries.cpp" /> <ClCompile Include="src\thread_binaries.cpp" />
<ClCompile Include="src\thread_encode.cpp" /> <ClCompile Include="src\thread_encode.cpp" />
@ -492,6 +501,7 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<ClCompile Include="tmp\x264_launcher\MOC_input_filter.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_input_filter.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_model_jobList.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_model_jobList.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_model_logFile.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_model_logFile.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_abstract.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_avisynth.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_avisynth.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_binaries.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_binaries.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_encode.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_encode.cpp" />

View File

@ -119,9 +119,6 @@
<ClInclude Include="src\encoder_nvencc.h"> <ClInclude Include="src\encoder_nvencc.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\thread_startup.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\main.cpp"> <ClCompile Include="src\main.cpp">
@ -292,6 +289,12 @@
<ClCompile Include="tmp\x264_launcher\MOC_thread_startup.cpp"> <ClCompile Include="tmp\x264_launcher\MOC_thread_startup.cpp">
<Filter>Generated Files</Filter> <Filter>Generated Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\thread_abstract.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tmp\x264_launcher\MOC_thread_abstract.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="src\win_main.h"> <CustomBuild Include="src\win_main.h">
@ -369,6 +372,12 @@
<CustomBuild Include="src\thread_binaries.h"> <CustomBuild Include="src\thread_binaries.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="src\thread_startup.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="src\thread_abstract.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="x264_launcher.rc"> <ResourceCompile Include="x264_launcher.rc">

View File

@ -313,6 +313,14 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild> </CustomBuild>
<CustomBuild Include="src\thread_abstract.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp"</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC "$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp"</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\MOC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild>
<ClInclude Include="tmp\x264_launcher\UIC_win_about.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_about.h" />
<ClInclude Include="tmp\x264_launcher\UIC_win_addJob.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_addJob.h" />
<ClInclude Include="tmp\x264_launcher\UIC_win_editor.h" /> <ClInclude Include="tmp\x264_launcher\UIC_win_editor.h" />
@ -472,6 +480,7 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<ClCompile Include="src\source_factory.cpp" /> <ClCompile Include="src\source_factory.cpp" />
<ClCompile Include="src\source_vapoursynth.cpp" /> <ClCompile Include="src\source_vapoursynth.cpp" />
<ClCompile Include="src\string_validator.cpp" /> <ClCompile Include="src\string_validator.cpp" />
<ClCompile Include="src\thread_abstract.cpp" />
<ClCompile Include="src\thread_avisynth.cpp" /> <ClCompile Include="src\thread_avisynth.cpp" />
<ClCompile Include="src\thread_binaries.cpp" /> <ClCompile Include="src\thread_binaries.cpp" />
<ClCompile Include="src\thread_encode.cpp" /> <ClCompile Include="src\thread_encode.cpp" />
@ -493,6 +502,7 @@ copy /Y "$(ProjectDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\im
<ClCompile Include="tmp\x264_launcher\MOC_input_filter.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_input_filter.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_model_jobList.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_model_jobList.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_model_logFile.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_model_logFile.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_abstract.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_avisynth.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_avisynth.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_binaries.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_binaries.cpp" />
<ClCompile Include="tmp\x264_launcher\MOC_thread_encode.cpp" /> <ClCompile Include="tmp\x264_launcher\MOC_thread_encode.cpp" />

View File

@ -119,9 +119,6 @@
<ClInclude Include="src\encoder_nvencc.h"> <ClInclude Include="src\encoder_nvencc.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\thread_startup.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\main.cpp"> <ClCompile Include="src\main.cpp">
@ -292,6 +289,12 @@
<ClCompile Include="tmp\x264_launcher\MOC_thread_startup.cpp"> <ClCompile Include="tmp\x264_launcher\MOC_thread_startup.cpp">
<Filter>Generated Files</Filter> <Filter>Generated Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="src\thread_abstract.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tmp\x264_launcher\MOC_thread_abstract.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="src\win_main.h"> <CustomBuild Include="src\win_main.h">
@ -369,6 +372,12 @@
<CustomBuild Include="src\thread_binaries.h"> <CustomBuild Include="src\thread_binaries.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="src\thread_startup.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="src\thread_abstract.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="x264_launcher.rc"> <ResourceCompile Include="x264_launcher.rc">