diff --git a/.gitignore b/.gitignore index 846a818..b6a6f97 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /*.suo /*.user /*.opensdf +*.db diff --git a/MediaInfoXP.qrc b/MediaInfoXP.qrc index ac14737..50c12d5 100644 --- a/MediaInfoXP.qrc +++ b/MediaInfoXP.qrc @@ -16,6 +16,7 @@ res/ico_shellext.png res/loading.png res/logo.png - res/MediaInfo.i686.exe + res/MediaInfo.x86-i686.exe + res/MediaInfo.x64-sse2.exe diff --git a/doc/Changelog.txt b/doc/Changelog.txt index b2a5094..780f3bf 100644 --- a/doc/Changelog.txt +++ b/doc/Changelog.txt @@ -13,6 +13,35 @@ Known bugs - Others? https://sourceforge.net/p/mediainfo/_list/tickets +Version 0.7.85, 2016-04-29 +-------------- ++ FFV1: ScanType and ScanOrder ++ Detection of Omneon VBI and move of the VBI track from Video part to Others part ++ N19/STL: Support of etection of less standard frame rates (23.976 and 29.970) ++ Teletext in MPEG-TS: Teletext not subtitle moved to "Other" part ++ Teletext in MPEG-TS: display of CodecID and timestamp of first frame +x Teletext in MXF: some IDs were wrong (when there are more than one Teletext service) +x MPEG-4/MOV: default of raw audio to Signed in case of stsd atom version <2 +x MPEG Video: some CEA-608/708 captions were not correctly detected due to some packets discarded by the parser with interlaced content +x MPEG-4/MOV: Dolby E with 2 or more audio services were not correctly reported + +Version 0.7.84, 2016-03-31 +-------------- +x #I122, MPEG-4/MOV: Crash if mdhd timescale is 0 +x MPEG-4/MOV: Infinite loop if malformed stsc / stsz (detected by fuzzing) +x MPEG-TS: some DVB Subtitles were not detected +x HLS: better handling of media playlists having EXT-X-BYTERANGE + +Version 0.7.83, 2016-02-29 +-------------- ++ HEVC: Maximum Content Light Level (MaxCLL) and Maximum Frame-Average Light Level (MaxFALL), metadata mandated by CEA-861.3 for HDR support ++ HEVC: Mastering display color primaries and luminance (based on SMPTE ST 2084), metadata mandated by CEA-861.3 for HDR support ++ HEVC: SMPTE ST 2048 and SMPTE ST 428-1 transfer characteristics ++ HEVC: Chroma subsampling location (indication of the location type described in the HEVC spec) ++ MPEG-TS: ATSC Modulation Mode (Analog, SCTE_mode_1 aka 64-QAM, SCTE_mode_2 aka 256-QAM, 8-VSB, 16-VSB) ++ #B981, MP4: support of buggy file having "hint" SubType +x HLS: better handling of media playlists having EXT-X-BYTERANGE + Version 0.7.82, 2016-01-27 -------------- + Matroska: CRC-32 validation diff --git a/doc/README.htm b/doc/README.htm new file mode 100644 index 0000000..588f20f --- /dev/null +++ b/doc/README.htm @@ -0,0 +1,220 @@ + + +README + + + + + +

MediaInfoLib README

+

MediaInfo(Lib) is a convenient unified display of the most relevant technical and tag data for video and audio files.

+

Build Status

+

MediaInfoLib - https://github.com/MediaArea/MediaInfoLib
+Copyright (c) MediaArea.net SARL. All Rights Reserved.

+

This program is freeware under BSD-2-Clause license conditions.
+See License.html for more information

+ + + + + + \ No newline at end of file diff --git a/doc/README.svg b/doc/README.svg new file mode 100644 index 0000000..738e29e --- /dev/null +++ b/doc/README.svg @@ -0,0 +1 @@ +buildbuildpassingpassing \ No newline at end of file diff --git a/doc/Readme.txt b/doc/Readme.txt deleted file mode 100644 index aa56546..0000000 --- a/doc/Readme.txt +++ /dev/null @@ -1,38 +0,0 @@ -What is MediaInfo? - - MediaInfo is a convenient unified display of the most relevant technical and tag data for video and audio files. - - -The MediaInfo data display includes: - - Container: format, profile, commercial name of the format, duration, overall bit rate, writing application and library, title, author, director, album, track number, date, duration... - Video: format, codec id, aspect, frame rate, bit rate, color space, chroma subsampling, bit depth, scan type, scan order... - Audio: format, codec id, sample rate, channels, bit depth, language, bit rate... - Text: format, codec id, language of subtitle... - Chapters: count of chapters, list of chapters... - - -MediaInfo analyticals include: - - Container: MPEG-4, QuickTime, Matroska, AVI, MPEG-PS (including unprotected DVD), MPEG-TS (including unprotected Blu-ray), MXF, GXF, LXF, WMV, FLV, Real... - Tags: Id3v1, Id3v2, Vorbis comments, APE tags... - Video: MPEG-1/2 Video, H.263, MPEG-4 Visual (including DivX, XviD), H.264/AVC, Dirac... - Audio: MPEG Audio (including MP3), AC3, DTS, AAC, Dolby E, AES3, FLAC... - Subtitles: CEA-608, CEA-708, DTVCC, SCTE-20, SCTE-128, ATSC/53, CDP, DVB Subtitle, Teletext, SRT, SSA, ASS, SAMI... - - -MediaInfo features include: - - Read many video and audio file formats - View information in different formats (text, sheet, tree, HTML...) - Customise these viewing formats - Export information as text, CSV, HTML... - Graphical user interface, command line interface, or library (.dll/.so/.dylib) versions available - Integrate with the shell (drag 'n' drop, and Context menu) - Internationalisation: display any language on any operating system - Localisation capability (for which volunteers are needed - please contact me!) - - -License: - - It is open-source software - with one exception for Mac App Store GUI - which means that it is free of charge to the end user and developers have freedom to study, to improve and to redistribute the program (BSD license). diff --git a/res/MediaInfo.x64-sse2.exe b/res/MediaInfo.x64-sse2.exe new file mode 100644 index 0000000..9670488 Binary files /dev/null and b/res/MediaInfo.x64-sse2.exe differ diff --git a/res/MediaInfo.x86-i686.exe b/res/MediaInfo.x86-i686.exe new file mode 100644 index 0000000..ee881b9 Binary files /dev/null and b/res/MediaInfo.x86-i686.exe differ diff --git a/src/Main.cpp b/src/Main.cpp index cff009f..1f4a93a 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -19,6 +19,8 @@ // http://www.gnu.org/licenses/gpl-2.0.txt /////////////////////////////////////////////////////////////////////////////// +#define MIXP_CREATE_CONFIG 1 + //MUTils #include #include @@ -37,6 +39,7 @@ Q_IMPORT_PLUGIN(qtga) #endif +//Internal #include "Config.h" #include "MainWindow.h" #include "IPC.h" @@ -74,8 +77,8 @@ static void mixp_handle_multi_instance(MUtils::IPCChannel *const ipcChannel) static int mixp_main(int &argc, char **argv) { //Print the logo - qDebug("MediaInfoXP v%u.%02u, built on %s at %s.", mixp_versionMajor, mixp_versionMinor, mixp_buildDate, mixp_buildTime); - qDebug("Copyright (c) 2004-%s LoRd_MuldeR . Some rights reserved.", &mixp_buildDate[7]); + qDebug("MediaInfoXP v%u.%02u, built on %s at %s.", g_mixp_versionMajor, g_mixp_versionMinor, g_mixp_buildDate, g_mixp_buildTime); + qDebug("Copyright (c) 2004-%s LoRd_MuldeR . Some rights reserved.", &g_mixp_buildDate[7]); qDebug("Built with Qt v%s, running with Qt v%s.\n", QT_VERSION_STR, qVersion()); //Print library version @@ -85,7 +88,7 @@ static int mixp_main(int &argc, char **argv) QScopedPointer application(new QApplication(argc, argv)); //Create IPC - QScopedPointer ipcChannel(new MUtils::IPCChannel("mediainfo-xp", qHash(QString("%0@%1").arg(QString::fromLatin1(mixp_buildDate), QString::fromLatin1(mixp_buildTime))), "instance")); + QScopedPointer ipcChannel(new MUtils::IPCChannel("mediainfo-xp", qHash(QString("%0@%1").arg(QString::fromLatin1(g_mixp_buildDate), QString::fromLatin1(g_mixp_buildTime))), "instance")); const int ipcMode = ipcChannel->initialize(); if((ipcMode != MUtils::IPCChannel::RET_SUCCESS_MASTER) && (ipcMode != MUtils::IPCChannel::RET_SUCCESS_SLAVE)) { diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index f28a4cd..a242950 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -27,7 +27,9 @@ //MUtils #include #include +#include #include +#include #include //Qt includes @@ -170,7 +172,7 @@ void CMainWindow::showEvent(QShowEvent *event) resize(this->minimumSize()); //Init test - ui->versionLabel->setText(QString("v%1 / v%2 (%3)").arg(QString().sprintf("%u.%02u", mixp_versionMajor, mixp_versionMinor), QString().sprintf("%u.%u.%02u", mixp_miVersionMajor, mixp_miVersionMinor, mixp_miVersionPatch), MUtils::Version::app_build_date().toString(Qt::ISODate))); + ui->versionLabel->setText(QString("v%1 / v%2 (%3)").arg(QString().sprintf("%u.%02u", g_mixp_versionMajor, g_mixp_versionMinor), QString().sprintf("%u.%u.%02u", g_mixp_miVersionMajor, g_mixp_miVersionMinor, g_mixp_miVersionPatch), MUtils::Version::app_build_date().toString(Qt::ISODate))); ui->updateLabel->setText(tr("This version is more than six month old and probably outdated. Please check %1 for updates!").arg(LINK_MULDER)); //Show update hint? @@ -629,15 +631,15 @@ void CMainWindow::showAboutScreen(void) QString text; - text += QString().sprintf("MediaInfoXP v%u.%02u - Simple GUI for MediaInfo
", mixp_versionMajor, mixp_versionMinor); + text += QString().sprintf("
MediaInfoXP v%u.%02u - Simple GUI for MediaInfo
", g_mixp_versionMajor, g_mixp_versionMinor); text += QString().sprintf("Copyright (c) 2004-%04d LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved.
", qMax(buildDate.year(),curntDate.year())); - text += QString().sprintf("Built on %s at %s, using Qt Framework v%s.

", buildDate.toString(Qt::ISODate).toLatin1().constData(), mixp_buildTime, qVersion()); + text += QString().sprintf("Built on %s at %s, using Qt Framework v%s.

", buildDate.toString(Qt::ISODate).toLatin1().constData(), g_mixp_buildTime, qVersion()); text += QString().sprintf("This program is free software: you can redistribute it and/or modify
"); text += QString().sprintf("it under the terms of the GNU General Public License <http://www.gnu.org/>.
"); text += QString().sprintf("Note that this program is distributed with ABSOLUTELY NO WARRANTY.

"); text += QString().sprintf("Please check the web-site at %s for updates !!!
", LINK_MULDER, LINK_MULDER); text += QString().sprintf("

"); - text += QString().sprintf("This application is powered by MediaInfo v%u.%u.%02u
", mixp_miVersionMajor, mixp_miVersionMinor, mixp_miVersionPatch); + text += QString().sprintf("This application is powered by MediaInfo v%u.%u.%02u
", g_mixp_miVersionMajor, g_mixp_miVersionMinor, g_mixp_miVersionPatch); text += QString().sprintf("Free and OpenSource tool for displaying technical information about media files.
"); text += QString().sprintf("Copyright (c) 2002-%04d MediaArea.net SARL. All rights reserved.

", qMax(buildDate.year(),curntDate.year())); text += QString().sprintf("Redistribution and use is permitted according to the (2-Clause) BSD License.
"); @@ -718,29 +720,39 @@ void CMainWindow::received(const quint32 &command, const QString &message) // PRIVATE FUNCTIONS //////////////////////////////////////////////////////////// -static bool VALIDATE_MEDIAINFO(QFile *const handle) +static bool VALIDATE_MEDIAINFO(QFile *const handle, const char *const expected_checksum) { if(!handle->reset()) { return false; } - const QByteArray checksum = QCryptographicHash::hash(handle->readAll(), QCryptographicHash::Sha1); - if(qstricmp(checksum.toHex().constData(), mixp_checksum) != 0) + //Compute Hash + MUtils::Hash::Blake2 hash("+A`~}vPe9'~#n+c1Wq/MPo;1XwY\\;Pb."); + hash.update(handle->readAll()); + const QByteArray checksum = hash.finalize(true); + + //Compare Hash + if(qstricmp(checksum.constData(), expected_checksum) != 0) { qWarning("MediaInfo binary is corrupted!"); - qWarning("Expected checksum: %s", mixp_checksum); - qWarning("Computed checksum: %s\n", checksum.toHex().constData()); + qWarning("Expected checksum: %s", expected_checksum); + qWarning("Computed checksum: %s\n", checksum.constData()); return false; } - qDebug("MediaInfo checksum: %s\n", checksum.toHex().constData()); + qDebug("MediaInfo checksum: %s\n", checksum.constData()); return true; } QString CMainWindow::getMediaInfoPath(void) { - QResource mediaInfoRes(":/res/MediaInfo.i686.exe"); + //Detect arch + const bool have_x64 = MUtils::CPUFetaures::detect().x64; + const QString arch = have_x64 ? QLatin1String("x64-sse2") : QLatin1String("x86-i686"); + + //Setup resource + QResource mediaInfoRes(QString(":/res/MediaInfo.%1.exe").arg(arch)); if((!mediaInfoRes.isValid()) || (!mediaInfoRes.data())) { qFatal("MediaInfo resource could not be initialized!"); @@ -750,7 +762,7 @@ QString CMainWindow::getMediaInfoPath(void) //Validate file content, if already extracted if(!m_mediaInfoHandle.isNull()) { - if(VALIDATE_MEDIAINFO(m_mediaInfoHandle.data())) + if(VALIDATE_MEDIAINFO(m_mediaInfoHandle.data(), (have_x64 ? g_mixp_checksum_x64 : g_mixp_checksum_x86))) { return m_mediaInfoHandle->fileName(); } @@ -759,7 +771,7 @@ QString CMainWindow::getMediaInfoPath(void) //Extract MediaInfo binary now! qDebug("MediaInfo binary not existing yet, going to extract now...\n"); - m_mediaInfoHandle.reset(new QFile(QString("%1/MediaInfo_%2.exe").arg(m_tempFolder, QString().sprintf("%04x", qrand() % 0xFFFF)))); + m_mediaInfoHandle.reset(new QFile(QString("%1/MediaInfo_%2.%3.exe").arg(m_tempFolder, QString().sprintf("%04x", qrand() % 0xFFFF), arch))); if(m_mediaInfoHandle->open(QIODevice::ReadWrite | QIODevice::Truncate)) { if(m_mediaInfoHandle->write(reinterpret_cast(mediaInfoRes.data()), mediaInfoRes.size()) == mediaInfoRes.size()) @@ -786,7 +798,7 @@ QString CMainWindow::getMediaInfoPath(void) //Validate file content, after it has been extracted if(!m_mediaInfoHandle.isNull()) { - if(VALIDATE_MEDIAINFO(m_mediaInfoHandle.data())) + if(VALIDATE_MEDIAINFO(m_mediaInfoHandle.data(), (have_x64 ? g_mixp_checksum_x64 : g_mixp_checksum_x86))) { return m_mediaInfoHandle->fileName(); }