summaryrefslogtreecommitdiffstats
path: root/meta-multimedia
diff options
context:
space:
mode:
authorMarkus Volk <f_l_k@t-online.de>2024-01-26 10:37:52 +0100
committerKhem Raj <raj.khem@gmail.com>2024-01-27 09:48:32 -0800
commit10c75cbde1be8bb7667bd084d379995ac3c5026f (patch)
tree10ce8696426ab4f15fd950e1a302bee14da73479 /meta-multimedia
parent711c6fbce39df685225bca081c5f42bae2de658b (diff)
downloadmeta-openembedded-10c75cbde1be8bb7667bd084d379995ac3c5026f.tar.gz
pipewire: fix build with libcamera-0.2
Add a backport patch to fix this issue with libcamera-0.2: | In file included from ../git/spa/plugins/libcamera/libcamera-source.cpp:188: | ../git/spa/plugins/libcamera/libcamera-utils.cpp:719:9: error: 'Transform' does not name a type https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3782 Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-multimedia')
-rw-r--r--meta-multimedia/recipes-multimedia/pipewire/pipewire/fd33d2d3bb6333c7d6e74cbaa806bff2d908f589.patch82
-rw-r--r--meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.1.bb5
2 files changed, 86 insertions, 1 deletions
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire/fd33d2d3bb6333c7d6e74cbaa806bff2d908f589.patch b/meta-multimedia/recipes-multimedia/pipewire/pipewire/fd33d2d3bb6333c7d6e74cbaa806bff2d908f589.patch
new file mode 100644
index 000000000..9c62df19e
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire/fd33d2d3bb6333c7d6e74cbaa806bff2d908f589.patch
@@ -0,0 +1,82 @@
1From fd33d2d3bb6333c7d6e74cbaa806bff2d908f589 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= <pobrn@protonmail.com>
3Date: Sat, 28 Oct 2023 02:09:06 +0200
4Subject: [PATCH] spa: libcamera: use `CameraConfiguration::orientation`
5
6libcamera commit cc65629b68d49d ("libcamera: camera: Introduce Orientation") [0]
7introduced to the `CameraConfiguration::orientation` member to describe the
8orientation of the image in the received memory buffers.
9
10Then c65e40b8480ffb ("libcamera: Use CameraConfiguration::orientation") [1]
11removed `CameraConfiguration::transform`, which broke the libcamera plugin.
12
13Fix that by using the new `orientation` member.
14
15[0]: https://git.linuxtv.org/libcamera.git/commit/?id=cc65629b68d49d5f2a4d61537584c56ba510a335
16[1]: https://git.linuxtv.org/libcamera.git/commit/?id=c65e40b8480ffb5f50e01a4e6713164c7194a937
17
18Upstream-Status: Backport [https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/fd33d2d3bb6333c7d6e74cbaa806bff2d908f589]
19---
20 spa/plugins/libcamera/libcamera-utils.cpp | 36 +++++++++++------------
21 1 file changed, 17 insertions(+), 19 deletions(-)
22
23diff --git a/spa/plugins/libcamera/libcamera-utils.cpp b/spa/plugins/libcamera/libcamera-utils.cpp
24index 2b1aea5a76..c197248d30 100644
25--- a/spa/plugins/libcamera/libcamera-utils.cpp
26+++ b/spa/plugins/libcamera/libcamera-utils.cpp
27@@ -716,25 +716,23 @@ static int spa_libcamera_use_buffers(struct impl *impl, struct port *port,
28 }
29
30 static const struct {
31- Transform libcamera_transform;
32- uint32_t spa_transform_value;
33-} transform_map[] = {
34- { Transform::Identity, SPA_META_TRANSFORMATION_None },
35- { Transform::Rot0, SPA_META_TRANSFORMATION_None },
36- { Transform::HFlip, SPA_META_TRANSFORMATION_Flipped },
37- { Transform::VFlip, SPA_META_TRANSFORMATION_Flipped180 },
38- { Transform::HVFlip, SPA_META_TRANSFORMATION_180 },
39- { Transform::Rot180, SPA_META_TRANSFORMATION_180 },
40- { Transform::Transpose, SPA_META_TRANSFORMATION_Flipped90 },
41- { Transform::Rot90, SPA_META_TRANSFORMATION_90 },
42- { Transform::Rot270, SPA_META_TRANSFORMATION_270 },
43- { Transform::Rot180Transpose, SPA_META_TRANSFORMATION_Flipped270 },
44+ Orientation libcamera_orientation; /* clockwise rotation then horizontal mirroring */
45+ uint32_t spa_transform_value; /* horizontal mirroring then counter-clockwise rotation */
46+} orientation_map[] = {
47+ { Orientation::Rotate0, SPA_META_TRANSFORMATION_None },
48+ { Orientation::Rotate0Mirror, SPA_META_TRANSFORMATION_Flipped },
49+ { Orientation::Rotate90, SPA_META_TRANSFORMATION_270 },
50+ { Orientation::Rotate90Mirror, SPA_META_TRANSFORMATION_Flipped90 },
51+ { Orientation::Rotate180, SPA_META_TRANSFORMATION_180 },
52+ { Orientation::Rotate180Mirror, SPA_META_TRANSFORMATION_Flipped180 },
53+ { Orientation::Rotate270, SPA_META_TRANSFORMATION_90 },
54+ { Orientation::Rotate270Mirror, SPA_META_TRANSFORMATION_Flipped270 },
55 };
56
57-static uint32_t libcamera_transform_to_spa_transform_value(Transform transform)
58+static uint32_t libcamera_orientation_to_spa_transform_value(Orientation orientation)
59 {
60- for (const auto& t : transform_map) {
61- if (t.libcamera_transform == transform)
62+ for (const auto& t : orientation_map) {
63+ if (t.libcamera_orientation == orientation)
64 return t.spa_transform_value;
65 }
66 return SPA_META_TRANSFORMATION_None;
67@@ -788,9 +786,9 @@ mmap_init(struct impl *impl, struct port *port,
68 buffers[i], SPA_META_VideoTransform, sizeof(*b->videotransform));
69 if (b->videotransform) {
70 b->videotransform->transform =
71- libcamera_transform_to_spa_transform_value(impl->config->transform);
72- spa_log_debug(impl->log, "Setting videotransform for buffer %d to %u (from %s)",
73- i, b->videotransform->transform, transformToString(impl->config->transform));
74+ libcamera_orientation_to_spa_transform_value(impl->config->orientation);
75+ spa_log_debug(impl->log, "Setting videotransform for buffer %u to %u",
76+ i, b->videotransform->transform);
77
78 }
79
80--
81GitLab
82
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.1.bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.1.bb
index a312594ad..f1b1ce586 100644
--- a/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.1.bb
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.1.bb
@@ -13,7 +13,10 @@ LIC_FILES_CHKSUM = " \
13DEPENDS = "dbus ncurses" 13DEPENDS = "dbus ncurses"
14 14
15SRCREV = "79b98884af80329f59596906231da5597bcdb7b6" 15SRCREV = "79b98884af80329f59596906231da5597bcdb7b6"
16SRC_URI = "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=1.0;protocol=https" 16SRC_URI = " \
17 git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=1.0;protocol=https \
18 file://fd33d2d3bb6333c7d6e74cbaa806bff2d908f589.patch \
19"
17 20
18S = "${WORKDIR}/git" 21S = "${WORKDIR}/git"
19 22