Now using separate MediaInfo binary for x64 and non-x64 systems.
This commit is contained in:
parent
c130b3260f
commit
556221c3e8
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@
|
||||
/*.suo
|
||||
/*.user
|
||||
/*.opensdf
|
||||
*.db
|
||||
|
@ -16,6 +16,7 @@
|
||||
<file>res/ico_shellext.png</file>
|
||||
<file>res/loading.png</file>
|
||||
<file>res/logo.png</file>
|
||||
<file>res/MediaInfo.i686.exe</file>
|
||||
<file>res/MediaInfo.x86-i686.exe</file>
|
||||
<file>res/MediaInfo.x64-sse2.exe</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -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
|
||||
|
220
doc/README.htm
Normal file
220
doc/README.htm
Normal file
@ -0,0 +1,220 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>README</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<style type="text/css">
|
||||
/* Solarized (Dark) */
|
||||
/* Authors: Ethan Schoonover: http://ethanschoonover.com/solarized, CodeCatalyst: http://codecatalyst.com/ */
|
||||
/* Version: d9a83f4e7a47432baff86e1e7946d9e066cf3d1b (modified) */
|
||||
/* https://github.com/CodeCatalyst/mou-theme-solarized */
|
||||
|
||||
html,
|
||||
body,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
blockquote,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
img {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
html * {
|
||||
font-family: "ff-din-web-pro-1", "ff-din-web-pro-2", sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 19.2px;
|
||||
color-profile: sRGB;
|
||||
}
|
||||
body {
|
||||
min-width: 32em;
|
||||
max-width: 52em;
|
||||
margin: 10px;
|
||||
}
|
||||
p {
|
||||
font-weight: lighter;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
ol,
|
||||
ul {
|
||||
margin-left: 2em;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-top: 10px;
|
||||
}
|
||||
li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: lighter;
|
||||
text-transform: capitalize;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 24.624px;
|
||||
line-height: 29.548799999999996px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 24.624px;
|
||||
line-height: 29.548799999999996px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 23.44px;
|
||||
line-height: 28.128px;
|
||||
}
|
||||
h4 {
|
||||
font-size: 22.16px;
|
||||
line-height: 26.592px;
|
||||
}
|
||||
h5 {
|
||||
font-size: 22.16px;
|
||||
line-height: 26.592px;
|
||||
}
|
||||
h6 {
|
||||
font-size: 22.16px;
|
||||
line-height: 26.592px;
|
||||
}
|
||||
img {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
h1 img,
|
||||
h2 img,
|
||||
h3 img,
|
||||
h4 img,
|
||||
h5 img,
|
||||
h6 img,
|
||||
p img {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
pre {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
pre,
|
||||
code {
|
||||
font-family: monospace;
|
||||
}
|
||||
pre {
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
padding: 15px;
|
||||
}
|
||||
h1 {
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
h2 {
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
border-bottom: none;
|
||||
}
|
||||
html * {
|
||||
color: #839496;
|
||||
}
|
||||
html body {
|
||||
background-color: #002b36;
|
||||
}
|
||||
html h1,
|
||||
html h2,
|
||||
html h3,
|
||||
html h4,
|
||||
html h5,
|
||||
html h6 {
|
||||
color: #93a1a1;
|
||||
border-color: #839496;
|
||||
}
|
||||
html a,
|
||||
html a:active,
|
||||
html a:visited {
|
||||
color: #93a1a1;
|
||||
}
|
||||
html a:hover {
|
||||
background-color: #073642;
|
||||
}
|
||||
html pre {
|
||||
color: #93a1a1;
|
||||
background-color: #073642;
|
||||
}
|
||||
html a,
|
||||
html a:active,
|
||||
html a:visited,
|
||||
html code.url {
|
||||
color: #b58900;
|
||||
}
|
||||
html h1 {
|
||||
color: #b58900;
|
||||
}
|
||||
html h2,
|
||||
html h3,
|
||||
html h4,
|
||||
html h5,
|
||||
html h6 {
|
||||
color: #b58900;
|
||||
}
|
||||
|
||||
/*
|
||||
LICENSE
|
||||
|
||||
Solarized Theme for Mou
|
||||
|
||||
Copyright (c) 2012 CodeCatalyst, LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Solarized
|
||||
|
||||
Copyright (c) 2011 Ethan Schoonover
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
</style>
|
||||
<!-- base href="file:///D:/_Sandbox/MediaInfo/" -->
|
||||
</head>
|
||||
<body>
|
||||
<h1>MediaInfoLib README</h1>
|
||||
<p>MediaInfo(Lib) is a convenient unified display of the most relevant technical and tag data for video and audio files.</p>
|
||||
<p><a href="https://travis-ci.org/MediaArea/MediaInfoLib"><img src="README.svg" alt="Build Status"></a></p>
|
||||
<p>MediaInfoLib - https://github.com/MediaArea/MediaInfoLib<br>
|
||||
Copyright (c) MediaArea.net SARL. All Rights Reserved.</p>
|
||||
<p>This program is freeware under BSD-2-Clause license conditions.<br>
|
||||
See License.html for more information</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
<!-- This document was created with MarkdownPad, the Markdown editor for Windows (http://markdownpad.com) -->
|
1
doc/README.svg
Normal file
1
doc/README.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="20"><linearGradient id="a" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><rect rx="3" width="90" height="20" fill="#555"/><rect rx="3" x="37" width="53" height="20" fill="#4c1"/><path fill="#4c1" d="M37 0h4v20h-4z"/><rect rx="3" width="90" height="20" fill="url(#a)"/><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="19.5" y="15" fill="#010101" fill-opacity=".3">build</text><text x="19.5" y="14">build</text><text x="62.5" y="15" fill="#010101" fill-opacity=".3">passing</text><text x="62.5" y="14">passing</text></g></svg>
|
After Width: | Height: | Size: 724 B |
@ -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).
|
BIN
res/MediaInfo.x64-sse2.exe
Normal file
BIN
res/MediaInfo.x64-sse2.exe
Normal file
Binary file not shown.
BIN
res/MediaInfo.x86-i686.exe
Normal file
BIN
res/MediaInfo.x86-i686.exe
Normal file
Binary file not shown.
@ -19,6 +19,8 @@
|
||||
// http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define MIXP_CREATE_CONFIG 1
|
||||
|
||||
//MUTils
|
||||
#include <MUtils/Startup.h>
|
||||
#include <MUtils/IPCChannel.h>
|
||||
@ -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 <mulder2@gmx.de>. 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 <mulder2@gmx.de>. 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<QApplication> application(new QApplication(argc, argv));
|
||||
|
||||
//Create IPC
|
||||
QScopedPointer<MUtils::IPCChannel> ipcChannel(new MUtils::IPCChannel("mediainfo-xp", qHash(QString("%0@%1").arg(QString::fromLatin1(mixp_buildDate), QString::fromLatin1(mixp_buildTime))), "instance"));
|
||||
QScopedPointer<MUtils::IPCChannel> 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))
|
||||
{
|
||||
|
@ -27,7 +27,9 @@
|
||||
//MUtils
|
||||
#include <MUtils/GUI.h>
|
||||
#include <MUtils/OSSupport.h>
|
||||
#include <MUtils/CPUFeatures.h>
|
||||
#include <MUtils/Sound.h>
|
||||
#include <MUtils/Hash_Blake2.h>
|
||||
#include <MUtils/Version.h>
|
||||
|
||||
//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 <a href=\"%1\">%1</a> for updates!").arg(LINK_MULDER));
|
||||
|
||||
//Show update hint?
|
||||
@ -629,15 +631,15 @@ void CMainWindow::showAboutScreen(void)
|
||||
|
||||
QString text;
|
||||
|
||||
text += QString().sprintf("<nobr><tt><b>MediaInfoXP v%u.%02u - Simple GUI for MediaInfo</b><br>", mixp_versionMajor, mixp_versionMinor);
|
||||
text += QString().sprintf("<nobr><tt><b>MediaInfoXP v%u.%02u - Simple GUI for MediaInfo</b><br>", g_mixp_versionMajor, g_mixp_versionMinor);
|
||||
text += QString().sprintf("Copyright (c) 2004-%04d LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved.<br>", qMax(buildDate.year(),curntDate.year()));
|
||||
text += QString().sprintf("Built on %s at %s, using Qt Framework v%s.<br><br>", buildDate.toString(Qt::ISODate).toLatin1().constData(), mixp_buildTime, qVersion());
|
||||
text += QString().sprintf("Built on %s at %s, using Qt Framework v%s.<br><br>", 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<br>");
|
||||
text += QString().sprintf("it under the terms of the GNU General Public License <http://www.gnu.org/>.<br>");
|
||||
text += QString().sprintf("Note that this program is distributed with ABSOLUTELY NO WARRANTY.<br><br>");
|
||||
text += QString().sprintf("Please check the web-site at <a href=\"%s\">%s</a> for updates !!!<br>", LINK_MULDER, LINK_MULDER);
|
||||
text += QString().sprintf("<hr><br>");
|
||||
text += QString().sprintf("<b>This application is powered by MediaInfo v%u.%u.%02u</b><br>", mixp_miVersionMajor, mixp_miVersionMinor, mixp_miVersionPatch);
|
||||
text += QString().sprintf("<b>This application is powered by MediaInfo v%u.%u.%02u</b><br>", g_mixp_miVersionMajor, g_mixp_miVersionMinor, g_mixp_miVersionPatch);
|
||||
text += QString().sprintf("Free and OpenSource tool for displaying technical information about media files.<br>");
|
||||
text += QString().sprintf("Copyright (c) 2002-%04d MediaArea.net SARL. All rights reserved.<br><br>", qMax(buildDate.year(),curntDate.year()));
|
||||
text += QString().sprintf("Redistribution and use is permitted according to the (2-Clause) BSD License.<br>");
|
||||
@ -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<const char*>(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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user