Accepting request 908411 from home:fcrozat:branches:multimedia:libs
- Add patch pipewire-fix-libcamera-build.patch: fix build with latest libcamera. - Do no build libcamera support on Leap 15.3 or lower (too old libcamera) and change name of BuildRequires from camera to libcamera. - Update minimal version for alsa buildrequires. OBS-URL: https://build.opensuse.org/request/show/908411 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pipewire?expand=0&rev=11
This commit is contained in:
parent
78d1591f94
commit
9c37676767
78
pipewire-fix-libcamera-build.patch
Normal file
78
pipewire-fix-libcamera-build.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
From 5471a0018b0394327c0cd4f1f60bf326632b29f1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||||
|
Date: Thu, 22 Jul 2021 20:09:34 +0200
|
||||||
|
Subject: [PATCH 1/2] libcamera: fix no-longer existent <libcamera/buffer.h>
|
||||||
|
header inclusion
|
||||||
|
|
||||||
|
The SPA plugin is including a <libcamera/buffer.h> header file, but this
|
||||||
|
got renamed to <libcamera/framebuffer.h> to match the defined class name:
|
||||||
|
|
||||||
|
../spa/plugins/libcamera/libcamera_wrapper.cpp:52:10: fatal error: libcamera/buffer.h: No such file or directory
|
||||||
|
52 | #include <libcamera/buffer.h>
|
||||||
|
| ^~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Fixes #1435
|
||||||
|
---
|
||||||
|
spa/plugins/libcamera/libcamera_wrapper.cpp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/spa/plugins/libcamera/libcamera_wrapper.cpp b/spa/plugins/libcamera/libcamera_wrapper.cpp
|
||||||
|
index 58c062412..f25922eb1 100644
|
||||||
|
--- a/spa/plugins/libcamera/libcamera_wrapper.cpp
|
||||||
|
+++ b/spa/plugins/libcamera/libcamera_wrapper.cpp
|
||||||
|
@@ -49,7 +49,7 @@
|
||||||
|
#include <libcamera/camera_manager.h>
|
||||||
|
#include <libcamera/request.h>
|
||||||
|
#include <libcamera/framebuffer_allocator.h>
|
||||||
|
-#include <libcamera/buffer.h>
|
||||||
|
+#include <libcamera/framebuffer.h>
|
||||||
|
#include <libcamera/property_ids.h>
|
||||||
|
#include <libcamera/controls.h>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
||||||
|
|
||||||
|
From 76cb5c1169b58b48a2921ccc3f61c713b297c07f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Javier Martinez Canillas <javierm@redhat.com>
|
||||||
|
Date: Thu, 22 Jul 2021 20:17:09 +0200
|
||||||
|
Subject: [PATCH 2/2] libcamera: remove unused buffer variable in
|
||||||
|
LibCamera::stop()
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
To fix build warning about a variable being unused in LibCamera::stop():
|
||||||
|
|
||||||
|
[1/2] Compiling C++ object spa/plugins/libcamera/libspa-libcamera.so.p/libcamera_wrapper.cpp.o
|
||||||
|
../spa/plugins/libcamera/libcamera_wrapper.cpp: In member function ‘void LibCamera::stop()’:
|
||||||
|
../spa/plugins/libcamera/libcamera_wrapper.cpp:531:58: warning: unused variable ‘buffer’ [-Wunused-variable]
|
||||||
|
531 | for (const std::unique_ptr<FrameBuffer> &buffer : this->allocator_->buffers(stream)) {
|
||||||
|
| ^~~~~~
|
||||||
|
---
|
||||||
|
spa/plugins/libcamera/libcamera_wrapper.cpp | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/spa/plugins/libcamera/libcamera_wrapper.cpp b/spa/plugins/libcamera/libcamera_wrapper.cpp
|
||||||
|
index f25922eb1..d58238d33 100644
|
||||||
|
--- a/spa/plugins/libcamera/libcamera_wrapper.cpp
|
||||||
|
+++ b/spa/plugins/libcamera/libcamera_wrapper.cpp
|
||||||
|
@@ -524,13 +524,12 @@ extern "C" {
|
||||||
|
void LibCamera::stop() {
|
||||||
|
this->disconnect();
|
||||||
|
|
||||||
|
- uint32_t bufIdx = 0;
|
||||||
|
StreamConfiguration &cfg = this->config_->at(0);
|
||||||
|
Stream *stream = cfg.stream();
|
||||||
|
+ uint32_t nbuffers = this->allocator_->buffers(stream).size();
|
||||||
|
|
||||||
|
- for (const std::unique_ptr<FrameBuffer> &buffer : this->allocator_->buffers(stream)) {
|
||||||
|
+ for (uint32_t bufIdx = 0; bufIdx < nbuffers; bufIdx++) {
|
||||||
|
delete [] this->fd_[bufIdx];
|
||||||
|
- bufIdx++;
|
||||||
|
}
|
||||||
|
delete [] this->fd_;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 22 07:55:13 UTC 2021 - Frederic Crozat <fcrozat@suse.com>
|
||||||
|
|
||||||
|
- Add patch pipewire-fix-libcamera-build.patch: fix build with
|
||||||
|
latest libcamera.
|
||||||
|
- Do no build libcamera support on Leap 15.3 or lower (too old
|
||||||
|
libcamera) and change name of BuildRequires from camera to
|
||||||
|
libcamera.
|
||||||
|
- Update minimal version for alsa buildrequires.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 20 12:46:57 UTC 2021 - Frederic Crozat <fcrozat@suse.com>
|
Tue Jul 20 12:46:57 UTC 2021 - Frederic Crozat <fcrozat@suse.com>
|
||||||
|
|
||||||
|
@ -29,6 +29,12 @@
|
|||||||
%define with_vulkan 0
|
%define with_vulkan 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version} >= 1550
|
||||||
|
%define with_libcamera 1
|
||||||
|
%else
|
||||||
|
%define with_libcamera 0
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifnarch s390 s390x ppc64
|
%ifnarch s390 s390x ppc64
|
||||||
%define with_ldacBT 1
|
%define with_ldacBT 1
|
||||||
%else
|
%else
|
||||||
@ -48,6 +54,8 @@ URL: https://pipewire.org/
|
|||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
Source1: %{name}-rpmlintrc
|
Source1: %{name}-rpmlintrc
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
|
# PATCH-FIX-UPSTREAM pipewire-fix-libcamera-build.patch fcrozat@suse.com -- Fix build with latest libcamera
|
||||||
|
Patch0: pipewire-fix-libcamera-build.patch
|
||||||
|
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -60,10 +68,12 @@ BuildRequires: meson
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: xmltoman
|
BuildRequires: xmltoman
|
||||||
BuildRequires: pkgconfig(alsa)
|
BuildRequires: pkgconfig(alsa) >= 1.1.7
|
||||||
BuildRequires: pkgconfig(avahi-client)
|
BuildRequires: pkgconfig(avahi-client)
|
||||||
BuildRequires: pkgconfig(bluez)
|
BuildRequires: pkgconfig(bluez)
|
||||||
BuildRequires: pkgconfig(camera)
|
%if %{with_libcamera}
|
||||||
|
BuildRequires: pkgconfig(libcamera)
|
||||||
|
%endif
|
||||||
BuildRequires: pkgconfig(dbus-1)
|
BuildRequires: pkgconfig(dbus-1)
|
||||||
%if %{with aac}
|
%if %{with aac}
|
||||||
BuildRequires: pkgconfig(fdk-aac)
|
BuildRequires: pkgconfig(fdk-aac)
|
||||||
@ -339,7 +349,11 @@ export CC=gcc-9
|
|||||||
%else
|
%else
|
||||||
-Dbluez5-codec-ldac=disabled \
|
-Dbluez5-codec-ldac=disabled \
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_libcamera}
|
||||||
-Dlibcamera=enabled \
|
-Dlibcamera=enabled \
|
||||||
|
%else
|
||||||
|
-Dlibcamera=disabled \
|
||||||
|
%endif
|
||||||
-Dpipewire-jack=enabled \
|
-Dpipewire-jack=enabled \
|
||||||
-Djack=enabled \
|
-Djack=enabled \
|
||||||
-Djack-devel=enabled \
|
-Djack-devel=enabled \
|
||||||
@ -631,7 +645,9 @@ fi
|
|||||||
%{_libdir}/spa-%{spa_ver}/control/libspa-control.so
|
%{_libdir}/spa-%{spa_ver}/control/libspa-control.so
|
||||||
%{_libdir}/spa-%{spa_ver}/ffmpeg/libspa-ffmpeg.so
|
%{_libdir}/spa-%{spa_ver}/ffmpeg/libspa-ffmpeg.so
|
||||||
%{_libdir}/spa-%{spa_ver}/jack/libspa-jack.so
|
%{_libdir}/spa-%{spa_ver}/jack/libspa-jack.so
|
||||||
|
%if %{with_libcamera}
|
||||||
%{_libdir}/spa-%{spa_ver}/libcamera/libspa-libcamera.so
|
%{_libdir}/spa-%{spa_ver}/libcamera/libspa-libcamera.so
|
||||||
|
%endif
|
||||||
%{_libdir}/spa-%{spa_ver}/support/libspa-dbus.so
|
%{_libdir}/spa-%{spa_ver}/support/libspa-dbus.so
|
||||||
%{_libdir}/spa-%{spa_ver}/support/libspa-journal.so
|
%{_libdir}/spa-%{spa_ver}/support/libspa-journal.so
|
||||||
%{_libdir}/spa-%{spa_ver}/support/libspa-support.so
|
%{_libdir}/spa-%{spa_ver}/support/libspa-support.so
|
||||||
@ -654,7 +670,9 @@ fi
|
|||||||
%dir %{_libdir}/spa-%{spa_ver}/volume
|
%dir %{_libdir}/spa-%{spa_ver}/volume
|
||||||
%dir %{_libdir}/spa-%{spa_ver}/ffmpeg
|
%dir %{_libdir}/spa-%{spa_ver}/ffmpeg
|
||||||
%dir %{_libdir}/spa-%{spa_ver}/jack
|
%dir %{_libdir}/spa-%{spa_ver}/jack
|
||||||
|
%if %{with_libcamera}
|
||||||
%dir %{_libdir}/spa-%{spa_ver}/libcamera
|
%dir %{_libdir}/spa-%{spa_ver}/libcamera
|
||||||
|
%endif
|
||||||
%dir %{_libdir}/spa-%{spa_ver}/support
|
%dir %{_libdir}/spa-%{spa_ver}/support
|
||||||
%dir %{_libdir}/spa-%{spa_ver}/v4l2
|
%dir %{_libdir}/spa-%{spa_ver}/v4l2
|
||||||
%dir %{_libdir}/spa-%{spa_ver}/videoconvert
|
%dir %{_libdir}/spa-%{spa_ver}/videoconvert
|
||||||
|
Loading…
x
Reference in New Issue
Block a user