diff --git a/LameXP_VS2010.vcxproj b/LameXP_VS2010.vcxproj index 38bb328e..ab750f43 100644 --- a/LameXP_VS2010.vcxproj +++ b/LameXP_VS2010.vcxproj @@ -452,7 +452,13 @@ del "$(TargetDir)imageformats\q???d4.dll" - + + true + true + true + true + true + diff --git a/res/tools/mediainfo.i386.exe b/res/tools/mediainfo.i386.exe index a067fbc5..90e0dc7f 100644 Binary files a/res/tools/mediainfo.i386.exe and b/res/tools/mediainfo.i386.exe differ diff --git a/res/tools/mediainfo.x64.exe b/res/tools/mediainfo.x64.exe index a71b760a..594024e8 100644 Binary files a/res/tools/mediainfo.x64.exe and b/res/tools/mediainfo.x64.exe differ diff --git a/src/Config.h b/src/Config.h index 4bd863ad..23e7606b 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 5 #define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_PATCH 12 -#define VER_LAMEXP_BUILD 1067 +#define VER_LAMEXP_BUILD 1068 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Model_AudioFile.cpp b/src/Model_AudioFile.cpp index 5f106f94..2e987a94 100644 --- a/src/Model_AudioFile.cpp +++ b/src/Model_AudioFile.cpp @@ -50,6 +50,7 @@ AudioFileModel::AudioFileModel(const AudioFileModel &model, bool copyMetaInfo) setFormatAudioType(model.m_formatAudioType); setFormatAudioProfile(model.m_formatAudioProfile); setFormatAudioVersion(model.m_formatAudioVersion); + setFormatAudioEncodeLib(model.m_formatAudioEncodeLib); setFormatAudioSamplerate(model.m_formatAudioSamplerate); setFormatAudioChannels(model.m_formatAudioChannels); setFormatAudioBitdepth(model.m_formatAudioBitdepth); @@ -88,6 +89,7 @@ AudioFileModel &AudioFileModel::operator=(const AudioFileModel &model) setFormatAudioType(model.m_formatAudioType); setFormatAudioProfile(model.m_formatAudioProfile); setFormatAudioVersion(model.m_formatAudioVersion); + setFormatAudioEncodeLib(model.m_formatAudioEncodeLib); setFormatAudioSamplerate(model.m_formatAudioSamplerate); setFormatAudioChannels(model.m_formatAudioChannels); setFormatAudioBitdepth(model.m_formatAudioBitdepth); @@ -124,6 +126,7 @@ void AudioFileModel::resetAll(void) m_formatAudioType.clear(); m_formatAudioProfile.clear(); m_formatAudioVersion.clear(); + m_formatAudioEncodeLib.clear(); m_formatAudioSamplerate = 0; m_formatAudioChannels = 0; @@ -328,6 +331,10 @@ const QString AudioFileModel::formatAudioCompressInfo(void) const break; } } + if(!m_formatAudioEncodeLib.isEmpty()) + { + info.append(QString(", %1: %2").arg(tr("Encoder"), m_formatAudioEncodeLib)); + } return info; } else @@ -420,6 +427,11 @@ void AudioFileModel::setFormatAudioVersion(const QString &version) m_formatAudioVersion = version; } +void AudioFileModel::setFormatAudioEncodeLib(const QString &encodeLib) +{ + m_formatAudioEncodeLib = encodeLib; +} + void AudioFileModel::setFormatAudioSamplerate(unsigned int samplerate) { m_formatAudioSamplerate = samplerate; diff --git a/src/Model_AudioFile.h b/src/Model_AudioFile.h index 026f7df9..10376168 100644 --- a/src/Model_AudioFile.h +++ b/src/Model_AudioFile.h @@ -97,6 +97,7 @@ public: void setFormatAudioType(const QString &type); void setFormatAudioProfile(const QString &profile); void setFormatAudioVersion(const QString &version); + void setFormatAudioEncodeLib(const QString &encodeLib); void setFormatAudioSamplerate(unsigned int samplerate); void setFormatAudioChannels(unsigned int channels); void setFormatAudioBitdepth(unsigned int bitdepth); @@ -122,6 +123,7 @@ private: QString m_formatAudioType; QString m_formatAudioProfile; QString m_formatAudioVersion; + QString m_formatAudioEncodeLib; unsigned int m_formatAudioSamplerate; unsigned int m_formatAudioChannels; unsigned int m_formatAudioBitdepth; diff --git a/src/Thread_FileAnalyzer.cpp b/src/Thread_FileAnalyzer.cpp index 60b38366..f9cd516a 100644 --- a/src/Thread_FileAnalyzer.cpp +++ b/src/Thread_FileAnalyzer.cpp @@ -99,6 +99,7 @@ const char *FileAnalyzer::g_tags_aud[] = "BitDepth", "BitRate", "BitRate_Mode", + "Encoded_Library", NULL }; diff --git a/src/Thread_FileAnalyzer_Task.cpp b/src/Thread_FileAnalyzer_Task.cpp index 6297349a..2b407527 100644 --- a/src/Thread_FileAnalyzer_Task.cpp +++ b/src/Thread_FileAnalyzer_Task.cpp @@ -173,27 +173,6 @@ void AnalyzeTask::run_ex(void) qWarning("Cue Sheet file detected, skipping!"); s_filesCueSheet++; } - else if((!QFileInfo(currentFile).suffix().compare("opus", Qt::CaseInsensitive)) || (!QFileInfo(currentFile).suffix().compare("ogg", Qt::CaseInsensitive))) - { - qDebug("Found a potential Opus audio file, investigating..."); - QFile opusTest(currentFile); - if(analyzeOpusFile(currentFile, file)) - { - qDebug("Accepted Opus file: %s", file.filePath().toUtf8().constData()); - QWriteLocker lock(&s_lock); - s_filesAccepted++; - s_recentlyAdded.insert(file.filePath().toLower()); - lock.unlock(); - waitForPreviousThreads(); - emit fileAnalyzed(file); - } - else - { - QWriteLocker lock(&s_lock); - qDebug("Rejected Opus file: %s", file.filePath().toUtf8().constData()); - s_filesRejected++; - } - } else if(!QFileInfo(currentFile).suffix().compare("avs", Qt::CaseInsensitive)) { qDebug("Found a potential Avisynth script, investigating..."); @@ -535,6 +514,10 @@ void AnalyzeTask::updateInfo(AudioFileModel &audioFile, bool *skipNext, unsigned if(!value.compare("CBR", Qt::CaseInsensitive)) audioFile.setFormatAudioBitrateMode(AudioFileModel::BitrateModeConstant); if(!value.compare("VBR", Qt::CaseInsensitive)) audioFile.setFormatAudioBitrateMode(AudioFileModel::BitrateModeVariable); } + else if(IS_KEY("Aud_Encoded_Library")) + { + audioFile.setFormatAudioEncodeLib(value); + } else { qWarning("Unknown key '%s' with value '%s' found!", key.toUtf8().constData(), value.toUtf8().constData()); @@ -592,28 +575,6 @@ void AnalyzeTask::retrieveCover(AudioFileModel &audioFile, cover_t coverType, co } } -bool AnalyzeTask::analyzeOpusFile(const QString &filePath, AudioFileModel &info) -{ - QFile opusFile(filePath); - if(opusFile.open(QIODevice::ReadOnly)) - { - QByteArray data = opusFile.peek(1024); - int idx1 = data.indexOf(QString::fromAscii("OggS")); - int idx2 = data.indexOf(QString::fromAscii("OpusHead")); - if((idx1 >= 0) && (idx2 > idx1)) - { - info.setFormatContainerType("OGG"); - info.setFormatAudioType("Opus"); - opusFile.close(); - return true; - } - opusFile.close(); - return false; - } - - return false; -} - bool AnalyzeTask::analyzeAvisynthFile(const QString &filePath, AudioFileModel &info) { QProcess process; diff --git a/src/Thread_FileAnalyzer_Task.h b/src/Thread_FileAnalyzer_Task.h index 49887f6a..68975209 100644 --- a/src/Thread_FileAnalyzer_Task.h +++ b/src/Thread_FileAnalyzer_Task.h @@ -90,7 +90,6 @@ private: bool checkFile_CDDA(QFile &file); void retrieveCover(AudioFileModel &audioFile, cover_t coverType, const QByteArray &coverData); bool analyzeAvisynthFile(const QString &filePath, AudioFileModel &info); - bool analyzeOpusFile(const QString &filePath, AudioFileModel &info); void waitForPreviousThreads(void); const unsigned __int64 m_threadIdx; diff --git a/src/Tools.h b/src/Tools.h index ba94e817..a249520a 100644 --- a/src/Tools.h +++ b/src/Tools.h @@ -65,8 +65,8 @@ g_lamexp_tools[] = {"3fd15a6b5b0120794650f1dcd0c35f147cc21576e78f17425288bfacbad0b14696186739", CPU_TYPE_ALL_GEN, "lame.i386.exe", 3995}, {"069a79d843939a65d8578f51b6acd09de95d44362c6a9c74e92a6e73ba40aea07916f7c4", CPU_TYPE_ALL_SSE, "lame.sse2.exe", 3995}, {"d4d806fc3d0a36ef357ea43b870c7e46de9c18be9920f451314d72d02ba0fe4f7c867d9c", CPU_TYPE_ALL_ALL, "mac.exe", 411}, - {"a2aec43c15c6286cfbff9102deeea32dc2e357aa435f1a012f6d18bb91ffdbf328595946", CPU_TYPE_X86_ALL, "mediainfo.i386.exe", 758}, - {"7265211b9380b8c0171181596a1aa13dfbce32ad701c22db6d5f9a9e5449c8a13ab407b1", CPU_TYPE_X64_ALL, "mediainfo.x64.exe", 758}, + {"ca9804ecbe15a760a499943327ae105755cfc946648ea76d197782029f2fb008543680c9", CPU_TYPE_X86_ALL, "mediainfo.i386.exe", 758}, + {"233d0f25cc224f8174d953353ac1a4a09fd0e22ef1ff8f6323ab4980d6d33fbea179022f", CPU_TYPE_X64_ALL, "mediainfo.x64.exe", 758}, {"ed49bfeb5113e8eca4f2f5c5c9359f6edeecf457cff8511178902c7d792380eaa578d9bc", CPU_TYPE_ALL_ALL, "mpcdec.exe", 475}, {"adea5dd78d54abc9031a48a6ebb94f3375da87a7340e1f99f4a3660fbb6d163e144fe95b", CPU_TYPE_ALL_ALL, "mpg123.exe", 1143}, {"0c781805dda931c529bd16069215f616a7a4c5e5c2dfb6b75fe85d52b20511830693e528", CPU_TYPE_ALL_ALL, "oggdec.exe", UINT_MAX},