From 0452e1b92ea53b391d5220183ba406900627471c Mon Sep 17 00:00:00 2001 From: cbwu <504-wuchengbo@htsdfp.com> Date: Sat, 15 Feb 2025 14:10:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B1=8F=E8=94=BD=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E5=B7=A6=E4=B8=8A=E8=A7=92=E5=9B=BE=E6=A0=87=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E7=B3=BB=E7=BB=9F=E9=BB=98=E8=AE=A4=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PayloadAPP.pro | 2 +- Src/VideoGL/decodestream.cpp | 14 +++++++------- Src/VideoGL/readstream.cpp | 8 ++++---- global.cpp | 2 +- mainwindow.cpp | 16 ++++++++++++++++ mainwindow.h | 10 +++++++--- mainwindow.ui | 8 +++----- 7 files changed, 39 insertions(+), 21 deletions(-) diff --git a/PayloadAPP.pro b/PayloadAPP.pro index 6a2e8c0..fa49862 100644 --- a/PayloadAPP.pro +++ b/PayloadAPP.pro @@ -14,7 +14,7 @@ QMAKE_PROJECT_DEPTH = 0 # QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\" #程序版本 -VERSION = 1.1.0.4 +VERSION = 1.1.0.5 #程序版本 QMAKE_TARGET_COMPANY = "HTSDFP" diff --git a/Src/VideoGL/decodestream.cpp b/Src/VideoGL/decodestream.cpp index d1fa2d4..a337140 100644 --- a/Src/VideoGL/decodestream.cpp +++ b/Src/VideoGL/decodestream.cpp @@ -195,9 +195,9 @@ bool DecodeStream::isValidAVFrame(AVFrame *frame) { } // 如果需要,添加更多判断条件,例如时间戳或关键帧检查 - if (frame->pts == AV_NOPTS_VALUE) { - return false; - } + // if (frame->pts == AV_NOPTS_VALUE) { + // return false; + // } return true; // 如果所有条件都通过,则认为 AVFrame 有效 } @@ -214,10 +214,10 @@ bool DecodeStream::isValidAVPacket(AVPacket *pkt) { } // 检查时间戳 - if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) { - qDebug() << "Invalid AVPacket: pts or dts is AV_NOPTS_VALUE.\n"; - return false; - } + // if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) { + // qDebug() << "Invalid AVPacket: pts or dts is AV_NOPTS_VALUE.\n"; + // return false; + // } // 检查流索引(如果是多流) if (pkt->stream_index < 0) { diff --git a/Src/VideoGL/readstream.cpp b/Src/VideoGL/readstream.cpp index 883b186..a8faa3c 100644 --- a/Src/VideoGL/readstream.cpp +++ b/Src/VideoGL/readstream.cpp @@ -288,10 +288,10 @@ bool ReadStream::isValidAVPacket(AVPacket *pkt) { } // 检查时间戳 - if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) { - qDebug() << "Invalid AVPacket 0: pts or dts is AV_NOPTS_VALUE.\n"; - return false; - } + // if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) { + // qDebug() << "Invalid AVPacket 0: pts or dts is AV_NOPTS_VALUE.\n"; + // return false; + // } // 检查流索引(如果是多流) if (pkt->stream_index < 0) { diff --git a/global.cpp b/global.cpp index 5910a8d..85a0d67 100644 --- a/global.cpp +++ b/global.cpp @@ -2,7 +2,7 @@ global::global() {} -QString g_SoftwareVersion = "版本号:V1.1.0.5_20250207"; +QString g_SoftwareVersion = "版本号:V1.1.0.6_20250215"; NotifyManager *g_notifyManager = nullptr; diff --git a/mainwindow.cpp b/mainwindow.cpp index 76e7e2b..39ca936 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -423,3 +423,19 @@ void MainWindow::initNotifyManager() { g_notifyManager->setDisplayTime(2000); g_notifyManager->setNotifyWndSize(300, 60); } + +bool MainWindow::nativeEvent(const QByteArray &eventType, void *message, + qintptr *result) { +#ifdef Q_OS_WIN + MSG *msg = (MSG *)message; + if (msg->message == WM_SYSCOMMAND) { + if (61587 == msg->wParam) { // 单击事件 + return true; + } + if (61539 == msg->wParam) { // 双击事件 + return true; + } + } +#endif + return QMainWindow::nativeEvent(eventType, message, result); +} diff --git a/mainwindow.h b/mainwindow.h index c8d6a9b..80d9ab1 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -20,9 +20,9 @@ #include "Src/RescueLoad/rescueloadwidget.h" #ifdef Q_OS_WIN -// #include -// #include -// #include +#include "windows.h" +#include "windowsx.h" +#pragma comment(lib, "user32.lib") #endif QT_BEGIN_NAMESPACE namespace Ui { @@ -46,6 +46,10 @@ public: void initWindow(); void initButton(); void initSignalSlot(); + +protected: + bool nativeEvent(const QByteArray &eventType, void *message, + qintptr *result); private slots: void toolButton_clicked(); void toolButton_2_clicked(); diff --git a/mainwindow.ui b/mainwindow.ui index a77d094..cb61ae2 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -261,7 +261,7 @@ - + :/res/GDDC.png:/res/GDDC.png @@ -273,7 +273,7 @@ - + :/res/LChain.png:/res/LChain.png @@ -347,8 +347,6 @@ - - - +