Allow "--frames" and "--fps" as custom parameters, because they might be useful when FFMS2 input is used. We will discard those parameters later, iff Avisynth/Pipe input is used.
This commit is contained in:
parent
3f8ed91da3
commit
f4549d74ef
@ -1 +1 @@
|
|||||||
But the binary tools (x264.exe, avs2yuv.exe, etc.) here!
|
Put the binary tools (x264.exe, avs2yuv.exe, etc.) here!
|
||||||
|
@ -43,7 +43,7 @@ QMutex EncodeThread::m_mutex_startProcess;
|
|||||||
/*
|
/*
|
||||||
* Macros
|
* Macros
|
||||||
*/
|
*/
|
||||||
#define CHECK_STATUS(ABORT_FLAG, OK_FLAG) \
|
#define CHECK_STATUS(ABORT_FLAG, OK_FLAG) do \
|
||||||
{ \
|
{ \
|
||||||
if(ABORT_FLAG) \
|
if(ABORT_FLAG) \
|
||||||
{ \
|
{ \
|
||||||
@ -60,16 +60,36 @@ QMutex EncodeThread::m_mutex_startProcess;
|
|||||||
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; \
|
||||||
} \
|
} \
|
||||||
}
|
} \
|
||||||
|
while(0)
|
||||||
|
|
||||||
#define APPEND_AND_CLEAR(LIST, STR) \
|
#define APPEND_AND_CLEAR(LIST, STR) do \
|
||||||
{ \
|
{ \
|
||||||
if(!((STR).isEmpty())) \
|
if(!((STR).isEmpty())) \
|
||||||
{ \
|
{ \
|
||||||
(LIST) << (STR); \
|
(LIST) << (STR); \
|
||||||
(STR).clear(); \
|
(STR).clear(); \
|
||||||
} \
|
} \
|
||||||
}
|
} \
|
||||||
|
while(0)
|
||||||
|
|
||||||
|
#define REMOVE_CUSTOM_ARG(LIST, ITER, FLAG, PARAM) do \
|
||||||
|
{ \
|
||||||
|
if(ITER != LIST.end()) \
|
||||||
|
{ \
|
||||||
|
if((*ITER).compare(PARAM, Qt::CaseInsensitive) == 0) \
|
||||||
|
{ \
|
||||||
|
log(tr("WARNING: Custom parameter \"" PARAM "\" will be ignored in Pipe'd mode!\n")); \
|
||||||
|
ITER = LIST.erase(ITER); \
|
||||||
|
if(ITER != LIST.end()) \
|
||||||
|
{ \
|
||||||
|
if(!((*ITER).startsWith("--", Qt::CaseInsensitive))) ITER = LIST.erase(ITER); \
|
||||||
|
} \
|
||||||
|
FLAG = true; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
while(0)
|
||||||
|
|
||||||
#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"))
|
#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"))
|
||||||
|
|
||||||
@ -571,7 +591,19 @@ QStringList EncodeThread::buildCommandLine(bool usePipe, bool use10Bit, unsigned
|
|||||||
|
|
||||||
if(!m_options->customX264().isEmpty())
|
if(!m_options->customX264().isEmpty())
|
||||||
{
|
{
|
||||||
cmdLine.append(splitParams(m_options->customX264()));
|
QStringList customArgs = splitParams(m_options->customX264());
|
||||||
|
if(usePipe)
|
||||||
|
{
|
||||||
|
QStringList::iterator i = customArgs.begin();
|
||||||
|
while(i != customArgs.end())
|
||||||
|
{
|
||||||
|
bool bModified = false;
|
||||||
|
REMOVE_CUSTOM_ARG(customArgs, i, bModified, "--fps");
|
||||||
|
REMOVE_CUSTOM_ARG(customArgs, i, bModified, "--frames");
|
||||||
|
if(!bModified) i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cmdLine.append(customArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdLine << "--output" << pathToLocal(QDir::toNativeSeparators(m_outputFileName), true);
|
cmdLine << "--output" << pathToLocal(QDir::toNativeSeparators(m_outputFileName), true);
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
#define VER_X264_MAJOR 2
|
#define VER_X264_MAJOR 2
|
||||||
#define VER_X264_MINOR 0
|
#define VER_X264_MINOR 0
|
||||||
#define VER_X264_PATCH 5
|
#define VER_X264_PATCH 6
|
||||||
#define VER_X264_BUILD 340
|
#define VER_X264_BUILD 354
|
||||||
|
|
||||||
#define VER_X264_MINIMUM_REV 2189
|
#define VER_X264_MINIMUM_REV 2209
|
||||||
#define VER_X264_CURRENT_API 124
|
#define VER_X264_CURRENT_API 128
|
||||||
#define VER_X264_AVS2YUV_VER 242
|
#define VER_X264_AVS2YUV_VER 242
|
||||||
|
|
||||||
#define VER_X264_PRE_RELEASE (0)
|
#define VER_X264_PRE_RELEASE (0)
|
||||||
|
@ -147,7 +147,7 @@ public:
|
|||||||
|
|
||||||
virtual State validate(QString &input, int &pos) const
|
virtual State validate(QString &input, int &pos) const
|
||||||
{
|
{
|
||||||
static const char* p[] = {"B", "o", "h", "p", "q", "fps", "frames", "preset", "tune", "profile",
|
static const char* p[] = {"B", "o", "h", "p", "q", /*"fps", "frames",*/ "preset", "tune", "profile",
|
||||||
"stdin", "crf", "bitrate", "qp", "pass", "stats", "output", "help","quiet", NULL};
|
"stdin", "crf", "bitrate", "qp", "pass", "stats", "output", "help","quiet", NULL};
|
||||||
|
|
||||||
bool invalid = false;
|
bool invalid = false;
|
||||||
|
@ -1229,4 +1229,3 @@ double MainWindow::detectAvisynthVersion(QLibrary *avsLib, DWORD *errorCode)
|
|||||||
|
|
||||||
return version_number;
|
return version_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ REM // Set Paths
|
|||||||
REM ///////////////////////////////////////////////////////////////////////////
|
REM ///////////////////////////////////////////////////////////////////////////
|
||||||
set "MSVC_PATH=C:\Program Files\Microsoft Visual Studio 10.0\VC"
|
set "MSVC_PATH=C:\Program Files\Microsoft Visual Studio 10.0\VC"
|
||||||
set "NSIS_PATH=C:\Program Files\NSIS\Unicode"
|
set "NSIS_PATH=C:\Program Files\NSIS\Unicode"
|
||||||
set "QTVC_PATH=C:\MuldeR\Qt\4.8.0"
|
set "QTVC_PATH=C:\MuldeR\Qt\4.8.2"
|
||||||
set "UPX3_PATH=C:\Program Files\UPX"
|
set "UPX3_PATH=C:\Program Files\UPX"
|
||||||
|
|
||||||
REM ###############################################
|
REM ###############################################
|
||||||
|
Loading…
Reference in New Issue
Block a user