!54 sync from openEuler-24.03-LTS

From: @peijiankang 
Reviewed-by: @hua_yadong 
Signed-off-by: @hua_yadong
This commit is contained in:
openeuler-ci-bot 2024-11-26 02:38:13 +00:00 committed by Gitee
commit 67fb49813f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
12 changed files with 49726 additions and 158 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,39 +0,0 @@
From ce5bf37d858e399e9a114fcb147d924d6ace42a1 Mon Sep 17 00:00:00 2001
From: chenguanglee <lichenguang@kylinos.cn>
Date: Fri, 22 Nov 2024 10:20:05 +0800
Subject: [PATCH] fix build error of ffmpeg-6.1.1
---
src/core/ffutil.cpp | 2 +-
src/core/ffutil.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/ffutil.cpp b/src/core/ffutil.cpp
index 5297a31..082cb36 100644
--- a/src/core/ffutil.cpp
+++ b/src/core/ffutil.cpp
@@ -21,7 +21,7 @@ extern "C"
FFUtil::FFUtil(QObject *parent) : QObject(parent)
{
- av_register_all();
+ //av_register_all();
m_videoTbr = new VideoThumbnailer;
m_videoTbr->setThumbnailSize(176);
pFormatCtx = nullptr;
diff --git a/src/core/ffutil.h b/src/core/ffutil.h
index cf3de29..7517f27 100644
--- a/src/core/ffutil.h
+++ b/src/core/ffutil.h
@@ -26,7 +26,7 @@ private:
VideoThumbnailer *m_videoTbr;
AVFormatContext *pFormatCtx;
AVCodecContext *pCodecCtx;
- AVCodec *pCodec;
+ const AVCodec *pCodec;
int videoStream;
int videoDuration;
--
2.43.0

View File

@ -1,49 +0,0 @@
From 0194b2e2055335c50e2b4a040dc9af856c63c8e6 Mon Sep 17 00:00:00 2001
From: chenguanglee <lichenguang@kylinos.cn>
Date: Fri, 22 Nov 2024 10:27:18 +0800
Subject: [PATCH] remove MPV_EVENT_TRACK_SWITCHED case
---
src/core/mpvcore.cpp | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/src/core/mpvcore.cpp b/src/core/mpvcore.cpp
index 378db64..fca822d 100644
--- a/src/core/mpvcore.cpp
+++ b/src/core/mpvcore.cpp
@@ -1627,32 +1627,6 @@ 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;
default: // unhandled events
break;
}
--
2.43.0

210
0011-15-kylin-video.patch Normal file
View File

