Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 11 additions & 22 deletions Release/Release_GUI_Qt_Windows_x64_MSIX.cmd
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
:: config
:: example:
:: set QT_PATH=C:\Qt\6.9.0\msvc2022_64
:: set QT_TOOLS_PATH=C:\Qt\Tools
:: set FFMPEG_EXE=%~dp0\..\..\MediaInfo-FFmpeg-Plugin\ffmpeg.exe
:: set CERT_PATH=D:\sign_cert.pfx
:: set CERT_PASS=K1wdqYSDk0locw6HSSjT
set QT_PATH=%QT_PATH%
set QT_TOOLS_PATH=%QT_TOOLS_PATH%
set FFMPEG_EXE=%FFMPEG_EXE%
set CERT_PATH=%CERT_PATH%
set CERT_PASS=%CERT_PASS%

:: set paths
set PATH_TEMP=%PATH%
set PATH=%QT_PATH%\bin\;%QT_TOOLS_PATH%\QtCreator\bin\jom\;%PATH%
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
:: MSVC build tools, Qt tools and Jom must be in PATH.
:: Signing cert paths and FFmpeg plugin path is as specified below:
set CERT_PATH=%USERPROFILE%\CodeSigningCertificate.p12
set /P CERT_PASS= < %USERPROFILE%\CodeSigningCertificate.pass
set FFMPEG_EXE=%~dp0\..\..\MediaInfo-FFmpeg-Plugin\ffmpeg.exe

:: build Qt GUI
rmdir /s /q %~dp0\..\Project\QMake\GUI\build\Desktop_Qt_MSVC2022_64bit-Release
Expand Down Expand Up @@ -47,6 +35,7 @@ del /s "%~dp0\MediaInfo_Qt_Windows_x64\msvcp140_atomic_wait.dll"
del /s "%~dp0\MediaInfo_Qt_Windows_x64\msvcp140_codecvt_ids.dll"
del /s "%~dp0\MediaInfo_Qt_Windows_x64\vcruntime140.dll"
del /s "%~dp0\MediaInfo_Qt_Windows_x64\vcruntime140_1.dll"
del /s "%~dp0\MediaInfo_Qt_Windows_x64\icuuc.dll"
copy "%~dp0\..\..\MediaArea-Utils-Binaries\Windows\libcurl\x64\Release\LIBCURL.DLL" "%~dp0\MediaInfo_Qt_Windows_x64\"
copy "%~dp0\..\Project\QMake\GUI\packages\Microsoft.Web.WebView2\build\native\x64\WebView2Loader.dll" "%~dp0\MediaInfo_Qt_Windows_x64\"

Expand All @@ -55,15 +44,15 @@ MSBuild /t:Clean;Build "/p:Configuration=Release Qt;Platform=x64" %~dp0\..\Proje
copy "%~dp0\..\Project\MSVC2022\MediaInfo_WindowsShellExtension\x64\Release Qt\MediaInfo_WindowsShellExtension.dll" "%~dp0\MediaInfo_Qt_Windows_x64\"

:: sign binaries
signtool.exe sign /fd SHA256 /a /f %CERT_PATH% /p %CERT_PASS% /tr http://ts.ssl.com /td sha256 %~dp0\MediaInfo_Qt_Windows_x64\MediaInfo.exe %~dp0\MediaInfo_Qt_Windows_x64\MediaInfo_WindowsShellExtension.dll
signtool.exe sign /fd SHA256 /a /f %CERT_PATH% /p %CERT_PASS% /tr http://timestamp.acs.microsoft.com /td sha256 %~dp0\MediaInfo_Qt_Windows_x64\MediaInfo.exe %~dp0\MediaInfo_Qt_Windows_x64\MediaInfo_WindowsShellExtension.dll

:: add MSIX manifest and assets
xcopy %~dp0\..\Source\WindowsQtPackage %~dp0\MediaInfo_Qt_Windows_x64\ /i /e /r /y

:: package and sign MSIX
MakeAppx pack /d %~dp0\MediaInfo_Qt_Windows_x64\ /p %~dp0\MediaInfo_Qt_Windows_x64.msix /o
signtool.exe sign /fd SHA256 /a /f %CERT_PATH% /p %CERT_PASS% /tr http://ts.ssl.com /td sha256 %~dp0\MediaInfo_Qt_Windows_x64.msix
signtool.exe sign /fd SHA256 /a /f %CERT_PATH% /p %CERT_PASS% /tr http://timestamp.acs.microsoft.com /td sha256 %~dp0\MediaInfo_Qt_Windows_x64.msix

