From e09651890ac02041170ca58e6910ef3e8b03ddae Mon Sep 17 00:00:00 2001 From: zhangxianting Date: Wed, 8 May 2024 11:16:11 +0800 Subject: [PATCH] spec: ffmpeg-devel at 6.1.1 remove pkgconfig(libavresample) fix: some function parameters have changed with mpv-libs update --- ...rameters-have-changed-with-mpv-libs-.patch | 61 +++++++++++++++++++ deepin-movie.spec | 9 ++- 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 0001-some-function-parameters-have-changed-with-mpv-libs-.patch diff --git a/0001-some-function-parameters-have-changed-with-mpv-libs-.patch b/0001-some-function-parameters-have-changed-with-mpv-libs-.patch new file mode 100644 index 0000000..e576a43 --- /dev/null +++ b/0001-some-function-parameters-have-changed-with-mpv-libs-.patch @@ -0,0 +1,61 @@ +From 66eeafc515bc96e2235573c6bc78f9a4ef3ab7f1 Mon Sep 17 00:00:00 2001 +From: zhangxianting +Date: Wed, 8 May 2024 16:31:49 +0800 +Subject: [PATCH] some function parameters have changed with mpv-libs update + +--- + src/backends/mpv/mpv_glwidget.cpp | 4 ++++ + src/backends/mpv/mpv_proxy.cpp | 2 ++ + src/libdmr/playlist_model.cpp | 2 +- + 3 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/backends/mpv/mpv_glwidget.cpp b/src/backends/mpv/mpv_glwidget.cpp +index 5f8cbba..2e5231a 100644 +--- a/src/backends/mpv/mpv_glwidget.cpp ++++ b/src/backends/mpv/mpv_glwidget.cpp +@@ -491,7 +491,11 @@ namespace dmr { + #endif + #endif + ++#if MPV_CLIENT_API_VERSION < MPV_MAKE_VERSION(2,0) + mpv_opengl_init_params gl_init_params = { get_proc_address, nullptr, nullptr }; ++#else ++ mpv_opengl_init_params gl_init_params = { get_proc_address, nullptr }; ++#endif + //int adv_control = 1; + mpv_render_param params[] = { + {MPV_RENDER_PARAM_API_TYPE, const_cast(MPV_RENDER_API_TYPE_OPENGL)}, +diff --git a/src/backends/mpv/mpv_proxy.cpp b/src/backends/mpv/mpv_proxy.cpp +index e2b1657..dc5a207 100644 +--- a/src/backends/mpv/mpv_proxy.cpp ++++ b/src/backends/mpv/mpv_proxy.cpp +@@ -582,11 +582,13 @@ void MpvProxy::handle_mpv_events() + // caused by seek or just playing + break; + ++#if MPV_CLIENT_API_VERSION < MPV_MAKE_VERSION(2,0) + case MPV_EVENT_TRACKS_CHANGED: + qInfo() << m_eventName(pEvent->event_id); + updatePlayingMovieInfo(); + emit tracksChanged(); + break; ++#endif + + case MPV_EVENT_FILE_LOADED: { + qInfo() << m_eventName(pEvent->event_id); +diff --git a/src/libdmr/playlist_model.cpp b/src/libdmr/playlist_model.cpp +index 6246311..d52b796 100644 +--- a/src/libdmr/playlist_model.cpp ++++ b/src/libdmr/playlist_model.cpp +@@ -1751,7 +1751,7 @@ static int open_codec_context(int *stream_idx, + st = fmt_ctx->streams[stream_index]; + #if LIBAVFORMAT_VERSION_MAJOR >= 57 + *dec_ctx = st->codecpar; +- dec = avcodec_find_decoder((*dec_ctx)->codec_id); ++ dec = g_mvideo_avcodec_find_decoder((*dec_ctx)->codec_id); + #else + /* find decoder for the stream */ + dec = avcodec_find_decoder(st->codecpar->codec_id); +-- +2.43.0 + diff --git a/deepin-movie.spec b/deepin-movie.spec index ed27f07..5e81ae2 100644 --- a/deepin-movie.spec +++ b/deepin-movie.spec @@ -3,7 +3,7 @@ Name: deepin-movie Version: 5.7.11 -Release: 1 +Release: 2 Summary: Deepin movie based on mpv Summary(zh_CN): 深度影音 License: GPLv3 @@ -11,6 +11,7 @@ URL: https://github.com/linuxdeepin/deepin-movie-reborn Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: %{name}-appdata.xml Patch0: fix_linking.patch +Patch1: 0001-some-function-parameters-have-changed-with-mpv-libs-.patch BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5DBus) @@ -28,7 +29,7 @@ BuildRequires: pkgconfig(libffmpegthumbnailer) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libavcodec) -BuildRequires: pkgconfig(libavresample) +BuildRequires: ffmpeg-devel BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libpulse-simple) BuildRequires: pkgconfig(mpris-qt5) @@ -98,6 +99,10 @@ rm -rf %{buildroot}/%{_datadir}/deepin-manual/ %{_libdir}/libdmr.so %changelog +* Wed May 08 2024 zhangxianting - 5.7.11-2 +- spec: ffmpeg-devel at 6.1.1 remove pkgconfig(libavresample) +- fix: some function parameters have changed with mpv-libs update + * Wed Dec 07 2022 liweiganga - 5.7.11-1 - update: update to 5.7.11 -- Gitee