@ -0,0 +1,210 @@
From: =?utf-8?b?5YiY6IGq?= <liucong1@kylinos.cn>
Date: Fri, 19 May 2023 09:16:59 +0000
Subject: =?utf-8?q?!15_kylin-video_Merge_pull_request_!15_from_=E6=88=8E?=
=?utf-8?q?=E6=9C=89=E4=B8=BD/openkylin/yangtze?=
---
src/widget/eventpasswidget.cpp | 37 +++++++++++++++++++++++++++++++++++++
src/widget/eventpasswidget.h | 5 ++++-
src/widget/playglwidget.cpp | 37 +++++++++++++++++++++++++++++++++++++
src/widget/playglwidget.h | 5 ++++-
4 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/src/widget/eventpasswidget.cpp b/src/widget/eventpasswidget.cpp
index ebe6f39..c74cc14 100644
--- a/src/widget/eventpasswidget.cpp
+++ b/src/widget/eventpasswidget.cpp
@@ -95,6 +95,7 @@ void EventPassWidget::mousePressEvent(QMouseEvent *e)
// 右键点击触发显示菜单
if (e->button() == Qt::LeftButton) {
+ m_isMousePressed = true;
m_timePressStart = QDateTime::currentMSecsSinceEpoch();
}
return QWidget::mousePressEvent(e);
@@ -102,6 +103,7 @@ void EventPassWidget::mousePressEvent(QMouseEvent *e)
void EventPassWidget::mouseReleaseEvent(QMouseEvent *e)
{
+ m_isMousePressed = false;
// 左键离开触发暂停,如果左键按得时间很长就不触发了,不然会和触摸屏长按冲突
if (e->button() == Qt::LeftButton && (QDateTime::currentMSecsSinceEpoch() - m_timePressStart) < 500) {
if (!m_mouseUsed)
@@ -115,6 +117,27 @@ void EventPassWidget::mouseReleaseEvent(QMouseEvent *e)
void EventPassWidget::mouseMoveEvent(QMouseEvent *e)
{
+ if (m_isMousePressed) {
+ m_posCurrent = e->pos();
+
+ int xc = abs(m_posCurrent.x() - m_posLast.x());
+ int yc = abs(m_posCurrent.y() - m_posLast.y());
+ if (xc < yc) {
+ m_volumeChange = yc * 200 / height();
+ //符合音量调节
+ if (m_volumeChange > 0) {
+ if (m_posCurrent.y() - m_posLast.y() > 2) {
+ g_user_signal->setVolumeDown(m_volumeChange);
+ m_posLast = m_posCurrent;
+ }
+ else {
+ g_user_signal->setVolumeUp(m_volumeChange);
+ m_posLast = m_posCurrent;
+ }
+ }
+ }
+ }
+
m_isMouseEnter = true;
m_checkMouseTimer->stop();
setCursor(QCursor(Qt::ArrowCursor));
@@ -135,6 +158,19 @@ void EventPassWidget::mouseDoubleClickEvent(QMouseEvent *e)
return QWidget::mouseDoubleClickEvent(e);
}
+void EventPassWidget::wheelEvent(QWheelEvent *e)
+{
+ // 鼠标滚轮和触控板双指滑动调节音量
+ int wheel_distance = e->delta();
+ if (abs(wheel_distance) / 120 == 1) {
+ if (wheel_distance > 0)
+ g_user_signal->setVolumeUp(5);
+ else
+ g_user_signal->setVolumeDown(5);
+ }
+ return QWidget::wheelEvent(e);
+}
+
void EventPassWidget::enterEvent(QEvent *e)
{
m_isMouseEnter = true;
@@ -144,6 +180,7 @@ void EventPassWidget::enterEvent(QEvent *e)
void EventPassWidget::leaveEvent(QEvent *e)
{
m_isMouseEnter = false;
+ m_isMousePressed = false;
if(g_playstate > 0)
m_checkMouseTimer->start();
diff --git a/src/widget/eventpasswidget.h b/src/widget/eventpasswidget.h
index e1dfe6e..95bc7a2 100644
--- a/src/widget/eventpasswidget.h
+++ b/src/widget/eventpasswidget.h
@@ -27,7 +27,9 @@ private:
bool m_mouseUsed,
m_isMouseEnter,
- m_hasVideo;
+ m_dbClicked,
+ m_hasVideo,
+ m_isMousePressed = false;
int m_volumeChange;
@@ -46,6 +48,7 @@ protected:
void mouseReleaseEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
+ void wheelEvent(QWheelEvent *e) override;
void enterEvent(QEvent *e) override;
void leaveEvent(QEvent *e) override;
bool event(QEvent *e) override;
diff --git a/src/widget/playglwidget.cpp b/src/widget/playglwidget.cpp
index d39a800..00533e0 100644
--- a/src/widget/playglwidget.cpp
+++ b/src/widget/playglwidget.cpp
@@ -159,6 +159,7 @@ void PlayGLWidget::videIdChange(int vid)
void PlayGLWidget::mousePressEvent(QMouseEvent *e)
{
+ m_isMousePressed = true;
m_mousePosPressed = e->pos();
m_posStart = e->pos();
m_posLast = e->pos();
@@ -172,6 +173,7 @@ void PlayGLWidget::mousePressEvent(QMouseEvent *e)
void PlayGLWidget::mouseReleaseEvent(QMouseEvent *e)
{
+ m_isMousePressed = false;
// 左键离开触发暂停,如果左键按得时间很长就不触发了,不然会和触摸屏长按冲突
if (e->button() == Qt::LeftButton && (QDateTime::currentMSecsSinceEpoch() - m_timePressStart) < 500) {
if (!m_mouseUsed)
@@ -185,6 +187,27 @@ void PlayGLWidget::mouseReleaseEvent(QMouseEvent *e)
void PlayGLWidget::mouseMoveEvent(QMouseEvent *e)
{
+ if (m_isMousePressed) {
+ m_posCurrent = e->pos();
+
+ int xc = abs(m_posCurrent.x() - m_posLast.x());
+ int yc = abs(m_posCurrent.y() - m_posLast.y());
+ if (xc < yc) {
+ m_volumeChange = yc * 200 / height();
+ //符合音量调节
+ if (m_volumeChange > 0) {
+ if (m_posCurrent.y() - m_posLast.y() > 2) {
+ g_user_signal->setVolumeDown(m_volumeChange);
+ m_posLast = m_posCurrent;
+ }
+ else {
+ g_user_signal->setVolumeUp(m_volumeChange);
+ m_posLast = m_posCurrent;
+ }
+ }
+ }
+ }
+
m_isMouseEnter = true;
m_checkMouseTimer->stop();
setCursor(QCursor(Qt::ArrowCursor));
@@ -205,6 +228,19 @@ void PlayGLWidget::mouseDoubleClickEvent(QMouseEvent *e)
return QOpenGLWidget::mouseDoubleClickEvent(e);
}
+void PlayGLWidget::wheelEvent(QWheelEvent *e)
+{
+ // 鼠标滚轮和触控板双指滑动调节音量
+ int wheel_distance = e->delta();
+ if (abs(wheel_distance) / 120 == 1) {
+ if (wheel_distance > 0)
+ g_user_signal->setVolumeUp(5);
+ else
+ g_user_signal->setVolumeDown(5);
+ }
+ return QOpenGLWidget::wheelEvent(e);
+}
+
void PlayGLWidget::enterEvent(QEvent *e)
{
m_isMouseEnter = true;
@@ -213,6 +249,7 @@ void PlayGLWidget::enterEvent(QEvent *e)
void PlayGLWidget::leaveEvent(QEvent *e)
{
+ m_isMousePressed = false;
m_isMouseEnter = false;
if(g_playstate > 0)
m_checkMouseTimer->start();
diff --git a/src/widget/playglwidget.h b/src/widget/playglwidget.h
index a82fac7..72498e9 100644
--- a/src/widget/playglwidget.h
+++ b/src/widget/playglwidget.h
@@ -52,7 +52,9 @@ private:
bool m_mouseUsed,
m_isMouseEnter,
- m_hasVideo;
+ m_dbClicked,
+ m_hasVideo,
+ m_isMousePressed = false;
int m_volumeChange;
@@ -71,6 +73,7 @@ protected:
void mouseReleaseEvent(QMouseEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
+ void wheelEvent(QWheelEvent *e) override;
void enterEvent(QEvent *e) override;
void leaveEvent(QEvent *e) override;
bool event(QEvent *e) override;

45095
0012-update-changelog.patch Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,21 @@
From: liucong321 <liucong1@kylinos.cn>
Date: Wed, 24 May 2023 14:48:41 +0800
Subject: update changelog
---
src/mainwindow.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 5e4fbee..c803446 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -819,7 +819,7 @@ void MainWindow::slotChangeMaxState()
void MainWindow::slotChangeMiniState()
{
- showMinimized();
+ kdk::WindowManager::minimizeWindow(m_window_id);
}
void MainWindow::slotOpenHelpDoc()

91
0014-.patch Normal file
View File

@ -0,0 +1,91 @@
From: liucong321 <liucong1@kylinos.cn>
Date: Mon, 29 May 2023 16:51:49 +0800
Subject: =?utf-8?b?5L+u5aSN57yW6K+R5LiN6YCa6L+H6Zeu6aKY?=
---
src/mainwindow.cpp | 19 +++++--------------
src/src.pro | 6 ------
2 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c803446..0412896 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -319,17 +319,6 @@ void MainWindow::initDBus()
KyInfo("init dbus error");
}
- QDBusMessage m = QDBusMessage::createMethodCall(QString("com.kylin.statusmanager.interface"),
- QString("/"),
- QString("com.kylin.statusmanager.interface"),
- QString("get_current_tabletmode"));
-
- QDBusMessage res = sessionBus.call(m);
- if (res.type() == 1 || res.type() == 2)
- m_is_tablet_mode = res.arguments().first().toBool();
- else
- m_is_tablet_mode = false;
-
//S3 S4策略
QDBusConnection::systemBus().connect(QString("org.freedesktop.login1"),
QString("/org/freedesktop/login1"),
@@ -463,7 +452,7 @@ void MainWindow::initTitleWidget()
connect(m_title_menu, &TitleMenu::sigQuit, this, &MainWindow::slotQuit);
m_title_widget = new TitleWidget(this);
- m_title_widget->setUIMode(m_is_tablet_mode);
+ m_title_widget->setUIMode(isTablet);
m_title_widget->raise();
m_title_widget->move(0, 0);
m_title_widget->setTitle(tr("Video Player"));
@@ -533,7 +522,7 @@ void MainWindow::initMiniModeShade()
void MainWindow::initContralBar()
{
m_contral_bar = new ContralBar(this);
- m_contral_bar->setUIMode(m_is_tablet_mode);
+ m_contral_bar->setUIMode(isTablet);
m_contral_bar->hide();
m_contral_bar->raise();
@@ -670,6 +659,7 @@ void MainWindow::Single(QStringList filelist)
void MainWindow::windowStateChange()
{
+#if 0
long compositor = (windowState() & Qt::WindowMaximized || windowState() & Qt::WindowFullScreen) ? 1 : 2;
QTimer::singleShot(500, this, [&, compositor](){
if (isWayland)
@@ -678,6 +668,7 @@ void MainWindow::windowStateChange()
XChangeProperty(QX11Info::display(), this->winId(), _NET_WM_BYPASS_COMPOSITOR, XA_CARDINAL,
32, XCB_PROP_MODE_REPLACE, (const unsigned char*)&compositor, 1);
});
+#endif
if (windowState() & Qt::WindowMaximized)
m_title_widget->updateMaxButtonStatus(true);
@@ -812,7 +803,7 @@ void MainWindow::slotChangeMaxState()
m_is_maximized = false;
}
else {
- showMaximized();
+ kdk::WindowManager::maximizeWindow(m_window_id);
m_is_maximized = true;
}
}
diff --git a/src/src.pro b/src/src.pro
index ad30a5e..699ee3f 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -46,12 +46,6 @@ include(widget/widget.pri)
LIBS += -lX11 \
-lKF5WindowSystem \
- -lavformat \
- -lavdevice \
- -lavcodec \
- -lavutil \
- -lswscale \
- -lswresample \
-lzen \
-lmediainfo \
-lukui-log4qt \

4111
0015-update-changelog.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
From: liucong321 <liucong1@kylinos.cn>
Date: Wed, 9 Aug 2023 16:44:46 +0800
Subject: update changelog
---
kylin-video.desktop | 1 +
src/core/mpvcore.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/kylin-video.desktop b/kylin-video.desktop
index 4b218b3..c8bef67 100644
--- a/kylin-video.desktop
+++ b/kylin-video.desktop
@@ -11,6 +11,7 @@ Comment[zh_CN]=影音
GenericName=Video Player
GenericName[zh_CN]=影音
GenericName[bo_CN]=བརྙན་ཆས།
+GenericName[bo_CN]=ᠺᠢᠨᠤ᠋ ᠠᠪᠢᠶ᠎ᠠ ᠵᠢᠨ ᠨᠡᠪᠳᠡᠷᠡᠬᠦᠯᠦᠭᠴᠢ
Exec=kylin-video %U
Icon=kylin-video
MimeType=audio/ac3;audio/mp4;audio/mpeg;audio/vnd.rn-realaudio;audio/vorbis;audio/x-adpcm;audio/x-matroska;audio/x-mp2;audio/x-mp3;audio/x-ms-wma;audio/x-vorbis;audio/x-wav;audio/mpegurl;audio/x-mpegurl;audio/x-pn-realaudio;audio/x-scpls;audio/aac;audio/flac;audio/ogg;audio/amr;audio/x-aiff;audio/basic;audio/midi;audio/amr-wb;audio/x-realaudio;audio/3gpp;audio/x-pn-realaudio-plugin;audio/x-gsm;audio/x-ms-wax;audio/prs.sid;audio/x-musepack;audio/x-ape;audio/x-m4a;audio/x-mod;audio/x-s3m;audio/x-flac;audio/x-vorbis+ogg;audio/x-wavpack;audio/mp2;audio/x-ms-asx;audio/x-tta;audio/x-mpeg;audio/m4a;audio/mp1;audio/mp3;audio/mpg;audio/scpls;audio/wav;audio/webm;audio/x-aac;audio/x-it;audio/x-mp1;audio/x-mpg;audio/x-ms-asf;audio/x-pn-au;audio/x-pn-wav;audio/x-shorten;audio/x-speex;audio/x-xm;audio/3gpp2;audio/dv;audio/eac3;audio/opus;audio/x-pn-aiff;audio/x-pn-windows-acm;audio/x-real-audio;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/vnd.dts;audio/vnd.dts.hd;audio/x-m4b;audio/x-stm;audio/m3u;audio/rn-mpeg;audio/vnd.dolby.mlp;audio/x-pls;audio/x-pn-windows-pcm;audio/x-sbc;audio/x-voc;audio/aiff;audio/mpeg2;audio/mpeg3;audio/musepack;audio/x-flac+ogg;audio/x-m3u;audio/x-oggflac;audio/x-opus+ogg;video/avi;video/mp4;video/flv;video/mpeg;video/quicktime;video/vnd.rn-realvideo;video/x-matroska;video/x-ms-asf;video/x-msvideo;video/x-ms-wmv;video/x-ogm;video/x-theora;video/webm;video/x-flv;video/ogg;video/3gpp;video/x-mng;video/mp2t;video/dv;video/mp4v-es;video/x-ms-wmx;video/vnd.mpegurl;video/fli;video/x-ms-wm;video/x-ms-wvx;video/vnd.vivo;video/x-fli;video/x-flc;video/x-m4v;video/3gpp2;video/x-ogm+ogg;video/x-avi;video/msvideo;video/x-theora+ogg;video/x-flic;video/x-mpeg;video/x-mpeg2;video/x-nsv;video/x-anim;video/3gp;video/divx;video/vnd.divx;video/x-ms-asx;video/mpeg-system;video/x-ms-afs;video/x-ms-asf-plugin;video/x-ms-wvxvideo;video/vivo;video/x-mpeg-system;video/x-totem-stream;video/mediaplayer;video/mkv;video/x-mjpeg;video/x-mpeg3;video/x-ms-wmp;audio/AMR;audio/amr;audio/m4p;audio/x-m4p;audio/au;audio/x-au;audio/voc;audio/x-voc;application/x-shockwave-flash;application/vnd.smaf;application/vnd.rn-realmedia;
diff --git a/src/core/mpvcore.cpp b/src/core/mpvcore.cpp
index 36edfbc..4b5e94e 100644
--- a/src/core/mpvcore.cpp
+++ b/src/core/mpvcore.cpp
@@ -1270,6 +1270,7 @@ void MpvCore::initMpvHandle()
SetOption("vo", "opengl-cb");
dynamic_cast<PlayGLWidget*>(m_playWidget)->setMpvHandle(m_mpvHandle);
}
+ SetOption("vd", "h264_omx,h265_omx,");
m_volume = g_settings->value("General/volume").toInt();
m_brightness = g_settings->value("General/brightness").toInt();

View File

@ -0,0 +1,56 @@
From: =?utf-8?b?5byg56OK?= <zhanglei01@kylinos.cn>
Date: Mon, 13 Nov 2023 07:06:46 +0000
Subject: =?utf-8?b?ITE3IGZpeCBidWcgIyBJN0JMUTjjgJDlvbHpn7PjgJHlj7PplK7oj5w=?=
=?utf-8?b?5Y2V5pyq5rGJ5YyW5a6M5YWo77yM5a2Y5Zyob3BlbnVybO+8jOS4lOatpOeVjA==?=
=?utf-8?b?6Z2i5pi+56S65Z2H5pyq5rGJ5YyWIE1lcmdlIHB1bGwgcmVxdWVzdCAhMTcgZnJv?=
=?utf-8?b?bSB4dXhpbnJvbmcwMS9vcGVua3lsaW4veWFuZ3R6ZQ==?=
---
src/translations/kylin-video_zh_CN.ts | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/translations/kylin-video_zh_CN.ts b/src/translations/kylin-video_zh_CN.ts
index 7bf564b..d7d4b2c 100644
--- a/src/translations/kylin-video_zh_CN.ts
+++ b/src/translations/kylin-video_zh_CN.ts
@@ -536,11 +536,11 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<source>Open URL</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">打开URL</translation>
</message>
<message>
<source>open url</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">打开URL</translation>
</message>
</context>
<context>
@@ -1811,7 +1811,7 @@ The file being played will be stopped.</source>
</message>
<message>
<source>open url</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">打开URL</translation>
</message>
</context>
<context>
@@ -1978,7 +1978,7 @@ The file being played will be stopped.</source>
<name>URLEditWidget</name>
<message>
<source>Open URL</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">打开URL</translation>
</message>
<message>
<source>Close</source>
@@ -1986,7 +1986,7 @@ The file being played will be stopped.</source>
</message>
<message>
<source>Please input url link</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">请输入url链接</translation>
</message>
<message>
<source>Cancel</source>

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,14 +1,19 @@
Name: kylin-video Name: kylin-video
Version: 3.1.4 Version: 3.1.4
Release: 5 Release: 11
Summary: A powerful video player Summary: A powerful video player
License: GPL-2.0+ License: GPL-2.0+
URL: https://gitee.com/openkylin/kylin-video URL: https://gitee.com/openkylin/kylin-video
Source0: kylin-video-3.1.4.tar.gz Source0: kylin-video-3.1.4.tar.gz
Patch01: 0001-fix-compile-error-of-kylin-video.patch Patch01: 0001-fix-compile-error-of-kylin-video.patch
Patch02: 0002-Repair-the-user-guide-does-not-work.patch Patch03: fix-build-error-of-kylin-video-about-mpv-0.35.patch
Patch03: 0003-fix-build-error-of-ffmpeg-6.1.1.patch Patch04: 0011-15-kylin-video.patch
Patch04: 0004-remove-MPV_EVENT_TRACK_SWITCHED-case.patch Patch05: 0012-update-changelog.patch
Patch06: 0013-update-changelog.patch
Patch07: 0014-.patch
Patch08: 0015-update-changelog.patch
Patch09: 0016-update-changelog.patch
Patch10: 0017-17-fix-bug-I7BLQ8-openurl.patch
BuildRequires: ffmpeg-devel BuildRequires: ffmpeg-devel
BuildRequires: libcrystalhd-devel BuildRequires: libcrystalhd-devel
@ -31,6 +36,7 @@ BuildRequires: qt5-qttools-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: libkysdk-qtwidgets-devel BuildRequires: libkysdk-qtwidgets-devel
BuildRequires: libkysdk-waylandhelper-devel BuildRequires: libkysdk-waylandhelper-devel
BuildRequires: libkysdk-sysinfo-devel
BuildRequires: qtav-devel BuildRequires: qtav-devel
Requires: mesa-vdpau-drivers libcrystalhd-devel mpv ffmpegthumbnailer-devel libqtavwidgets Requires: mesa-vdpau-drivers libcrystalhd-devel mpv ffmpegthumbnailer-devel libqtavwidgets
@ -40,17 +46,13 @@ 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 It supports both x86 and ARM platform, and supports most of the audio and video formatsprep
%prep %prep
%setup -q %autosetup -n %{name}-%{version} -p1
%patch 1 -p1
%patch 2 -p1
%patch 3 -p1
%patch 4 -p1
%build %build
mkdir qmake-build mkdir qmake-build
pushd qmake-build pushd qmake-build
%{qmake_qt5} .. %{qmake_qt5} ..
%{make_build} -j4 %{make_build}
popd popd
%install %install
@ -67,12 +69,29 @@ popd
%changelog %changelog
* Fri Nov 22 2024 lichenguang <lichenguang@kylinos.cn> - 3.1.4-5 * Wed Jun 05 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-11
- fix rpm build warning: %patchN is deprecated - add 0017-17-fix-bug-I7BLQ8-openurl.patch
* Fri Nov 22 2024 lichenguang <lichenguang@kylinos.cn> - 3.1.4-4 * Tue May 21 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-10
- fix build error of ffmpeg-6.1.1 - add 0016-update-changelog.patch
- fix build error of missing MPV_EVENT_TRACK_SWITCHED definition
* Thu May 09 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-9
- add 0015-update-changelog.patch
* Wed May 08 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-8
- add 0014-.patch
* Wed May 08 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-7
- add 0013-update-changelog.patch
* 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
* Wed Apr 10 2024 peijiankang <peijiankang@kylinos.cn> - 3.1.4-4
- add 0003-fix-build-error-of-kylin-video-about-ffmpeg-6.1.patch
* Mon Mar 06 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.4-3 * Mon Mar 06 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.4-3
- Repair the user guide does not work - Repair the user guide does not work