add 0012-update-changelog.patch

This commit is contained in:
peijiankang 2024-04-29 16:08:44 +08:00
parent 726681eb10
commit fa0d37e06c
5 changed files with 45178 additions and 191 deletions

View File

@ -1,55 +0,0 @@
From b3aed237023c99049dc4a7810fabc5ee8c37fbdf Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 6 Mar 2023 16:23:06 +0800
Subject: [PATCH] Repair the user guide does not work
---
src/mainwindow.cpp | 3 ++-
src/widget/kmenu.cpp | 3 ++-
src/widget/kmenu.h | 2 +
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 8925988..c69ee0a 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -786,7 +786,8 @@ void MainWindow::slotChangeMiniState()
void MainWindow::slotOpenHelpDoc()
{
// 帮助手册 先就分开写吧,快捷键不生效不知道为啥
- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000",
+ QString service_name = "com.kylinUserGuide.hotel_" + QString::number(getuid());
+ QDBusMessage m = QDBusMessage::createMethodCall(service_name,
"/",
"com.guide.hotel",
"showGuide");
diff --git a/src/widget/kmenu.cpp b/src/widget/kmenu.cpp
index 72176cb..1b90a76 100644
--- a/src/widget/kmenu.cpp
+++ b/src/widget/kmenu.cpp
@@ -1136,7 +1136,8 @@ void TitleMenu::createHelpMenu()
act_f1 = new KAction(QKeySequence("F1"), nullptr, "manual");
connect(act_f1, &KAction::triggered, [this](){
// 帮助手册
- QDBusMessage m = QDBusMessage::createMethodCall("com.kylinUserGuide.hotel_1000",
+ QString service_name = "com.kylinUserGuide.hotel_" + QString::number(getuid());
+ QDBusMessage m = QDBusMessage::createMethodCall(service_name,
"/",
"com.guide.hotel",
"showGuide");
diff --git a/src/widget/kmenu.h b/src/widget/kmenu.h
index 62abafc..42859b2 100644
--- a/src/widget/kmenu.h
+++ b/src/widget/kmenu.h
@@ -3,6 +3,8 @@
#include <QMenu>
#include "core/mpvtypes.h"
+#include <unistd.h>
+#include <sys/types.h>
#define OfficialWebsite "https://www.kylinos.cn"
#define AdvideFeedback "mailto:product@kylinos.cn"
--
2.33.0

View File

@ -1,127 +0,0 @@
From d54bfd1df31ef73d8e18f2603cf7bbcf5354d344 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 8 Apr 2024 14:42:03 +0800
Subject: [PATCH] fix build error of kylin-video about ffmpeg-6.1
---
src/core/ffutil.cpp | 2 ++
src/core/ffutil.h | 10 ++++++++-
src/core/mpvcore.cpp | 53 ++++++++++++++++++++++----------------------
3 files changed, 38 insertions(+), 27 deletions(-)
diff --git a/src/core/ffutil.cpp b/src/core/ffutil.cpp
index 5297a31..9549b14 100644
--- a/src/core/ffutil.cpp
+++ b/src/core/ffutil.cpp
@@ -21,7 +21,9 @@ extern "C"
FFUtil::FFUtil(QObject *parent) : QObject(parent)
{
+#if !AVFORMAT_STATIC_REGISTER
av_register_all();
+#endif
m_videoTbr = new VideoThumbnailer;
m_videoTbr->setThumbnailSize(176);
pFormatCtx = nullptr;
diff --git a/src/core/ffutil.h b/src/core/ffutil.h
index cf3de29..4b4754c 100644
--- a/src/core/ffutil.h
+++ b/src/core/ffutil.h
@@ -4,6 +4,14 @@
#include <QObject>
#include <libffmpegthumbnailer/videothumbnailer.h>
+
+#define QTAV_USE_FFMPEG(MODULE) (MODULE##_VERSION_MICRO >= 100)
+#define QTAV_USE_LIBAV(MODULE) !QTAV_USE_FFMPEG(MODULE)
+#define FFMPEG_MODULE_CHECK(MODULE, MAJOR, MINOR, MICRO) \
+ (QTAV_USE_FFMPEG(MODULE) && MODULE##_VERSION_INT >= AV_VERSION_INT(MAJOR, MINOR, MICRO))
+
+#define AVFORMAT_STATIC_REGISTER FFMPEG_MODULE_CHECK(LIBAVFORMAT, 58, 9, 100)
+
using namespace ffmpegthumbnailer;
struct AVCodec;
@@ -26,7 +34,7 @@ private:
VideoThumbnailer *m_videoTbr;
AVFormatContext *pFormatCtx;
AVCodecContext *pCodecCtx;
- AVCodec *pCodec;
+ const AVCodec *pCodec;
int videoStream;
int videoDuration;
diff --git a/src/core/mpvcore.cpp b/src/core/mpvcore.cpp
index 378db64..60dec98 100644
--- a/src/core/mpvcore.cpp
+++ b/src/core/mpvcore.cpp
@@ -1577,6 +1577,7 @@ bool MpvCore::event(QEvent *event)
Play();
ShowText("");
// 不要 break 有莫名其妙的问题,待查
+ //case MPV_EVENT_UNPAUSE:
case MPV_EVENT_UNPAUSE:
KyInfo() << "[mpv event] MPV_EVENT_UNPAUSE";
// 防止重复设置状态
@@ -1627,32 +1628,32 @@ bool MpvCore::event(QEvent *event)
// mpv_event_log_message *message = static_cast<mpv_event_log_message*>(event->data);
break;
}
- case MPV_EVENT_TRACK_SWITCHED:
- KyInfo() << "[mpv event] MPV_EVENT_TRACK_SWITCHED";
- // 轨道id改变
- mpv_get_property(m_mpvHandle, "sid", MPV_FORMAT_INT64, &sid);
- if (sid > m_stracks)
- sid = 0;
-
- g_core_signal->notifySubId(sid);
- if(sid != m_sid && sid >= 0)
- {
- m_sid = sid;
- if (sid == 0) {
- ShowText(tr("subtitle : ").append("no"));
- }
- // 字幕改变
- for(Mpv::Track tck : m_fileInfo.stracks)
- if(tck.id == sid)
- ShowText(tr("subtitle : ").append(tck.title));
- }
- mpv_get_property(m_mpvHandle, "aid", MPV_FORMAT_INT64, &aid);
- g_core_signal->notifyAudioId(aid);
- mpv_get_property(m_mpvHandle, "vid", MPV_FORMAT_INT64, &vid);
- g_core_signal->notifyVideoId(vid);
- m_vid = vid;
- m_aid = aid;
- break;
+// case MPV_EVENT_TRACK_SWITCHED:
+// KyInfo() << "[mpv event] MPV_EVENT_TRACK_SWITCHED";
+// // 轨道id改变
+// mpv_get_property(m_mpvHandle, "sid", MPV_FORMAT_INT64, &sid);
+// if (sid > m_stracks)
+// sid = 0;
+//
+// g_core_signal->notifySubId(sid);
+// if(sid != m_sid && sid >= 0)
+// {
+// m_sid = sid;
+// if (sid == 0) {
+// ShowText(tr("subtitle : ").append("no"));
+// }
+// // 字幕改变
+// for(Mpv::Track tck : m_fileInfo.stracks)
+// if(tck.id == sid)
+// ShowText(tr("subtitle : ").append(tck.title));
+// }
+// mpv_get_property(m_mpvHandle, "aid", MPV_FORMAT_INT64, &aid);
+// g_core_signal->notifyAudioId(aid);
+// mpv_get_property(m_mpvHandle, "vid", MPV_FORMAT_INT64, &vid);
+// g_core_signal->notifyVideoId(vid);
+// m_vid = vid;
+// m_aid = aid;
+// break;
default: // unhandled events
break;
}
--
2.43.0

45095
0012-update-changelog.patch Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,75 @@
From 50921f011097359a7fc773b379fca7c96e0ab44d Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Tue, 30 Apr 2024 09:04:54 +0800
Subject: [PATCH] fix build error of kylin video about mpv-0.35
---
src/core/mpvcore.cpp | 52 ++++++++++++++++++++++----------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/core/mpvcore.cpp b/src/core/mpvcore.cpp
index cca57d7..4b861e5 100644
--- a/src/core/mpvcore.cpp
+++ b/src/core/mpvcore.cpp
@@ -1694,32 +1694,32 @@ bool MpvCore::event(QEvent *event)
// mpv_event_log_message *message = static_cast<mpv_event_log_message*>(event->data);
break;
}
- case MPV_EVENT_TRACK_SWITCHED:
- KyInfo() << "[mpv event] MPV_EVENT_TRACK_SWITCHED";
- // 轨道id改变
- mpv_get_property(m_mpvHandle, "sid", MPV_FORMAT_INT64, &sid);
- if (sid > m_stracks)
- sid = 0;
-
- g_core_signal->notifySubId(sid);
- if(sid != m_sid && sid >= 0)
- {
- m_sid = sid;
- if (sid == 0) {
- ShowText(tr("subtitle : ").append("no"));
- }
- // 字幕改变
- for(Mpv::Track tck : m_fileInfo.stracks)
- if(tck.id == sid)
- ShowText(tr("subtitle : ").append(tck.title));
- }
- mpv_get_property(m_mpvHandle, "aid", MPV_FORMAT_INT64, &aid);
- g_core_signal->notifyAudioId(aid);
- mpv_get_property(m_mpvHandle, "vid", MPV_FORMAT_INT64, &vid);
- g_core_signal->notifyVideoId(vid);
- m_vid = vid;
- m_aid = aid;
- break;
+ //case MPV_EVENT_TRACK_SWITCHED:
+ // KyInfo() << "[mpv event] MPV_EVENT_TRACK_SWITCHED";
+ // // 轨道id改变
+ // mpv_get_property(m_mpvHandle, "sid", MPV_FORMAT_INT64, &sid);
+ // if (sid > m_stracks)
+ // sid = 0;
+
+ // g_core_signal->notifySubId(sid);
+ // if(sid != m_sid && sid >= 0)
+ // {
+ // m_sid = sid;
+ // if (sid == 0) {
+ // ShowText(tr("subtitle : ").append("no"));
+ // }
+ // // 字幕改变
+ // for(Mpv::Track tck : m_fileInfo.stracks)
+ // if(tck.id == sid)
+ // ShowText(tr("subtitle : ").append(tck.title));
+ // }
+ // mpv_get_property(m_mpvHandle, "aid", MPV_FORMAT_INT64, &aid);
+ // g_core_signal->notifyAudioId(aid);
+ // mpv_get_property(m_mpvHandle, "vid", MPV_FORMAT_INT64, &vid);
+ // g_core_signal->notifyVideoId(vid);
+ // m_vid = vid;
+ // m_aid = aid;
+ // break;
default: // unhandled events
break;
}
--
2.43.0

View File

@ -1,15 +1,14 @@
Name: kylin-video
Version: 3.1.4
Release: 5
Release: 6
Summary: A powerful video player
License: GPL-2.0+
URL: https://gitee.com/openkylin/kylin-video
Source0: kylin-video-3.1.4.tar.gz
Patch01: 0001-fix-compile-error-of-kylin-video.patch
Patch02: 0002-Repair-the-user-guide-does-not-work.patch
Patch03: 0003-fix-build-error-of-kylin-video-about-ffmpeg-6.1.patch
Patch03: fix-build-error-of-kylin-video-about-mpv-0.35.patch
Patch04: 0011-15-kylin-video.patch
Patch05: 0012-update-changelog.patch
BuildRequires: ffmpeg-devel
BuildRequires: libcrystalhd-devel
BuildRequires: ffmpegthumbnailer-devel
@ -31,6 +30,7 @@ BuildRequires: qt5-qttools-devel
BuildRequires: zlib-devel
BuildRequires: libkysdk-qtwidgets-devel
BuildRequires: libkysdk-waylandhelper-devel
BuildRequires: libkysdk-sysinfo-devel
BuildRequires: qtav-devel
Requires: mesa-vdpau-drivers libcrystalhd-devel mpv ffmpegthumbnailer-devel libqtavwidgets
@ -40,11 +40,7 @@ Front-end for MPlayer and MPV Qt5 Mplayer and MPV front-end, with basic features
It supports both x86 and ARM platform, and supports most of the audio and video formatsprep
%prep
%setup -q
%patch01 -p1
%patch02 -p1
%patch03 -p1
%patch04 -p1
%autosetup -n %{name}-%{version} -p1
%build
mkdir qmake-build
@ -67,6 +63,9 @@ popd
%changelog
* Mon Apr 29 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-6
- add 0012-update-changelog.patch
* Wed Apr 24 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-5
- add 0011-15-kylin-video.patch