:: reset paths
set PATH=%PATH_TEMP%
set PATH_TEMP=
:: clear cert variables
set CERT_PATH=
set CERT_PASS=
17 changes: 16 additions & 1 deletion Source/CLI/Help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ int Help()
TEXTOUT(" MediaInfo schema");
TEXTOUT("--Output=JSON");
TEXTOUT(" Full information Display with JSON");
TEXTOUT("--Output=CSV");
TEXTOUT(" Full information Display with CSV");
TEXTOUT("--Output=EBUCore");
TEXTOUT(" Full information Display with EBUCore compliant XML tags");
TEXTOUT("--Output=EBUCore_JSON");
Expand All @@ -71,6 +73,8 @@ int Help()
TEXTOUT(" Graph Display with SVG");
TEXTOUT("--Output=Graph_Dot");
TEXTOUT(" Graph Display with Graphviz DOT");
TEXTOUT("--Info_OutputFormats");
TEXTOUT(" Display list of more --Output= parameters");
TEXTOUT("--AcquisitionDataOutputMode=segmentParameter");
TEXTOUT(" Display Acquisition Data by segment then parameter (EBUCore");
TEXTOUT(" and NISO Z39.87 outputs)");
Expand All @@ -91,13 +95,24 @@ int Help()
TEXTOUT("--Cover_Data=base64");
TEXTOUT(" Include cover images as base64 in HTML, XML and JSON output");
TEXTOUT("--Trace_Level=1, --Details=1");
TEXTOUT(" Display mediatrace info");
TEXTOUT(" Output MediaTrace (https://mediaarea.net/MediaTrace).");
TEXTOUT(" Can be used with --Output=XML to output in MediaTrace XML.");
TEXTOUT("--ParseSpeed=...");
TEXTOUT(" Control the balance between parsing speed and the amount of information extracted.");
TEXTOUT(" Value ranges from 0 to 1 where 1 is full parsing and the slowest.");
TEXTOUT(" The default is 0.5.");
TEXTOUT("--inform_version=1");
TEXTOUT(" Add MediaInfoLib version to the text output");
TEXTOUT("--inform_timestamp=1");
TEXTOUT(" Add report creation timestamp to the text output");
TEXTOUT("--File_TestContinuousFileNames=0");
TEXTOUT(" Disable image sequence detection");
TEXTOUT("--File_Duplicate=...");
TEXTOUT(" Duplicate streams from a stream having multiple substreams (MPEG-TS only).");
TEXTOUT(" See https://mediaarea.net/en/MediaInfo/Support/SDK/Duplicate for how to use.");
TEXTOUT(" Example: --File_Duplicate=\"file://output_file.ts;program_number=1\" --File_IsSeekable=0");
TEXTOUT("--Enable_FFmpeg=1");
TEXTOUT(" Enable FFmpeg plugin");
TEXTOUT("--LogFile=...");
TEXTOUT(" Save the output in the specified file");
TEXTOUT("--BOM");
Expand Down
9 changes: 8 additions & 1 deletion Source/Common/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ void Core::Menu_View_HTML ()
//---------------------------------------------------------------------------
void Core::Menu_View_XML ()
{
MI->Option(__T("Inform"), __T("MIXML"));
MI->Option(__T("Inform"), __T("XML"));
Kind=Kind_XML;
}

Expand All @@ -232,6 +232,13 @@ void Core::Menu_View_JSON ()
Kind=Kind_JSON;
}

//---------------------------------------------------------------------------
void Core::Menu_View_CSV ()
{
MI->Option(__T("Inform"), __T("CSV"));
Kind=Kind_CSV;
}

