Initial commit.

This commit is contained in:
LoRd_MuldeR 2013-05-19 22:32:58 +02:00
commit 526da5f0d6
27 changed files with 4043 additions and 0 deletions

10
.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
/tmp/
/obj/
/bin/
/ipch/
/res/toolset/
/src/*.h.bak
/*.sdf
/*.suo
/*.user
/*.opensdf

5
Copying.txt Normal file
View File

@ -0,0 +1,5 @@
MediaInfoXP (GUI for MediaInfo) was created from the scratch by LoRd_MuldeR <mulder2@gmx.de> and is distributed under the terms of the GNU General Public License ('License.html').
The Qt GUI Toolkit is Copyright (C) 2012 Digia Finland Ltd and/or its subsidiary(-ies). You may use, distribute and copy the Qt GUI Toolkit under the terms of GNU General Public License version 3.
MediaInfo(Lib) is Copyright (C) 2002-2013 MediaArea.net SARL. Redistribution and use in source and binary forms, with or without modification, are permitted according to the BSD-2-Clause license.

BIN
MediaInfoXP.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
MediaInfoXP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

16
MediaInfoXP.qrc Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<file>MediaInfoXP.ico</file>
<file>MediaInfoXP.png</file>
<file>res/ico_clear.png</file>
<file>res/ico_discard.png</file>
<file>res/ico_folder.png</file>
<file>res/ico_info.png</file>
<file>res/ico_link.png</file>
<file>res/ico_qt.png</file>
<file>res/ico_quit.png</file>
<file>res/logo.png</file>
<file>res/MediaInfo.i386.exe</file>
</qresource>
</RCC>

60
MediaInfoXP.rcx Normal file
View File

@ -0,0 +1,60 @@
// Microsoft Visual C++ generated resource script.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
//
// Neutral resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
IDI_ICON1 ICON "MediaInfoXP.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x3L
#else
FILEFLAGS 0x2L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "Author", "LoRd_MuldeR <mulder2@gmx.de>"
VALUE "Comments", "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY"
VALUE "CompanyName", "Free Software Foundation"
VALUE "FileDescription", "MediaInfoXP - GUI for MediaInfo"
VALUE "FileVersion", "1.00"
VALUE "InternalName", "MediaInfoXP_Qt"
VALUE "LegalCopyright", "Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>"
VALUE "LegalTrademarks", "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License <http://www.gnu.org/>"
VALUE "OriginalFilename", "MediaInfoXP.exe"
VALUE "ProductName", "MediaInfoXP - GUI for MediaInfo"
VALUE "ProductVersion", "1.00"
VALUE "Website" "http://muldersoft.com/"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END

152
MediaInfoXP.vcxproj Normal file
View File

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{DCDCCABB-970A-4337-B5BB-7838EE72FE80}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>QtTestApp</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\bin\$(PlatformName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\tmp\$(PlatformName)\$(Configuration)\obj\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\bin\$(PlatformName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)\tmp\$(PlatformName)\$(Configuration)\obj\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_DLL;QT_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(QTDIR)\include\QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)..\LameXP_Qt\LameXP\etc\Prerequisites\qt4_static\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;QT_LARGEFILE_SUPPORT;QT_GUI_LIB;QT_CORE_LIB;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_NODLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<FloatingPointModel>Fast</FloatingPointModel>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<BufferSecurityCheck>false</BufferSecurityCheck>
<CompileAsManaged>false</CompileAsManaged>
<TreatWarningAsError>true</TreatWarningAsError>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<OpenMPSupport>false</OpenMPSupport>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(SolutionDir)..\LameXP_Qt\etc\Prerequisites\qt4_static\lib;$(SolutionDir)..\LameXP_Qt\etc\Prerequisites\qt4_static\plugins\imageformats;$(SolutionDir)..\LameXP_Qt\etc\Prerequisites\EncodePointer\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>QtCore.lib;QtGui.lib;QtSvg.lib;qtmain.lib;qsvg.lib;qico.lib;qtga.lib;Winmm.lib;imm32.lib;ws2_32.lib;Shlwapi.lib;Wininet.lib;PowrProf.lib;psapi.lib;EncodePointer.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<ShowProgress>LinkVerboseLib</ShowProgress>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<SetChecksum>true</SetChecksum>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type=%27win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27 processorArchitecture=%27*%27" %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="gui\Dialog.ui">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)\tmp\Common\uic\%(Filename).h" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC "$(SolutionDir)\tmp\Common\uic\%(Filename).h"</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\tmp\Common\uic\%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)\tmp\Common\uic\%(Filename).h" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC "$(SolutionDir)\tmp\Common\uic\%(Filename).h"</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\tmp\Common\uic\%(Filename).h;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="MediaInfoXP.qrc">
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)\tmp\Common\rcc\RCC_%(Filename).cpp" -name "%(Filename)" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)\tmp\Common\rcc\RCC_%(Filename).cpp" -name "%(Filename)" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">RCC "$(SolutionDir)\tmp\Common\rcc\RCC_%(Filename).cpp"</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">RCC "$(SolutionDir)\tmp\Common\rcc\RCC_%(Filename).cpp"</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\tmp\Common\rcc\RCC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\tmp\Common\rcc\RCC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Main.cpp" />
<ClCompile Include="src\MainWindow.cpp" />
<ClCompile Include="tmp\Common\moc\MOC_MainWindow.cpp" />
<ClCompile Include="tmp\Common\rcc\RCC_MediaInfoXP.cpp" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="src\MainWindow.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)\tmp\Common\moc\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)\tmp\Common\moc\MOC_%(Filename).cpp" "%(FullPath)"</Command>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC "$(SolutionDir)\tmp\Common\moc\MOC_%(Filename).cpp"</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC "$(SolutionDir)\tmp\Common\moc\MOC_%(Filename).cpp"</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\tmp\Common\moc\MOC_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\tmp\Common\moc\MOC_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Config.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MediaInfoXP.rcx">
<FileType>Document</FileType>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Dialogs">
<UniqueIdentifier>{662311f2-44ab-48a8-8b5b-640453b3422f}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Generated">
<UniqueIdentifier>{4cc9136e-0434-4027-ae2c-d4c148dd8ed9}</UniqueIdentifier>
</Filter>
<Filter Include="Resources">
<UniqueIdentifier>{e066a4c2-fc34-4e1b-948e-1a3eea8e277f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="gui\Dialog.ui">
<Filter>Dialogs</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<None Include="MediaInfoXP.qrc" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\MainWindow.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="tmp\Common\moc\MOC_MainWindow.cpp">
<Filter>Source Files\Generated</Filter>
</ClCompile>
<ClCompile Include="tmp\Common\rcc\RCC_MediaInfoXP.cpp">
<Filter>Source Files\Generated</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\MainWindow.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\Config.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="MediaInfoXP.rcx" />
</ItemGroup>
</Project>

21
ReadMe.txt Normal file
View File

@ -0,0 +1,21 @@
MediaInfoXP - Simple GUI for MediaInfo
Copyright (C) 2004-2013 LoRd_MuldeR <MuldeR2@GMX.de>
http://www.muldersoft.com/
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
http://www.gnu.org/licenses/gpl-2.0.txt

1632
doc/Changelog.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MediaInfo(Lib) License</title>
</head>
<body>
<div>
<h3 style="text-align: center;">MediaInfo(Lib) License</h3>
<p>Copyright (c) 2002-2013 <a href="mailto:Info@MediaArea.net">MediaArea.net SARL</a>. All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:</p>
<ul>
<li>Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.</li>
</ul>
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</p>
</div>
<hr />
<div>
<h3 style="text-align: center;">Third party libraries</h3>
<p>
The software relies on third party libraries. Such libraries have their own license:
<ul>
<li>C++ standard library: <a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html">libstdc++</a>, <a href="http://llvm.org/docs/DeveloperPolicy.html#license">libc++</a>, <a href="http://msdn.microsoft.com/en-us/library/vstudio/ms235299.aspx">Visual C++ library</a> or any other C++ standard library.</li>
<li>Base classes library: ZenLib, (c) MediaArea.net SARL, zlib license.</li>
<li>GUI (optional): <a href="http://qt-project.org/products/licensing">Qt</a>.</li>
<li>GUI (optional): <a href="http://www.wxwidgets.org/about/newlicen.htm">WxWidgets</a>.</li>
<li>XML parser (optional): <a href="http://www.grinninglizard.com/tinyxml2docs/index.html">TinyXML-2</a>.</li>
<li>gzip decompression routine (optional): <a href="http://www.gzip.org/zlib/zlib_license.html">zlib</a>.</li>
<li>FTP, FTPS, SFTP, HTTP, HTTPS (optional): <a href="http://curl.haxx.se/docs/copyright.html">libcurl</a>.</li>
<li>MMS (optional): <a href="http://sourceforge.net/projects/libmms/">libmms</a>.</li>
</ul>
</p>
</div>
<hr />
<div>
<h3 style="text-align: center;">Contributors</h3>
<p>
<ul>
<li>Jérôme Martinez (main developper)</li>
<li>Lionel Duchateau (odd formats support)</li>
<li>MPC-HC team (tests)</li>
<li>FlylinkDC++ team (tests)</li>
<li>Max Pozdeev (former native Mac GUI developper)</li>
</ul>
</p>
</div>
</body>
</html>

150
doc/License.Qt.html Normal file
View File

@ -0,0 +1,150 @@
<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>Qt LICENSE AGREEMENT</title><body><pre>
Qt LICENSE AGREEMENT
Agreement version 3.9.2
This License Agreement for Qt ("Agreement") is a legal agreement between Digia Finland Ltd ("Digia"), with its registered office at Valimotie 21, FI-00380 Helsinki, Finland and you (either an individual or a legal entity) ("Licensee") for the Licensed Software (as defined below).
1. DEFINITIONS
"Affiliate" of a Party shall mean an entity (i) which is directly or indirectly controlling such Party; (ii) which is under the same direct or indirect ownership or control as such Party; or (iii) which is directly or indirectly owned or controlled by such Party. For these purposes, an entity shall be treated as being controlled by another if that other entity has fifty percent (50 %) or more of the votes in such entity, is able to direct its affairs and/or to control the composition of its board of directors or equivalent body.
"Applications" shall mean Licensee's software products created using the Licensed Software which may include portions of the Licensed Software.
"Designated User(s)" shall mean the employee(s) of Licensee acting within the scope of their employment or Licensee's consultant(s) or contractor(s) acting within the scope of their services for Licensee and on behalf of Licensee.
"Initial Term" shall mean the period of time one (1) year from the later of (a) the Effective Date; or (b) the date the Licensed Software was initially delivered to Licensee by Digia. If no specific Effective Date is set forth in the Agreement, the Effective Date shall be deemed to be the date the Licensed Software was initially delivered to Licensee.
"License Certificate" shall mean the document accompanying the Licensed Software which specifies the modules which are licensed under the Agreement, Platforms and Designated Users.
"Licensed Software" shall mean the computer software, "online" or electronic documentation, associated media and printed materials, including the source code, example programs and the documentation delivered by Digia to Licensee in conjunction with this Agreement. Licensed Software does not include Third Party Software (as defined in Section 7).
"Modified Software" shall mean modifications made to the Licensed Software by Licensee.
"Nokia" shall mean Digia Plc, a corporation incorporated under the laws of Finland, having its registered office at PO box 226, 00045 Nokia Group, Finland (visiting address Keilalahdentie 4, 02150 Espoo, Finland) and registered with the Finnish Trade Register under business ID 0112038-9 and acting on behalf of its respective Affiliates.
"Party or Parties" shall mean Licensee and/or Digia.
"Platforms" shall mean the operating systems listed in the License Certificate.
"Redistributables" shall mean the portions of the Licensed Software set forth in Appendix 1, Section 1 that may be distributed with or as part of Applications in object code form.
"Support" shall mean standard developer support that is provided by Digia to assist eligible Designated Users in using the Licensed Software in accordance with its established standard support procedures listed at: http://qt.digia.com/
"Updates" shall mean a release or version of the Licensed Software containing enhancement, new features, bug fixes, error corrections and other changes that are generally made available to users of the Licensed Software that have contracted for maintenance and support.
2. OWNERSHIP
The Licensed Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The Licensed Software is licensed, not sold.
To the extent Licensee submits bug fixes or error corrections, including information related thereto, Licensee hereby grants to Digia a sublicensable, irrevocable, perpetual, worldwide, non-exclusive, royalty-free and fully paid-up copyright and trade secret license to reproduce, adapt, translate, modify, and prepare derivative works of, publicly display, publicly perform, sublicense, make available and distribute error corrections and bug fixes, including derivative works thereof. All Digia's and/or its licensors' trademarks, service marks, trade names, logos or other words or symbols are and shall remain the exclusive property of Digia or its licensors respectively.
3. MODULES
Some of the files in the Licensed Software have been grouped into modules. These files contain specific notices defining the module of which they are a part. The modules licensed to Licensee are specified in the License Certificate. The terms of the License Certificate are considered part of the Agreement. In the event of inconsistency or conflict between the language of this Agreement and the License Certificate, the provisions of this Agreement shall govern.
4. VALIDITY OF THE AGREEMENT
By installing, copying, or otherwise using the Licensed Software, Licensee agrees to be bound by the terms of this Agreement. If Licensee does not agree to the terms of this Agreement, Licensee may not install, copy, or otherwise use the Licensed Software. In addition, by installing, copying, or otherwise using any Updates or other components of the Licensed Software that Licensee receives separately as part of the Licensed Software, Licensee agrees to be bound by any additional license terms that accompany such Updates, if any. If Licensee does not agree to the additional license terms that accompany such Updates, Licensee may not install, copy, or otherwise use such Updates.
Upon Licensee's acceptance of the terms and conditions of this Agreement, Digia grants Licensee the right to use the Licensed Software in the manner provided below.
5. LICENSES
5.1 Using, modifying and copying
Digia grants to Licensee a non-exclusive, non-transferable, perpetual license to use, modify and copy the Licensed Software for the Designated User(s) specified in the License Certificate for the sole purposes of designing, developing, and testing Application(s).
Licensee may install copies of the Licensed Software on an unlimited number of computers provided that only the Designated Users use the Licensed Software. Licensee may at any time designate another Designated User to replace a then-current Designated User by notifying Digia, provided that a) the then-current Designated User has not been designated as a replacement during the last six (6) months; and b) there is no more than the specified number of Designated Users at any given time.
5.2 Redistribution
a) Digia grants Licensee a non-exclusive, royalty-free right to reproduce and distribute the object code form of Redistributables for execution on the specified Platforms. Copies of Redistributables may only be distributed with and for the sole purpose of executing Applications permitted under this Agreement that Licensee has created using the Licensed Software. Under no circumstances may any copies of Redistributables be distributed separately. This Agreement does not give Licensee any rights to distribute any of the parts of the Licensed Software listed in Appendix 1, Section 2, neither as a whole nor as parts or snippets of code.
b) Licensee may not distribute, transfer, assign or otherwise dispose of Applications and/or Redistributables, in binary/compiled form, or in any other form, if such action is part of a joint software and hardware distribution, except as provided by a separate runtime distribution license with Digia or one of its authorized distributors. A joint hardware and software distribution shall be defined as either:
(i) distribution of a hardware device where, in its final end user configuration, the main user interface of the device is provided by Application(s) created by Licensee or others, using the Licensed Software, and depends on the Licensed Software or any Qt or Qt-based software product; or
(ii) distribution of the Licensed Software with a device designed to facilitate the installation of the Licensed Software onto the same device where the main user interface of such device is provided by Application(s) created by Licensee or others, using the Licensed Software or any Qt or a Qt-based product, and depends on the Licensed Software.
5.3 Further Requirements
It is expressly acknowledged and understood by Licensee, that Licensee is strictly prohibited from using Licensed Software for creation of mobile phones or tablet computers targeted for consumer end users.
The aforementioned shall not prohibit Licensee from using Licensed Software for the purpose of creating of applications for any devices, including mobile phone and tablet computers.
Notwithstanding anything contrary to this Agreement, it is expressly acknowledged and understood by Licensee, that Nokia shall hereby be named as a third party beneficiary under this Agreement with respect to this Section 5.3. Therefore, Nokia shall have the same rights as Digia under this Agreement with respect to this Section 5.3, and shall be entitled to exercise such rights independent from Digia.
The licenses granted in this Section 5 by Digia to Licensee and Licensee Affiliates are subject to Licensee and Licensee Affiliate's compliance with Section 8 of this Agreement.
6. VERIFICATION
Digia or a certified auditor on Digia's behalf, may, upon its reasonable request and at its expense, audit Licensee with respect to the use of the Licensed Software. Such audit may be conducted by mail, electronic means or through an in-person visit to Licensee's place of business. Any such in-person audit shall be conducted during regular business hours at Licensee's facilities and shall not unreasonably interfere with Licensee's business activities. Digia shall not remove, copy, or redistribute any electronic material during the course of an audit. If an audit reveals that Licensee is using the Licensed Software in a way that is in material violation of the terms of the Agreement, then Licensee shall pay Digia's reasonable costs of conducting the audit. In the case of a material violation, Licensee agrees to pay Digia any amounts owing that are attributable to the unauthorized use. In the alternative, Digia reserves the right, at Digia's sole option, to terminate the licenses for the Licensed Software.
7. THIRD PARTY SOFTWARE
The Licensed Software may provide links to third party libraries or code (collectively "Third Party Software") to implement various functions. Third Party Software does not comprise part of the Licensed Software. In some cases, access to Third Party Software may be included along with the Licensed Software delivery as a convenience for development and testing only. Such source code and libraries may be listed in the ".../src/3rdparty" source tree delivered with the Licensed Software or documented in the Licensed Software where the Third Party Software is used, as may be amended from time to time, do not comprise the Licensed Software. Licensee acknowledges (1) that some part of Third Party Software may require additional licensing of copyright and patents from the owners of such, and (2) that distribution of any of the Licensed Software referencing any portion of a Third Party Software may require appropriate licensing from such third parties.
8. CONDITIONS FOR CREATING APPLICATIONS AND DISTRIBUTING REDISTRIBUTABLES
The licenses granted in this Agreement for Licensee to create Applications and distribute them and the Redistributables (if any) to Licensee's customers is subject to all of the following conditions: (i) all copies of the Applications which Licensee creates must bear a valid copyright notice, either Licensee's own or the copyright notice that appears on the Licensed Software; (ii) Licensee may not remove or alter any copyright, trademark or other proprietary rights notice contained in any portion of the Licensed Software, including but not limited to the About Boxes in "Qt Assistant" and "Qt Linguist" as defined in Appendix 1; (iii) Redistributables, if any, shall be licensed to Licensee's customer "as is"; (iv) Licensee shall indemnify and hold Digia, its Affiliates, contractors, licensors, and suppliers, harmless from and against any claims or liabilities arising out of the use, reproduction or distribution of Applications; (v) Applications must be developed using a licensed, registered copy of the Licensed Software; (vi) Applications must add primary and substantial functionality to the Licensed Software; (vii) Applications may not pass on functionality which in any way makes it possible for others to create software with the Licensed Software, however Licensee may use the Licensed Software's scripting and QML ("Qt Quick") functionality solely in order to enable scripting, themes and styles that augment the functionality and appearance of the Application(s) without adding primary and substantial functionality to the Application(s); (viii) Applications may not compete with the Licensed Software; (ix) Licensee may not use Digia's or any of its suppliers' names, logos, or trademarks to market Application(s), except to state that Application was developed using the Licensed Software.
NOTE: The Open Source Editions of Qt products and the Qt, Qtopia and Qt Extended versions licensed by Digia and previously licensed by Nokia and Trolltech (collectively referred to as "Open- source Qt Products") are licensed under the terms of the GNU Lesser General Public License version 2.1 ("LGPL") and/or the GNU General Public License versions 2.0 and 3.0 ("GPL") (as applicable) and not under this Agreement. If Licensee, or another third party, has, at any time, developed all (or any portions of) the Application(s) using a version of one of these Open-source Qt Products licensed under the LGPL or the GPL, Licensee may not combine such development work with the Licensed Software and must license such Application(s) (or any portions derived there from) under the terms of the GNU Lesser General Public License version 2.1 (Qt only) or GNU General Public License version 2.0 (Qt, Qtopia and Qt Extended) or version 3 (Qt only) copies of which are located at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html, http://www.fsf.org/licensing/licenses/info/GPLv2.html, and http://www.gnu.org/copyleft/gpl.html.
9. LIMITED WARRANTY AND WARRANTY DISCLAIMER
Digia hereby represents and warrants with respect to the Licensed Software that it has the power and authority to grant the rights and licenses granted to Licensee under this Agreement. Except as set forth above, the Licensed Software is licensed to Licensee "as is". To the maximum extent permitted by applicable law, Digia on behalf of itself, suppliers, and licensors disclaims all warranties and conditions, either express or implied, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, title and non-infringement with regard to the Licensed Software.
10. LIMITATION OF LIABILITY
If, Digia's warranty disclaimer notwithstanding, Digia is held liable to Licensee, whether in contract, tort or any other legal theory, based on the Licensed Software, Digia's entire liability to Licensee and Licensee's exclusive remedy shall be, at Digia's option, either (A) return of the price Licensee paid for the Licensed Software, or (B) repair or replacement of the Licensed Software, provided Licensee returns to Digia all copies of the Licensed Software as originally delivered to Licensee. Digia shall not under any circumstances be liable to Licensee based on failure of the Licensed Software if the failure resulted from accident, abuse or misapplication, nor shall Digia under any circumstances be liable for special damages, punitive or exemplary damages, damages for loss of profits or interruption of business or for loss or corruption of data. Any award of damages from Digia to Licensee shall not exceed the total amount Licensee has paid to Digia in connection with this Agreement.
11. SUPPORT AND UPDATES
Licensee shall be eligible to receive Support and Updates during the Initial Term, in accordance with Digia's then current policies and procedures, if any. Such policies and procedures may be changed from time to time. Following the Initial Term, Digia shall no longer make the Licensed Software available to Licensee unless Licensee purchases additional Support and Updates according to this Section 11 below.
Licensee may purchase additional Support and Updates following the Initial Term at Digia's terms and conditions applicable at the time of renewal.
12. CONFIDENTIALITY
Each party acknowledges that during the Initial Term of this Agreement it shall have access to information about the other party's business, business methods, business plans, customers, business relations, technology, and other information, including the terms of this Agreement, that is confidential and of great value to the other party, and the value of which would be significantly reduced if disclosed to third parties (the "Confidential Information"). Accordingly, when a party (the "Receiving Party") receives Confidential Information from another party (the "Disclosing Party"), the Receiving Party shall, and shall obligate its employees and agents and employees and agents of its affiliates to: (i) maintain the Confidential Information in strict confidence; (ii) not disclose the Confidential Information to a third party without the Disclosing Party's prior written approval; and (iii) not, directly or indirectly, use the Confidential Information for any purpose other than for exercising its rights and fulfilling its responsibilities pursuant to this Agreement. Each party shall take reasonable measures to protect the Confidential Information of the other party, which measures shall not be less than the measures taken by such party to protect its own confidential and proprietary information.
"Confidential Information" shall not include information that (a) is or becomes generally known to the public through no act or omission of the Receiving Party; (b) was in the Receiving Party's lawful possession prior to the disclosure hereunder and was not subject to limitations on disclosure or use; (c) is developed by employees of the Receiving Party or other persons working for the Receiving Party who have not had access to the Confidential Information of the Disclosing Party, as proven by the written records of the Receiving Party or by persons who have not had access to the Confidential Information of the Disclosing Party as proven by the written records of the Receiving Party; (d) is lawfully disclosed to the Receiving Party without restrictions, by a third party not under an obligation of confidentiality; or (e) the Receiving Party is legally compelled to disclose the information, in which case the Receiving Party shall assert the privileged and confidential nature of the information and cooperate fully with the Disclosing Party to protect against and prevent disclosure of any Confidential Information and to limit the scope of disclosure and the dissemination of disclosed Confidential Information by all legally available means.
The obligations of the Receiving Party under this Section shall continue during the Initial Term and for a period of five (5) years after expiration or termination of this Agreement. To the extent that the terms of the Non-Disclosure Agreement between Digia and Licensee conflict with the terms of this Section 12, this Section 12 shall be controlling over the terms of the Non-Disclosure Agreement.
13. GENERAL PROVISIONS
13.1 Marketing
Digia may include Licensee's company name and logo in a publicly available list of Digia customers and in its public communications.
13.2 No Assignment
Licensee shall not be entitled to assign or transfer all or any of its rights, benefits and obligations under this Agreement without the prior written consent of Digia, which shall not be unreasonably withheld. Digia shall be entitled to assign or transfer any of its rights, benefits or obligations under this Agreement on an unrestricted basis.
13.3 Termination
Digia may terminate the Agreement at any time immediately upon written notice by Digia to Licensee if Licensee breaches this Agreement.
Either party shall have the right to terminate this Agreement immediately upon written notice in the event that the other party becomes insolvent, files for any form of bankruptcy, makes any assignment for the benefit of creditors, has a receiver, administrative receiver or officer appointed over the whole or a substantial part of its assets, ceases to conduct business, or an act equivalent to any of the above occurs under the laws of the jurisdiction of the other party.
Upon termination of this Agreement, Licensee shall return to Digia all copies of Licensed Software that were supplied by Digia. All other copies of Licensed Software in the possession or control of Licensee must be erased or destroyed. An officer of Licensee must promptly deliver to Digia a written confirmation that this has occurred.
13.4 Surviving Sections
Any terms and conditions that by their nature or otherwise reasonably should survive a cancellation or termination of this Agreement shall also be deemed to survive. Such terms and conditions include, but are not limited to the following Sections: 2, 5.1, 6, 7, 8(iv), 10, 12, 13.5, 13.6, 13.9, 13.10 and 13.11 of this Agreement. Notwithstanding the foregoing, Section 5.1 shall not survive if the Agreement is terminated for material breach.
13.5 Entire Agreement
This Agreement constitutes the complete agreement between the parties and supersedes all prior or contemporaneous discussions, representations, and proposals, written or oral, with respect to the subject matters discussed herein, with the exception of the non-disclosure agreement executed by the parties in connection with this Agreement ("Non-Disclosure Agreement"), if any, shall be subject to Section 12. No modification of this Agreement shall be effective unless contained in a writing executed by an authorized representative of each party. No term or condition contained in Licensee's purchase order shall apply unless expressly accepted by Digia in writing. If any provision of the Agreement is found void or unenforceable, the remainder shall remain valid and enforceable according to its terms. If any remedy provided is determined to have failed for its essential purpose, all limitations of liability and exclusions of damages set forth in this Agreement shall remain in effect.
13.6 Payment and Taxes
If credit has been extended to Licensee by Digia, all payments under this Agreement are due within thirty (30) days of the date Digia mails its invoice to Licensee. If Digia has not extended credit to Licensee, Licensee shall be required to make payment concurrent with the delivery of the Licensed Software by Digia. All amounts payable are gross amounts but exclusive of any value added tax, use tax, sales tax or similar tax. Licensee shall be entitled to withhold from payments any applicable withholding taxes and comply with all applicable tax and employment legislation. Each party shall pay all taxes (including, but not limited to, taxes based upon its income) or levies imposed on it under applicable laws, regulations and tax treaties as a result of this Agreement and any payments made hereunder (including those required to be withheld or deducted from payments). Each party shall furnish evidence of such paid taxes as is sufficient to enable the other party to obtain any credits available to it, including original withholding tax certificates.
13.7 Force Majeure
Neither party shall be liable to the other for any delay or non-performance of its obligations hereunder other than the obligation of paying the license fees in the event and to the extent that such delay or non-performance is due to an event of Force Majeure (as defined below). If any event of Force Majeure results in a delay or non-performance of a party for a period of three (3) months or longer, then either party shall have the right to terminate this Agreement with immediate effect without any liability (except for the obligations of payment arising prior to the event of Force Majeure) towards the other party. A "Force Majeure" event shall mean an act of God, terrorist attack or other catastrophic event of nature that prevents either party for fulfilling its obligations under this Agreement.
13.8 Notices
Any notice given by one party to the other shall be deemed properly given and deemed received if specifically acknowledged by the receiving party in writing or when successfully delivered to the recipient by hand, fax, or special courier during normal business hours on a business day to the addresses specified below. Each communication and document made or delivered by one party to the other party pursuant to this Agreement shall be in the English language or accompanied by a translation thereof.
Notices to Digia shall be given to:
Digia Finland Ltd
Attn: Qt / Legal
Valimotie 21
FI-00380 Helsinki
Finland
Fax: +358 10 313 3700
13.9 Export Control
Licensee acknowledges that the Licensed Software may be subject to export control restrictions of various countries. Licensee shall fully comply with all applicable export license restrictions and requirements as well as with all laws and regulations relating to the importation of the Licensed Software and/or Modified Software and/or Applications and shall procure all necessary governmental authorizations, including without limitation, all necessary licenses, approvals, permissions or consents, where necessary for the re-exportation of the Licensed Software, Modified Software or Applications.
13.10 Governing Law and Legal Venue
This Agreement shall be construed and interpreted in accordance with the laws of Finland, excluding its choice of law provisions. Any disputes, controversy or claim arising out of or relating to this Agreement, or the breach, termination or validity thereof shall be shall be finally settled by arbitration in accordance with the Arbitration Rules of the Central Chamber of Commerce of Finland. The arbitration tribunal shall consist of one (1), or if either Party so requires, of three (3), arbitrators. The award shall be final and binding and enforceable in any court of competent jurisdiction. The arbitration shall be held in Helsinki, Finland and the process shall be conducted in the English language.
13.11 No Implied License
There are no implied licenses or other implied rights granted under this Agreement, and all rights, save for those expressly granted hereunder, shall remain with Digia and its licensors. In addition, no licenses or immunities are granted to the combination of the Licensed Software and/or Modified Software, as applicable, with any other software or hardware not delivered by Digia under this Agreement.
Appendix 1
1. Parts of the Licensed Software that are permitted for distribution ("Redistributables"):
- The Licensed Software's main and plug-in libraries in object code form
- The Licensed Software's configuration tool ("qtconfig")
- The Licensed Software's help tool in object code/executable form ("Qt Assistant")
- The Licensed Software's internationalization tools in object code/executable form ("Qt Linguist", "lupdate", "lrelease")
- The Licensed Software's designer tool ("Qt Designer")
- The Licensed Software's IDE tool ("Qt Creator")
- The Licensed Software's QML ("Qt Quick") launcher tool in object code/executable form
2. Parts of the Licensed Software that are not permitted for distribution include, but are not limited to:
- The Licensed Software's source code and header files
- The Licensed Software's documentation
- The Licensed Software's tool for writing makefiles ("qmake")
- The Licensed Software's Meta Object Compiler ("moc")
- The Licensed Software's User Interface Compiler ("uic" or in the case of Qt Jambi: "juic")
- The Licensed Software's Resource Compiler ("rcc")
- The Licensed Software's generator (only in the case of Qt Jambi if applicable)
- The Licensed Software's Qt SDK and its components
QT COMMERCIAL LICENSE AGREEMENT
DIGIA FINLAND LTD | VALIMOTIE 21 | FI-00380 HELSINKI FINLAND | TEL +358 (0) 10
313 3000 | FAX +358 (0) 10 313 3700
PLACE OF REGISTERED OFFICE: HELSINKI | VAT REG. | BUSINESS ID 1091248-4 |
WWW.DIGIA.COM
</pre></body></html>

481
doc/License.html Normal file
View File

@ -0,0 +1,481 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GNU General Public License v2.0 - GNU Project - Free Software Foundation (FSF)</title>
<link rel="alternate" type="application/rdf+xml" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.rdf">
</head>
<body>
<h3><a id="SEC1">GNU GENERAL PUBLIC LICENSE</a></h3>
<p>
Version 2, June 1991
</p>
<pre>Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
</pre>
<h3><a id="preamble"></a><a id="SEC2">Preamble</a></h3>
<p>
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
</p>
<p>
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
</p>
<p>
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
</p>
<p>
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
</p>
<p>
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
</p>
<p>
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
</p>
<p>
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
</p>
<p>
The precise terms and conditions for copying, distribution and
modification follow.
</p>
<h3><a id="terms"></a><a id="SEC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</a></h3>
<a id="section0"></a><p>
<strong>0.</strong>
This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
</p>
<p>
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
</p>
<a id="section1"></a><p>
<strong>1.</strong>
You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
</p>
<p>
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
</p>
<a id="section2"></a><p>
<strong>2.</strong>
You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
</p>
<dl>
<dt></dt>
<dd>
<strong>a)</strong>
You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
</dd>
<dt></dt>
<dd>
<strong>b)</strong>
You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
</dd>
<dt></dt>
<dd>
<strong>c)</strong>
If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
</dd>
</dl>
<p>
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
</p>
<p>
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
</p>
<p>
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
</p>
<a id="section3"></a><p>
<strong>3.</strong>
You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
</p>
<!-- we use this doubled UL to get the sub-sections indented, -->
<!-- while making the bullets as unobvious as possible. -->
<dl>
<dt></dt>
<dd>
<strong>a)</strong>
Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
</dd>
<dt></dt>
<dd>
<strong>b)</strong>
Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
</dd>
<dt></dt>
<dd>
<strong>c)</strong>
Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
</dd>
</dl>
<p>
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
</p>
<p>
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
</p>
<a id="section4"></a><p>
<strong>4.</strong>
You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
</p>
<a id="section5"></a><p>
<strong>5.</strong>
You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
</p>
<a id="section6"></a><p>
<strong>6.</strong>
Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
</p>
<a id="section7"></a><p>
<strong>7.</strong>
If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
</p>
<p>
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
</p>
<p>
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
</p>
<p>
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
</p>
<a id="section8"></a><p>
<strong>8.</strong>
If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
</p>
<a id="section9"></a><p>
<strong>9.</strong>
The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
</p>
<p>
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
</p>
<a id="section10"></a><p>
<strong>10.</strong>
If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
</p>
<a id="section11"></a><p><strong>NO WARRANTY</strong></p>
<p>
<strong>11.</strong>
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
</p>
<a id="section12"></a><p>
<strong>12.</strong>
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
</p>
<h3>END OF TERMS AND CONDITIONS</h3>
<h3><a id="howto"></a><a id="SEC4">How to Apply These Terms to Your New Programs</a></h3>
<p>
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
</p>
<p>
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
</p>
<pre><var>one line to give the program's name and an idea of what it does.</var>
Copyright (C) <var>yyyy</var> <var>name of author</var>
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 the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</pre>
<p>
Also add information on how to contact you by electronic and paper mail.
</p>
<p>
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
</p>
<pre>Gnomovision version 69, Copyright (C) <var>year</var> <var>name of author</var>
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
</pre>
<p>
The hypothetical commands <samp>`show w'</samp> and <samp>`show c'</samp> should show
the appropriate parts of the General Public License. Of course, the
commands you use may be called something other than <samp>`show w'</samp> and
<samp>`show c'</samp>; they could even be mouse-clicks or menu items--whatever
suits your program.
</p>
<p>
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
</p>
<pre>Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
<var>signature of Ty Coon</var>, 1 April 1989
Ty Coon, President of Vice
</pre>
<p>
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the
<a href="http://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a>
instead of this License.
</p>
</body></html>

38
doc/Readme.txt Normal file
View File

@ -0,0 +1,38 @@
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).

301
gui/Dialog.ui Normal file
View File

@ -0,0 +1,301 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>720</width>
<height>384</height>
</rect>
</property>
<property name="windowTitle">
<string>MediaInfoXP - Minimalist GUI for MediaInfo</string>
</property>
<property name="windowIcon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/MediaInfoXP.png</normaloff>:/MediaInfoXP.png</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="font">
<font>
<family>Lucida Console</family>
</font>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="analyzeButton">
<property name="minimumSize">
<size>
<width>150</width>
<height>25</height>
</size>
</property>
<property name="text">
<string>Analyze File....</string>
</property>
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/MediaInfoXP.png</normaloff>:/MediaInfoXP.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="versionLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>91</red>
<green>70</green>
<blue>70</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>91</red>
<green>70</green>
<blue>70</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>(VERSION_INFO)</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="exitButton">
<property name="minimumSize">
<size>
<width>150</width>
<height>25</height>
</size>
</property>
<property name="text">
<string>Exit Program</string>
</property>
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_quit.png</normaloff>:/res/ico_quit.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>720</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>Application</string>
</property>
<addaction name="actionOpen"/>
<addaction name="actionClear"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="actionLink_MuldeR"/>
<addaction name="actionLink_MediaInfo"/>
<addaction name="actionLink_Discuss"/>
<addaction name="separator"/>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuHelp"/>
</widget>
<action name="actionExit">
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_quit.png</normaloff>:/res/ico_quit.png</iconset>
</property>
<property name="text">
<string>Exit</string>
</property>
</action>
<action name="actionAbout">
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_info.png</normaloff>:/res/ico_info.png</iconset>
</property>
<property name="text">
<string>About...</string>
</property>
</action>
<action name="actionOpen">
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_folder.png</normaloff>:/res/ico_folder.png</iconset>
</property>
<property name="text">
<string>Open Media File...</string>
</property>
</action>
<action name="actionLink_MuldeR">
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_link.png</normaloff>:/res/ico_link.png</iconset>
</property>
<property name="text">
<string>MuldeR's OpenSource Projects</string>
</property>
</action>
<action name="actionLink_MediaInfo">
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_link.png</normaloff>:/res/ico_link.png</iconset>
</property>
<property name="text">
<string>Official MediaInfo Web-Site</string>
</property>
</action>
<action name="actionClear">
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_clear.png</normaloff>:/res/ico_clear.png</iconset>
</property>
<property name="text">
<string>Clear Display</string>
</property>
</action>
<action name="actionLink_Discuss">
<property name="icon">
<iconset resource="../MediaInfoXP.qrc">
<normaloff>:/res/ico_link.png</normaloff>:/res/ico_link.png</iconset>
</property>
<property name="text">
<string>MediaInfo Discussion (Doom9)</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>analyzeButton</tabstop>
<tabstop>exitButton</tabstop>
<tabstop>textBrowser</tabstop>
</tabstops>
<resources>
<include location="../MediaInfoXP.qrc"/>
<include location="../MediaInfoXP.qrc"/>
</resources>
<connections>
<connection>
<sender>actionExit</sender>
<signal>triggered()</signal>
<receiver>MainWindow</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>399</x>
<y>299</y>
</hint>
</hints>
</connection>
<connection>
<sender>exitButton</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>546</x>
<y>466</y>
</hint>
<hint type="destinationlabel">
<x>316</x>
<y>244</y>
</hint>
</hints>
</connection>
</connections>
</ui>

BIN
res/ico_clear.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

BIN
res/ico_discard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

BIN
res/ico_folder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

BIN
res/ico_info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 778 B

BIN
res/ico_link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

BIN
res/ico_qt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
res/ico_quit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

BIN
res/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

47
src/Config.h Normal file
View File

@ -0,0 +1,47 @@
///////////////////////////////////////////////////////////////////////////////
// MediaInfoXP
// 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
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
//Version
static unsigned int mixp_versionMajor = 2;
static unsigned int mixp_versionMinor = 0;
//MediaInfo Version
static unsigned int mixp_miVersionMajor = 0;
static unsigned int mixp_miVersionMinor = 7;
static unsigned int mixp_miVersionPatch = 63;
//Build date
static const char *mixp_buildDate = __DATE__;
static const char *mixp_buildTime = __TIME__;
//Show console
#define MIXP_CONSOLE (0)
//Debug build
#if defined(_DEBUG) && defined(QT_DEBUG) && !defined(NDEBUG) && !defined(QT_NO_DEBUG)
#define MIXP_DEBUG (1)
#else
#define MIXP_DEBUG (0)
#endif
//Helper macros
#define MIXP_DELETE_OBJ(PTR) do { if((PTR)) { delete ((PTR)); (PTR) = NULL; } } while (0)
#define QWCHAR(STR) reinterpret_cast<const wchar_t*>(STR.utf16())

446
src/Main.cpp Normal file
View File

@ -0,0 +1,446 @@
///////////////////////////////////////////////////////////////////////////////
// MediaInfoXP
// 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
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
//StdLib
#include <cstdio>
#include <iostream>
#include <fstream>
#include <ctime>
#pragma intrinsic(_InterlockedExchange)
//Qt
#include <QApplication>
#include <QMutex>
#include <QUuid>
#include <QDir>
#include <QLibrary>
//Win32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <io.h>
#include <fcntl.h>
#include <Objbase.h>
#ifdef QT_NODLL
#include <QtPlugin>
Q_IMPORT_PLUGIN(qico)
Q_IMPORT_PLUGIN(qsvg)
Q_IMPORT_PLUGIN(qtga)
#endif
#include "Config.h"
#include "MainWindow.h"
///////////////////////////////////////////////////////////////////////////////
// Debug Console
///////////////////////////////////////////////////////////////////////////////
bool g_bHaveConsole = false;
static void init_console(void)
{
if(AllocConsole())
{
int hCrtStdOut = _open_osfhandle((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE), _O_WRONLY);
int hCrtStdErr = _open_osfhandle((intptr_t) GetStdHandle(STD_ERROR_HANDLE), _O_WRONLY);
FILE *hfStdOut = (hCrtStdOut >= 0) ? _fdopen(hCrtStdOut, "wb") : NULL;
FILE *hfStdErr = (hCrtStdErr >= 0) ? _fdopen(hCrtStdErr, "wb") : NULL;
if(hfStdOut) { *stdout = *hfStdOut; std::cout.rdbuf(new std::filebuf(hfStdOut)); }
if(hfStdErr) { *stderr = *hfStdErr; std::cerr.rdbuf(new std::filebuf(hfStdErr)); }
HWND hwndConsole = GetConsoleWindow();
if((hwndConsole != NULL) && (hwndConsole != INVALID_HANDLE_VALUE))
{
HMENU hMenu = GetSystemMenu(hwndConsole, 0);
EnableMenuItem(hMenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
RemoveMenu(hMenu, SC_CLOSE, MF_BYCOMMAND);
SetWindowPos(hwndConsole, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_FRAMECHANGED);
SetWindowLong(hwndConsole, GWL_STYLE, GetWindowLong(hwndConsole, GWL_STYLE) & (~WS_MAXIMIZEBOX) & (~WS_MINIMIZEBOX));
SetWindowPos(hwndConsole, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER|SWP_FRAMECHANGED);
}
g_bHaveConsole = true;
}
}
///////////////////////////////////////////////////////////////////////////////
// Detect TEMP folder
///////////////////////////////////////////////////////////////////////////////
QString mixp_getAppDataFolder(void)
{
typedef HRESULT (WINAPI *SHGetKnownFolderPathFun)(__in const GUID &rfid, __in DWORD dwFlags, __in HANDLE hToken, __out PWSTR *ppszPath);
typedef HRESULT (WINAPI *SHGetFolderPathFun)(__in HWND hwndOwner, __in int nFolder, __in HANDLE hToken, __in DWORD dwFlags, __out LPWSTR pszPath);
static const int CSIDL_LOCAL_APPDATA = 0x001c;
static const GUID GUID_LOCAL_APPDATA = {0xF1B32785,0x6FBA,0x4FCF,{0x9D,0x55,0x7B,0x8E,0x7F,0x15,0x70,0x91}};
static SHGetKnownFolderPathFun SHGetKnownFolderPathPtr = NULL;
static SHGetFolderPathFun SHGetFolderPathPtr = NULL;
if((!SHGetKnownFolderPathPtr) && (!SHGetFolderPathPtr))
{
QLibrary kernel32Lib("shell32.dll");
if(kernel32Lib.load())
{
SHGetKnownFolderPathPtr = (SHGetKnownFolderPathFun) kernel32Lib.resolve("SHGetKnownFolderPath");
SHGetFolderPathPtr = (SHGetFolderPathFun) kernel32Lib.resolve("SHGetFolderPathW");
}
}
QString folder;
if(SHGetKnownFolderPathPtr)
{
WCHAR *path = NULL;
if(SHGetKnownFolderPathPtr(GUID_LOCAL_APPDATA, 0x00008000, NULL, &path) == S_OK)
{
//MessageBoxW(0, path, L"SHGetKnownFolderPath", MB_TOPMOST);
QDir folderTemp = QDir(QDir::fromNativeSeparators(QString::fromUtf16(reinterpret_cast<const unsigned short*>(path))));
if(!folderTemp.exists())
{
folderTemp.mkpath(".");
}
if(folderTemp.exists())
{
folder = folderTemp.canonicalPath();
}
CoTaskMemFree(path);
}
}
else if(SHGetFolderPathPtr)
{
WCHAR *path = new WCHAR[4096];
if(SHGetFolderPathPtr(NULL, CSIDL_LOCAL_APPDATA, NULL, NULL, path) == S_OK)
{
//MessageBoxW(0, path, L"SHGetFolderPathW", MB_TOPMOST);
QDir folderTemp = QDir(QDir::fromNativeSeparators(QString::fromUtf16(reinterpret_cast<const unsigned short*>(path))));
if(!folderTemp.exists())
{
folderTemp.mkpath(".");
}
if(folderTemp.exists())
{
folder = folderTemp.canonicalPath();
}
}
delete [] path;
}
return folder;
}
QString mixp_getTempFolder()
{
QString tempFolder;
static const char *TEMP_STR = "Temp";
const QString WRITE_TEST_DATA = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.";
const QString SUB_FOLDER = QUuid::createUuid().toString();
//Try the %TMP% or %TEMP% directory first
QDir temp = QDir::temp();
if(temp.exists())
{
temp.mkdir(SUB_FOLDER);
if(temp.cd(SUB_FOLDER) && temp.exists())
{
QFile testFile(QString("%1/~test.tmp").arg(temp.canonicalPath()));
if(testFile.open(QIODevice::ReadWrite))
{
if(testFile.write(WRITE_TEST_DATA.toLatin1().constData()) >= strlen(WRITE_TEST_DATA.toLatin1().constData()))
{
tempFolder = temp.canonicalPath();
}
testFile.remove();
}
}
if(!tempFolder.isEmpty())
{
return tempFolder;
}
}
//Create TEMP folder in %LOCALAPPDATA%
QDir localAppData = QDir(mixp_getAppDataFolder());
if(!localAppData.path().isEmpty())
{
if(!localAppData.exists())
{
localAppData.mkpath(".");
}
if(localAppData.exists())
{
if(!localAppData.entryList(QDir::AllDirs).contains(TEMP_STR, Qt::CaseInsensitive))
{
localAppData.mkdir(TEMP_STR);
}
if(localAppData.cd(TEMP_STR) && localAppData.exists())
{
localAppData.mkdir(SUB_FOLDER);
if(localAppData.cd(SUB_FOLDER) && localAppData.exists())
{
QFile testFile(QString("%1/~test.tmp").arg(localAppData.canonicalPath()));
if(testFile.open(QIODevice::ReadWrite))
{
if(testFile.write(WRITE_TEST_DATA.toLatin1().constData()) >= strlen(WRITE_TEST_DATA.toLatin1().constData()))
{
tempFolder = localAppData.canonicalPath();
}
testFile.remove();
}
}
}
}
if(!tempFolder.isEmpty())
{
return tempFolder;
}
}
qFatal("Failed to determine TEMP folder!");
return QString();
}
void mixp_clean_folder(const QString &folderPath)
{
QDir tempFolder(folderPath);
QFileInfoList entryList = tempFolder.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
for(int i = 0; i < entryList.count(); i++)
{
if(entryList.at(i).isDir())
{
mixp_clean_folder(entryList.at(i).canonicalFilePath());
}
else
{
for(int j = 0; j < 5; j++)
{
if(QFile::remove(entryList.at(i).canonicalFilePath()))
{
break;
}
}
}
}
tempFolder.rmdir(".");
}
///////////////////////////////////////////////////////////////////////////////
// MAIN function
///////////////////////////////////////////////////////////////////////////////
int mixp_main(int argc, char* argv[])
{
//Show console?
bool bConsole = MIXP_CONSOLE;
for(int i = 1; i < argc; i++)
{
if(_stricmp(argv[i], "--console") == 0) bConsole = true;
if(_stricmp(argv[i], "--no-console") == 0) bConsole = false;
}
if(bConsole) init_console();
qDebug("MediaInfoXP [%s]", mixp_buildDate);
qDebug("Copyright (c) 2004-%s LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved.", &mixp_buildDate[7]);
qDebug("Built with Qt v%s, running with Qt v%s.\n", QT_VERSION_STR, qVersion());
//Get temp folder
const QString tempFolder = mixp_getTempFolder();
qDebug("TEMP folder is:\n%s\n", QDir::toNativeSeparators(tempFolder).toUtf8().constData());
//Create application
QApplication *application = new QApplication(argc, argv);
application->setWindowIcon(QIcon(":/QtTestApp.ico"));
//Create main window
CMainWindow *mainWindow = new CMainWindow(tempFolder);
mainWindow->show();
//Run application
const int exit_code = application->exec();
qDebug("\nTime to say goodbye... (%d)\n", exit_code);
//Clean up
MIXP_DELETE_OBJ(mainWindow);
MIXP_DELETE_OBJ(application);
mixp_clean_folder(tempFolder);
return exit_code;
}
///////////////////////////////////////////////////////////////////////////////
// Error handlers
///////////////////////////////////////////////////////////////////////////////
void mixp_fatal_exit(const wchar_t *msg)
{
static volatile long s_lock = 0L;
if(_InterlockedExchange(&s_lock, 1L) == 0)
{
FatalAppExitW(0, msg);
TerminateProcess(GetCurrentProcess(), -1);
}
}
LONG WINAPI mixp_exception_handler(__in struct _EXCEPTION_POINTERS *ExceptionInfo)
{
mixp_fatal_exit(L"Unhandeled exception handler invoked, application will exit!");
return LONG_MAX;
}
void mixp_invalid_param_handler(const wchar_t* exp, const wchar_t* fun, const wchar_t* fil, unsigned int, uintptr_t)
{
mixp_fatal_exit(L"Invalid parameter handler invoked, application will exit!");
}
///////////////////////////////////////////////////////////////////////////////
// Message Handler
///////////////////////////////////////////////////////////////////////////////
static void mixp_console_color(FILE* file, WORD attributes)
{
const HANDLE hConsole = (HANDLE)(_get_osfhandle(_fileno(file)));
if((hConsole != NULL) && (hConsole != INVALID_HANDLE_VALUE))
{
SetConsoleTextAttribute(hConsole, attributes);
}
}
void mixp_message_handler(QtMsgType type, const char *msg)
{
if(g_bHaveConsole)
{
static const char *GURU_MEDITATION = "\n\nGURU MEDITATION !!!\n\n";
static volatile long s_lock = 0L;
while(_InterlockedExchange(&s_lock, 1L) != 0) __noop;
UINT oldOutputCP = GetConsoleOutputCP();
if(oldOutputCP != CP_UTF8) SetConsoleOutputCP(CP_UTF8);
switch(type)
{
case QtCriticalMsg:
case QtFatalMsg:
fflush(stdout);
fflush(stderr);
mixp_console_color(stderr, FOREGROUND_RED | FOREGROUND_INTENSITY);
fprintf(stderr, GURU_MEDITATION);
fprintf(stderr, "%s\n", msg);
fflush(stderr);
break;
case QtWarningMsg:
mixp_console_color(stderr, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
fprintf(stderr, "%s\n", msg);
fflush(stderr);
break;
default:
mixp_console_color(stderr, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
fprintf(stderr, "%s\n", msg);
fflush(stderr);
break;
}
mixp_console_color(stderr, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED);
if(oldOutputCP != CP_UTF8) SetConsoleOutputCP(oldOutputCP);
_InterlockedExchange(&s_lock, 0L);
}
if(type == QtCriticalMsg || type == QtFatalMsg)
{
mixp_fatal_exit(L"The application has encountered a critical error and will exit now!");
}
}
///////////////////////////////////////////////////////////////////////////////
// Applicaton entry point
///////////////////////////////////////////////////////////////////////////////
static int _main(int argc, char* argv[])
{
if(MIXP_DEBUG)
{
qInstallMsgHandler(mixp_message_handler);
return mixp_main(argc, argv);
}
else
{
int iResult = -1;
try
{
qInstallMsgHandler(mixp_message_handler);
iResult = mixp_main(argc, argv);
}
catch(char *error)
{
fflush(stdout);
fflush(stderr);
fprintf(stderr, "\nGURU MEDITATION !!!\n\nException error message: %s\n", error);
mixp_fatal_exit(L"Unhandeled C++ exception error, application will exit!");
}
catch(int error)
{
fflush(stdout);
fflush(stderr);
fprintf(stderr, "\nGURU MEDITATION !!!\n\nException error code: 0x%X\n", error);
mixp_fatal_exit(L"Unhandeled C++ exception error, application will exit!");
}
catch(...)
{
fflush(stdout);
fflush(stderr);
fprintf(stderr, "\nGURU MEDITATION !!!\n");
mixp_fatal_exit(L"Unhandeled C++ exception error, application will exit!");
}
return iResult;
}
}
int main(int argc, char* argv[])
{
if(MIXP_DEBUG)
{
return _main(argc, argv);
}
else
{
__try
{
SetUnhandledExceptionFilter(mixp_exception_handler);
_set_invalid_parameter_handler(mixp_invalid_param_handler);
return _main(argc, argv);
}
__except(1)
{
fflush(stdout);
fflush(stderr);
fprintf(stderr, "\nGURU MEDITATION !!!\n\nUnhandeled structured exception error! [code: 0x%X]\n", GetExceptionCode());
mixp_fatal_exit(L"Unhandeled structured exception error, application will exit!");
}
}
}

475
src/MainWindow.cpp Normal file
View File

@ -0,0 +1,475 @@
///////////////////////////////////////////////////////////////////////////////
// MediaInfoXP
// 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
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
#include "MainWindow.h"
//UIC includes
#include "../tmp/Common/uic/Dialog.h"
//Qt includes
#include <QMessageBox>
#include <QFileDialog>
#include <QStyleFactory>
#include <QTimer>
#include <QResource>
#include <QProcess>
#include <QCloseEvent>
#include <QScrollBar>
#include <QDesktopServices>
//Win32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
//Internal
#include "Config.h"
//Macros
#define SET_FONT_BOLD(WIDGET,BOLD) { QFont _font = WIDGET->font(); _font.setBold(BOLD); WIDGET->setFont(_font); }
#define SET_TEXT_COLOR(WIDGET,COLOR) { QPalette _palette = WIDGET->palette(); _palette.setColor(QPalette::WindowText, (COLOR)); _palette.setColor(QPalette::Text, (COLOR)); WIDGET->setPalette(_palette); }
////////////////////////////////////////////////////////////
// Constructor
////////////////////////////////////////////////////////////
const char *LINK_MULDER = "http://muldersoft.com/";
const char *LINK_MEDIAINFO = "http://mediainfo.sourceforge.net/en";
const char *LINK_DISCUSS = "http://forum.doom9.org/showthread.php?t=96516";
CMainWindow::CMainWindow(const QString &tempFolder, QWidget *parent)
:
QMainWindow(parent),
m_tempFolder(tempFolder),
ui(new Ui::MainWindow)
{
//Init UI
qApp->setStyle(QStyleFactory::create("plastique"));
ui->setupUi(this);
setMinimumSize(this->size());
//Setup links
ui->actionLink_MuldeR->setData(QVariant(QString::fromLatin1(LINK_MULDER)));
ui->actionLink_MediaInfo->setData(QVariant(QString::fromLatin1(LINK_MEDIAINFO)));
ui->actionLink_Discuss->setData(QVariant(QString::fromLatin1(LINK_DISCUSS)));
//Setup connections
connect(ui->analyzeButton, SIGNAL(clicked()), this, SLOT(analyzeButtonClicked()));
connect(ui->actionOpen, SIGNAL(triggered()), this, SLOT(analyzeButtonClicked()));
connect(ui->actionClear, SIGNAL(triggered()), this, SLOT(clearButtonClicked()));
connect(ui->actionLink_MuldeR, SIGNAL(triggered()), this, SLOT(linkTriggered()));
connect(ui->actionLink_MediaInfo, SIGNAL(triggered()), this, SLOT(linkTriggered()));
connect(ui->actionLink_Discuss, SIGNAL(triggered()), this, SLOT(linkTriggered()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAboutScreen()));
ui->versionLabel->installEventFilter(this);
//Create label
m_floatingLabel = new QLabel(ui->textBrowser);
m_floatingLabel->setText(">> You can drop any type of media files here <<");
m_floatingLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
m_floatingLabel->show();
SET_TEXT_COLOR(m_floatingLabel, Qt::darkGray);
SET_FONT_BOLD(m_floatingLabel, true);
//Clear
m_mediaInfoPath.clear();
m_mediaInfoHandle = INVALID_HANDLE_VALUE;
m_process = NULL;
}
////////////////////////////////////////////////////////////
// Destructor
////////////////////////////////////////////////////////////
CMainWindow::~CMainWindow(void)
{
if(m_mediaInfoHandle != INVALID_HANDLE_VALUE)
{
CloseHandle(m_mediaInfoHandle);
m_mediaInfoHandle = INVALID_HANDLE_VALUE;
}
MIXP_DELETE_OBJ(m_process);
MIXP_DELETE_OBJ(m_floatingLabel);
}
////////////////////////////////////////////////////////////
// EVENTS
////////////////////////////////////////////////////////////
void CMainWindow::showEvent(QShowEvent *event)
{
QMainWindow::showEvent(event);
resize(this->minimumSize());
ui->versionLabel->setText(QString("v%1 (%2)").arg(QString().sprintf("%u.%02u", mixp_versionMajor, mixp_versionMinor), getBuildDate().toString(Qt::ISODate)));
resizeEvent(NULL);
setAcceptDrops(true);
}
void CMainWindow::closeEvent(QCloseEvent *event)
{
if(m_process)
{
if(m_process->state() != QProcess::NotRunning)
{
event->ignore();
}
}
}
void CMainWindow::resizeEvent(QResizeEvent *event)
{
if(event)
{
QMainWindow::resizeEvent(event);
}
if(const QWidget *const viewPort = ui->textBrowser->viewport())
{
m_floatingLabel->setGeometry(0, 0, viewPort->width(), viewPort->height());
}
}
void CMainWindow::dragEnterEvent(QDragEnterEvent *event)
{
bool accept[2] = {false, false};
foreach(const QString &fmt, event->mimeData()->formats())
{
accept[0] = accept[0] || fmt.contains("text/uri-list", Qt::CaseInsensitive);
accept[1] = accept[1] || fmt.contains("FileNameW", Qt::CaseInsensitive);
}
if(accept[0] && accept[1])
{
event->acceptProposedAction();
}
}
void CMainWindow::dropEvent(QDropEvent *event)
{
QStringList droppedFiles;
QList<QUrl> urls = event->mimeData()->urls();
while(!urls.isEmpty())
{
QUrl currentUrl = urls.takeFirst();
QFileInfo file(currentUrl.toLocalFile());
if(file.exists() && file.isFile())
{
m_droppedFile = file.canonicalFilePath();
QTimer::singleShot(0, this, SLOT(handleDroppedFile()));
break;
}
}
}
bool CMainWindow::eventFilter(QObject *o, QEvent *e)
{
if((o == ui->versionLabel) && (e->type() == QEvent::MouseButtonPress))
{
QTimer::singleShot(0, this, SLOT(showAboutScreen()));
return true;
}
return QMainWindow::eventFilter(o, e);
}
////////////////////////////////////////////////////////////
// SLOTS
////////////////////////////////////////////////////////////
void CMainWindow::analyzeButtonClicked(void)
{
const QString selectedFile = QFileDialog::getOpenFileName(this, tr("Select file to analyze..."), QString(), tr("All supported media files (*.*)"));
if(!selectedFile.isEmpty())
{
analyzeFile(selectedFile);
}
}
void CMainWindow::clearButtonClicked(void)
{
if(m_process)
{
if(m_process->state() != QProcess::NotRunning)
{
return;
}
}
ui->textBrowser->clear();
m_floatingLabel->show();
}
void CMainWindow::outputAvailable(void)
{
if(m_process)
{
while(m_process->canReadLine())
{
QByteArray line = m_process->readLine();
ui->textBrowser->append(QString::fromUtf8(line).trimmed());
}
}
}
void CMainWindow::processStarted(void)
{
ui->textBrowser->clear();
}
void CMainWindow::processFinished(void)
{
outputAvailable();
ui->analyzeButton->setEnabled(true);
ui->exitButton->setEnabled(true);
ui->textBrowser->verticalScrollBar()->setValue(0);
ui->textBrowser->horizontalScrollBar()->setValue(0);
}
void CMainWindow::linkTriggered(void)
{
QObject *obj = QObject::sender();
if(QAction *action = dynamic_cast<QAction*>(obj))
{
QDesktopServices::openUrl(QUrl(action->data().toString()));
}
}
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("Copyright (c) 2004-%04d LoRd_MuldeR &lt;mulder2@gmx.de&gt;. Some rights reserved.<br>", qMax(getBuildDate().year(),QDate::currentDate().year()));
text += QString().sprintf("Built on %s at %s, using Qt Framework v%s.<br><br>", getBuildDate().toString(Qt::ISODate).toLatin1().constData(), 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 &lt;http://www.gnu.org/&gt;.<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("This application is powered by MediaInfo v%u.%u.%02u<br>", mixp_miVersionMajor, mixp_miVersionMinor, mixp_miVersionPatch);
text += QString().sprintf("Free and OpenSource tool for displaying technical information about media files.<br>");
text += QString().sprintf("Copyright (c) 2002-2013 MediaArea.net SARL. All rights reserved.<br><br>");
text += QString().sprintf("Redistribution and use is permitted according to the (2-Clause) BSD License.<br>");
text += QString().sprintf("Please see <a href=\"%s\">%s</a> for more information.<br></tt></nobr>", LINK_MEDIAINFO, LINK_MEDIAINFO);
QMessageBox aboutBox(this);
aboutBox.setIconPixmap(QIcon(":/res/logo.png").pixmap(64,64));
aboutBox.setWindowTitle(tr("About..."));
aboutBox.setText(text.replace("-", "&minus;"));
if(QPushButton *btn = aboutBox.addButton(tr("About Qt"), QMessageBox::NoRole))
{
btn->setIcon(QIcon(":/res/ico_qt.png"));
btn->setMinimumWidth(120);
}
if(QPushButton *btn = aboutBox.addButton(tr("Discard"), QMessageBox::NoRole))
{
btn->setIcon(QIcon(":/res/ico_discard.png"));
btn->setMinimumWidth(104);
aboutBox.setEscapeButton(btn);
}
forever
{
const int ret = aboutBox.exec();
if(ret == 0)
{
QMessageBox::aboutQt(this);
continue;
}
break;
}
}
void CMainWindow::handleDroppedFile(void)
{
if(!m_droppedFile.isEmpty())
{
analyzeFile(m_droppedFile);
m_droppedFile.clear();
}
}
////////////////////////////////////////////////////////////
// PRIVATE FUNCTIONS
////////////////////////////////////////////////////////////
QDate CMainWindow::getBuildDate(void)
{
QDate buildDate(2000, 1, 1);
static const char *months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
int date[3] = {0, 0, 0}; char temp[12] = {'\0'};
strncpy_s(temp, 12, mixp_buildDate, _TRUNCATE);
if(strlen(temp) == 11)
{
temp[3] = temp[6] = '\0';
date[2] = atoi(&temp[4]);
date[0] = atoi(&temp[7]);
for(int j = 0; j < 12; j++)
{
if(!_strcmpi(&temp[0], months[j]))
{
date[1] = j+1;
break;
}
}
buildDate = QDate(date[0], date[1], date[2]);
}
return buildDate;
}
#define VALIDATE_MEDIAINFO(HANDLE) do \
{ \
if(HANDLE != INVALID_HANDLE_VALUE) \
{ \
QByteArray buffer(mediaInfoRes.size(), '\0'); DWORD bytesRead = 0; \
if(GetFileSize(HANDLE, NULL) == mediaInfoRes.size()) \
{ \
SetFilePointer(HANDLE, 0L, NULL, FILE_BEGIN); \
ReadFile(HANDLE, buffer.data(), mediaInfoRes.size(), &bytesRead, NULL); \
} \
if(memcmp(buffer.constData(), mediaInfoRes.data(), mediaInfoRes.size()) != 0) \
{ \
qWarning("MediaInfo binary failed to validate!"); \
m_mediaInfoPath.clear(); \
} \
} \
} \
while(0)
QString CMainWindow::getMediaInfoPath(void)
{
QResource mediaInfoRes(":/res/MediaInfo.i386.exe");
if(!mediaInfoRes.isValid())
{
qFatal("MediaInfo resource could not be initialized!");
return QString();
}
//Already existsing?
if(!m_mediaInfoPath.isEmpty())
{
QFileInfo mediaInfoNfo(m_mediaInfoPath);
if(!(mediaInfoNfo.exists() && mediaInfoNfo.isFile()))
{
qWarning("MediaInfo binary does NOT seem to exist any longer!\n");
m_mediaInfoPath.clear();
}
}
//Validate file content
VALIDATE_MEDIAINFO(m_mediaInfoHandle);
//Extract MediaInfo
if(m_mediaInfoPath.isEmpty())
{
qDebug("MediaInfo binary not existing yet, going to extract now...\n");
if(m_mediaInfoHandle != INVALID_HANDLE_VALUE)
{
CloseHandle(m_mediaInfoHandle);
m_mediaInfoHandle = INVALID_HANDLE_VALUE;
}
QString path = QString("%1/MediaInfo.exe").arg(m_tempFolder);
QFile mediaInfoFile(path);
if(mediaInfoFile.open(QIODevice::WriteOnly | QIODevice::Truncate))
{
if(mediaInfoFile.write(reinterpret_cast<const char*>(mediaInfoRes.data()), mediaInfoRes.size()) == mediaInfoRes.size())
{
m_mediaInfoPath = path;
qDebug("MediaInfo path is:\n%s\n", m_mediaInfoPath.toUtf8().constData());
}
else
{
qWarning("Failed to write data to MediaInfo binary file!\n");
}
mediaInfoFile.close();
}
else
{
qWarning("Failed to open MediaInfo binary for writing!\n");
}
}
//Open file for reading
if((!m_mediaInfoPath.isEmpty()) && (m_mediaInfoHandle == INVALID_HANDLE_VALUE))
{
m_mediaInfoHandle = CreateFileW(QWCHAR(QDir::toNativeSeparators(m_mediaInfoPath)), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
if(m_mediaInfoHandle == INVALID_HANDLE_VALUE)
{
qWarning("Failed to open the MediaInfo binary for reading!\n");
m_mediaInfoPath.clear();
}
}
//Validate file content
VALIDATE_MEDIAINFO(m_mediaInfoHandle);
//Failed?
if(m_mediaInfoPath.isEmpty())
{
QMessageBox::critical(this, tr("Failure"), tr("Error: Failed to extract MediaInfo binary!"), QMessageBox::Ok);
}
return m_mediaInfoPath;
}
bool CMainWindow::analyzeFile(const QString &filePath)
{
//Create process, if not done yet
if(!m_process)
{
m_process = new QProcess();
m_process->setProcessChannelMode(QProcess::MergedChannels);
m_process->setReadChannel(QProcess::StandardOutput);
connect(m_process, SIGNAL(readyReadStandardError()), this, SLOT(outputAvailable()));
connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(outputAvailable()));
connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished()));
connect(m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processFinished()));
connect(m_process, SIGNAL(started()), this, SLOT(processStarted()));
}
//Still running?
if(m_process->state() != QProcess::NotRunning)
{
qWarning("Process is still running!\n");
return false;
}
//Lookup MediaInfo path
const QString mediaInfoPath = getMediaInfoPath();
if(mediaInfoPath.isEmpty())
{
return false;
}
qDebug("Analyzing media file:\n%s\n", filePath.toUtf8().constData());
m_process->start(mediaInfoPath, QStringList() << QDir::toNativeSeparators(filePath));
m_floatingLabel->hide();
ui->analyzeButton->setEnabled(true);
ui->exitButton->setEnabled(true);
return true;
}

75
src/MainWindow.h Normal file
View File

@ -0,0 +1,75 @@
///////////////////////////////////////////////////////////////////////////////
// MediaInfoXP
// 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
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
#pragma once
#include <QMainWindow>
#include <QDate>
//UIC forward declartion
namespace Ui {
class MainWindow;
}
class QProcess;
class QLabel;
typedef void *HANDLE;
//MainWindow class
class CMainWindow: public QMainWindow
{
Q_OBJECT
public:
CMainWindow(const QString &tempFolder, QWidget *parent = 0);
~CMainWindow(void);
private slots:
void analyzeButtonClicked(void);
void clearButtonClicked(void);
void outputAvailable(void);
void processStarted(void);
void processFinished(void);
void linkTriggered(void);
void showAboutScreen(void);
void handleDroppedFile(void);
protected:
virtual void showEvent(QShowEvent *event);
virtual void closeEvent(QCloseEvent *event);
virtual void resizeEvent(QResizeEvent *event);
virtual void dragEnterEvent(QDragEnterEvent *event);
virtual void dropEvent(QDropEvent *event);
virtual bool eventFilter(QObject *o, QEvent *e);
private:
Ui::MainWindow *ui; //for Qt UIC
const QString &m_tempFolder;
QString m_mediaInfoPath;
HANDLE m_mediaInfoHandle;
QProcess *m_process;
QLabel *m_floatingLabel;
QString m_droppedFile;
QDate getBuildDate(void);
QString getMediaInfoPath(void);
bool analyzeFile(const QString &filePath);
};