OSDN Git Service

Updated Monkey's Audio binary to v4.11 (2013-01-20), including STDERR flush fix.
[lamexp/LameXP.git] / src / Thread_FileAnalyzer.h
index aa47346..d98c2cf 100644 (file)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 // LameXP - Audio Encoder Front-End
-// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
+// Copyright (C) 2004-2013 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 <QStringList>
 
 class AudioFileModel;
+class QFile;
+class QDir;
+class QFileInfo;
+class LockedFile;
 
 ////////////////////////////////////////////////////////////
 // Splash Thread
@@ -38,36 +42,37 @@ class FileAnalyzer: public QThread
 
 public:
        FileAnalyzer(const QStringList &inputFiles);
+       ~FileAnalyzer(void);
        void run();
        bool getSuccess(void) { return !isRunning() && m_bSuccess; }
+
        unsigned int filesAccepted(void);
        unsigned int filesRejected(void);
        unsigned int filesDenied(void);
+       unsigned int filesDummyCDDA(void);
+       unsigned int filesCueSheet(void);
 
 signals:
        void fileSelected(const QString &fileName);
        void fileAnalyzed(const AudioFileModel &file);
+       void progressValChanged(unsigned int);
+       void progressMaxChanged(unsigned int);
 
-private:
-       enum section_t
-       {
-               sectionGeneral,
-               sectionAudio,
-               sectionOther
-       };
+public slots:
+       void abortProcess(void) { m_abortFlag = true; }
 
-       const AudioFileModel analyzeFile(const QString &filePath);
-       void updateInfo(AudioFileModel &audioFile, const QString &key, const QString &value);
-       void updateSection(const QString &section);
-       unsigned int parseYear(const QString &str);
-       unsigned int parseDuration(const QString &str);
+private:
+       const AudioFileModel analyzeFile(const QString &filePath, int *type);
+       bool createTemplate(void);
 
        QStringList m_inputFiles;
-       const QString m_mediaInfoBin_x86;
-       const QString m_mediaInfoBin_x64;
-       section_t m_currentSection;
-       unsigned int m_filesAccepted;
-       unsigned int m_filesRejected;
-       unsigned int m_filesDenied;
+       LockedFile *m_templateFile;
+       
+       volatile bool m_abortFlag;
+
+       static const char *g_tags_gen[];
+       static const char *g_tags_aud[];
+
+       bool m_bAborted;
        bool m_bSuccess;
 };