//---------------------------------------------------------------------------
void Core::Menu_View_PBCore ()
{
Expand Down
3 changes: 2 additions & 1 deletion Source/Common/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Core
void Menu_View_HTML ();
void Menu_View_XML ();
void Menu_View_JSON ();
void Menu_View_CSV ();
void Menu_View_MPEG7 ();
void Menu_View_MPEG7_Strict ();
void Menu_View_MPEG7_Relaxed ();
Expand Down Expand Up @@ -84,7 +85,7 @@ class Core

//Datas
MediaInfoNameSpace::String &Inform_Get();
enum kind {Kind_Easy, Kind_Sheet, Kind_Tree, Kind_HTML, Kind_Text, Kind_XML, Kind_JSON, Kind_PBCore, Kind_PBCore2, Kind_reVTMD, Kind_MPEG7_Strict, Kind_MPEG7_Relaxed, Kind_MPEG7_Extended, Kind_EBUCore_1_5, Kind_EBUCore_1_6, Kind_EBUCore_1_8_ps, Kind_EBUCore_1_8_sp, Kind_EBUCore_1_8_ps_json, Kind_EBUCore_1_8_sp_json, Kind_FIMS_1_1, Kind_FIMS_1_2, Kind_FIMS_1_3, Kind_NISO_Z39_87, Kind_Graph_Svg};
enum kind {Kind_Easy, Kind_Sheet, Kind_Tree, Kind_HTML, Kind_Text, Kind_XML, Kind_JSON, Kind_CSV, Kind_PBCore, Kind_PBCore2, Kind_reVTMD, Kind_MPEG7_Strict, Kind_MPEG7_Relaxed, Kind_MPEG7_Extended, Kind_EBUCore_1_5, Kind_EBUCore_1_6, Kind_EBUCore_1_8_ps, Kind_EBUCore_1_8_sp, Kind_EBUCore_1_8_ps_json, Kind_EBUCore_1_8_sp_json, Kind_FIMS_1_1, Kind_FIMS_1_2, Kind_FIMS_1_3, Kind_NISO_Z39_87, Kind_Graph_Svg};
kind Kind_Get();
MediaInfoNameSpace::String Inform_Get (size_t Pos, stream_t StreamKind, size_t StreamPos);

Expand Down
8 changes: 7 additions & 1 deletion Source/GUI/Qt/edgewebview2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

// webview2widget.cpp
// From code generated with Qwen2.5-Max
// From code generated with Qwen2.5-Max and Gemini 2.5 Flash / 3 Pro

#include "edgewebview2widget.h"
#include <QDebug>
Expand Down Expand Up @@ -75,6 +75,12 @@ HRESULT WebView2Widget::InitializeWebView() {
// Mark WebView2 as initialized
m_isInitialized = true;

// Disable drag and drop
Microsoft::WRL::ComPtr<ICoreWebView2Controller4> controller4;
auto hr = m_webviewController.As(&controller4);
if (SUCCEEDED(hr))
controller4->put_AllowExternalDrop(FALSE);

// Use a single-shot timer to delay resizing until after the widget is properly laid out
QTimer::singleShot(0, this, [this]() {
resizeEvent(nullptr); // Trigger resizeEvent manually
Expand Down
38 changes: 38 additions & 0 deletions Source/GUI/Qt/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ QIODevice::OpenMode Export::getOpenMode() {
return QIODevice::WriteOnly;
}

Export::CSV_Options Export::getCSVOptions() {
CSV_Options CSV{};
CSV.Stream_Video = ui->CSV_Stream_Video->value();
CSV.Stream_Audio = ui->CSV_Stream_Audio->value();
CSV.Stream_Text = ui->CSV_Stream_Text->value();
CSV.Stream_Other = ui->CSV_Stream_Other->value();
CSV.Quote = ui->CSV_Quote->currentText();
CSV.Separator_Col = ui->CSV_Separator_Col->currentText();
CSV.Separator_Line = ui->CSV_Separator_Line->currentText();
return CSV;
}

bool Export::isAdvancedChecked() {
return ui->checkBoxAdvanced->isChecked();
}
Expand All @@ -83,6 +95,8 @@ QString Export::extension(int mode) {
break;
case HTML: return "html";
break;
case CSV: return "csv";
break;
case GRAPH: return "svg";
break;
case XML:
Expand Down Expand Up @@ -114,6 +128,8 @@ QString Export::extensionName(int mode) {
break;
case HTML: return "HTML";
break;
case CSV: return "CSV";
break;
case GRAPH: return tr("Graph");
break;
case XML:
Expand Down Expand Up @@ -149,6 +165,8 @@ QString Export::name(int mode) {
break;
case JSON: return tr("JSON");
break;
case CSV: return tr("CSV");
break;
case GRAPH: return tr("Graph");
break;
case PBCORE: return tr("PBCore");
Expand Down Expand Up @@ -217,11 +235,31 @@ void Export::on_comboBoxMode_currentIndexChanged(int index)
ui->comboBoxConfig->setEnabled(false);
ui->checkBoxAdvanced->setEnabled(false);
break;
case CSV:
case HTML:
ui->comboBoxConfig->setEnabled(false);
ui->checkBoxAdvanced->setEnabled(true);
break;
}

auto CSV_Options_Visibility{ false };
if (index == CSV)
CSV_Options_Visibility = true;

ui->label_3->setVisible(CSV_Options_Visibility);
ui->label_4->setVisible(CSV_Options_Visibility);
ui->label_5->setVisible(CSV_Options_Visibility);
ui->label_6->setVisible(CSV_Options_Visibility);
ui->label_7->setVisible(CSV_Options_Visibility);
ui->label_8->setVisible(CSV_Options_Visibility);
ui->label_9->setVisible(CSV_Options_Visibility);
ui->CSV_Quote->setVisible(CSV_Options_Visibility);
ui->CSV_Separator_Col->setVisible(CSV_Options_Visibility);
ui->CSV_Separator_Line->setVisible(CSV_Options_Visibility);
ui->CSV_Stream_Audio->setVisible(CSV_Options_Visibility);
ui->CSV_Stream_Other->setVisible(CSV_Options_Visibility);
ui->CSV_Stream_Text->setVisible(CSV_Options_Visibility);
ui->CSV_Stream_Video->setVisible(CSV_Options_Visibility);
}

void Export::on_checkBoxAdvanced_toggled(bool checked)
Expand Down
12 changes: 12 additions & 0 deletions Source/GUI/Qt/export.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Export : public QDialog {
HTML=1,
XML,
JSON,
CSV,
GRAPH,
PBCORE,
PBCORE2,
Expand Down Expand Up @@ -53,6 +54,17 @@ class Export : public QDialog {
QString extensionName(int mode);
QString name(int mode);

struct CSV_Options {
int Stream_Video{};
int Stream_Audio{};
int Stream_Text{};
int Stream_Other{};
QString Quote;
QString Separator_Col;
QString Separator_Line;
};
CSV_Options getCSVOptions();

protected:
void changeEvent(QEvent *e);

Expand Down
Loading