OSDN Git Service

Show warning when NVidia encoder API (NVENCODEAPI.DLL) is *not* available.
authorlordmulder <mulder2@gmx.de>
Sun, 8 May 2016 19:52:46 +0000 (21:52 +0200)
committerlordmulder <mulder2@gmx.de>
Sun, 8 May 2016 19:52:46 +0000 (21:52 +0200)
src/encoder_nvenc.cpp

index 11d39c0..e19035f 100644 (file)
@@ -390,6 +390,7 @@ void NVEncEncoder::runEncodingPass_init(QList<QRegExp*> &patterns)
 {
        patterns << new QRegExp("^(\\d+) frames:");
        patterns << new QRegExp("Selected\\s+codec\\s+is\\s+not\\s+supported", Qt::CaseInsensitive);
+       patterns << new QRegExp("nvEncodeAPI.dll\\s+does\\s+not\\s+exists\\s+in\\s+your\\s+system", Qt::CaseInsensitive);
 }
 
 void NVEncEncoder::runEncodingPass_parseLine(const QString &line, QList<QRegExp*> &patterns, const ClipInfo &clipInfo, const int &pass, double &last_progress, double &size_estimate)
@@ -401,7 +402,11 @@ void NVEncEncoder::runEncodingPass_parseLine(const QString &line, QList<QRegExp*
        }
        else if ((offset = patterns[1]->lastIndexIn(line)) >= 0)
        {
-               log(QString("YOUR HARDWARE DOES *NOT* SUPPORT THE '%1' CODEC !!!\n").arg(s_nvencEncoderInfo.variantToString(m_options->encVariant())));
+               log(QString("ERROR: YOUR HARDWARE DOES *NOT* SUPPORT THE '%1' CODEC !!!\n").arg(s_nvencEncoderInfo.variantToString(m_options->encVariant())));
+       }
+       else if ((offset = patterns[2]->lastIndexIn(line)) >= 0)
+       {
+               log("ERROR: NVIDIA ENCODER API (NVENCODEAPI.DLL) IS *NOT* AVAILABLE !!!\n");
        }
        else if(!line.isEmpty())
        {