OSDN Git Service

Bump version.
[x264-launcher/x264-launcher.git] / src / encoder_abstract.cpp
index e835efb..179c9ac 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // Simple x264 Launcher
-// Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2016 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
 #include <QLocale>
 
 // ------------------------------------------------------------
-// Helper Macros
-// ------------------------------------------------------------
-
-#define APPEND_AND_CLEAR(LIST, STR) do \
-{ \
-       if(!((STR).isEmpty())) \
-       { \
-               (LIST) << (STR); \
-               (STR).clear(); \
-       } \
-} \
-while(0)
-
-// ------------------------------------------------------------
 // Constructor & Destructor
 // ------------------------------------------------------------
 
@@ -264,38 +250,6 @@ bool AbstractEncoder::runEncodingPass(AbstractSource* pipedSource, const QString
 // Utilities
 // ------------------------------------------------------------
 
-QStringList AbstractEncoder::splitParams(const QString &params, const QString &sourceFile, const QString &outputFile)
-{
-       QStringList list; 
-       bool ignoreWhitespaces = false;
-       QString temp;
-
-       for(int i = 0; i < params.length(); i++)
-       {
-               const QChar c = params.at(i);
-
-               if(c == QChar::fromLatin1('"'))
-               {
-                       ignoreWhitespaces = (!ignoreWhitespaces);
-                       continue;
-               }
-               else if((!ignoreWhitespaces) && (c == QChar::fromLatin1(' ')))
-               {
-                       APPEND_AND_CLEAR(list, temp);
-                       continue;
-               }
-               
-               temp.append(c);
-       }
-       
-       APPEND_AND_CLEAR(list, temp);
-
-       list.replaceInStrings("$(INPUT)",  QDir::toNativeSeparators(sourceFile), Qt::CaseInsensitive);
-       list.replaceInStrings("$(OUTPUT)", QDir::toNativeSeparators(outputFile), Qt::CaseInsensitive);
-
-       return list;
-}
-
 double AbstractEncoder::estimateSize(const QString &fileName, const double &progress)
 {
        double estimatedSize = 0.0;