From 50601e60f7f561c94080d23e6ed25b62553406c2 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Tue, 16 May 2023 06:40:38 +0200 Subject: libcamera: update 0.0.4 -> 0.0.5 libcamera v0.0.5 Bugfixes: - meson: Ignore -Wredundant-move with gcc-13 and newer - cam: file_sink: Workaround gcc-13 dangling-reference false positive - libcamera: Open files with O_CLOEXEC - meson: Fix git version parsing - libcamera: camera_manager: Stop exponential explosive calls to createPipelineHandlers - py: cam: Fix demosaic overflow issue - libcamera: base: Make the registration of log categories atomic Core: - test: controls: control_info_map: Test default constructor - controls: guard ControlInfoMap against nullptr idmap_ - device_enumerator_udev: Use std::string_view - formats: Add 14-bits Bayer RAW formats - device_enumerator_udev: Remove devnum from dependency map - meson: libcamera: Report IPA signature method - meson: Align handling of build metadata - converter: Check converter validity - Keep using syslog for isolated IPA modules - utils: ipc: Update parser.py - utils: checkstyle.py: Don't run commit title checker on staged commits - framebuffer: Allow inheritance of FrameBuffer - Remove transform from V4L2SubdeviceFormat - libcamera: camera_sensor: Add tryFormat() - camera_sensor: Fix typo in comment - camera_sensor: Demote flip support message to Debug - internal: tracepoints: Use correct include directive - libcamera: camera: Ensure queued requests are invalid ipa: - doc: Clarify IPA acronym in its namespace description - rkisp1: Add tuning files for PinephonePro sensors - rkisp1: Add tuning files for Google DRU "Scarlet" sensors - rkisp1: lsc: Fix integer division error - libipa: Add OV2685 Camera Sensor Helper - libipa: Add OV5647 Camera Sensor Helper - raspberrypi: agc: Add "shadows" constraint mode - raspberrypi: generalise algorithms - raspberrypi: Fix default frame durations calculation - raspberrypi: Ensure shutter speed and gain are clipped in the AGC - raspberrypi: Use the new sensor limits fields in CameraMode - raspberrypi: Add sensor mode limits to CameraMode - raspberrypi: Fix crash under LTO - raspberrypi: imx296: Minor tuning updates - raspberrypi: agc: Fix overflow in Y value calculation - raspberrypi: Better heuristics for calculating Unicam timeout - raspberrypi: Generalise statistics - raspberrypi: Change Unicam timeout handling pipeline: - simple: Validate transform - imx8-isi: Remove mbusCode from formatsMap_ - imx8-isi: Automatically select media bus code - imx8-isi: Split Bayer/YUV config generation - imx8-isi: Break out RAW/YUV format selection - raspberrypi: Iterate over all Unicam instances in match() - raspberrypi: Add a Unicam timeout override config options - raspberrypi: Always use ColorSpace::Raw for raw streams - raspberrypi: Drop unused code - ipu3: Drop unused code apps: - cam: kms_sink: Drop unique_ptr<> from DRM::AtomicRequest - cam Return std::optional<> from StreamKeyValueParser::parseRole() - android: jpeg: Add JEA implementation ABI Compliance: * abi-compliance-checker reports 98.6% ABI and 100% API compatibility with with v0.0.4 Total binary compatibility problems: 1, warnings: 1 Total source compatibility problems: 0, warnings: 0 - First virtual method ~__dt ( ) has been added to this class. 1) The layout of type structure has been shifted by 8 bytes by the added v-table pointer. 2) Size of class has been increased by 8 bytes. affected symbols: 6 (1.4%) FrameBuffer::releaseFence ( ) FrameBuffer::setCookie ( uint64_t cookie ) FrameBuffer::cookie ( ) FrameBuffer::planes ( ) FrameBuffer::request ( ) FrameBuffer::metadata ( ) This ABI breakage was introduced by: 4843bfa ("libcamera: framebuffer: Allow inheritance of FrameBuffer") Signed-off-by: Markus Volk Signed-off-by: Khem Raj --- ...01-file_sink.cpp-Avoid-dangling-reference.patch | 44 ------------- .../libcamera/libcamera_0.0.4.bb | 72 ---------------------- .../libcamera/libcamera_0.0.5.bb | 71 +++++++++++++++++++++ 3 files changed, 71 insertions(+), 116 deletions(-) delete mode 100644 meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch delete mode 100644 meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb create mode 100644 meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb (limited to 'meta-multimedia') diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch deleted file mode 100644 index 55a5977a7a..0000000000 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2eaffc9ac8b47c354404075761fe8f76fad0ced4 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 24 Jan 2023 01:18:25 -0800 -Subject: [PATCH] file_sink.cpp: Avoid dangling-reference - -Fixes following errors with gcc-13 - -../git/src/cam/file_sink.cpp:92:45: error: possibly dangling reference to a temporary [-Werror=dangling-reference] - 92 | const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; - | ^~~~ -../git/src/cam/file_sink.cpp:92:81: note: the temporary was destroyed at the end of the full expression '(& buffer->libcamera::FrameBuffer::metadata())->libcamera::FrameMetadata::planes().libcamera::Span::operator[](i)' - 92 | const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; - | ^ -cc1plus: all warnings being treated as errors - -Upstream-Status: Submitted [https://lists.libcamera.org/pipermail/libcamera-devel/2023-January/036575.html] -Signed-off-by: Khem Raj - ---- - src/apps/cam/file_sink.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/apps/cam/file_sink.cpp b/src/apps/cam/file_sink.cpp -index b32aad24..9f4c5648 100644 ---- a/src/apps/cam/file_sink.cpp -+++ b/src/apps/cam/file_sink.cpp -@@ -114,13 +114,13 @@ void FileSink::writeBuffer(const Stream *stream, FrameBuffer *buffer, - } - - for (unsigned int i = 0; i < buffer->planes().size(); ++i) { -- const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; -+ unsigned int bytesused = buffer->metadata().planes()[i].bytesused; - - Span data = image->data(i); -- unsigned int length = std::min(meta.bytesused, data.size()); -+ unsigned int length = std::min(bytesused, data.size()); - -- if (meta.bytesused > data.size()) -- std::cerr << "payload size " << meta.bytesused -+ if (bytesused > data.size()) -+ std::cerr << "payload size " << bytesused - << " larger than plane size " << data.size() - << std::endl; - diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb deleted file mode 100644 index 12d42991eb..0000000000 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.4.bb +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY = "Linux libcamera framework" -SECTION = "libs" - -LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" - -LIC_FILES_CHKSUM = "\ - file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ - file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ -" - -SRC_URI = " \ - git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ - file://0001-file_sink.cpp-Avoid-dangling-reference.patch \ -" - -SRCREV = "6cf637eb253a68edebe59505bea55435fafb00cd" - -PE = "1" - -S = "${WORKDIR}/git" - -DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" - -PACKAGES =+ "${PN}-gst" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" - -EXTRA_OEMESON = " \ - -Dpipelines=uvcvideo,simple,vimc \ - -Dipas=vimc \ - -Dv4l2=true \ - -Dcam=enabled \ - -Dlc-compliance=disabled \ - -Dtest=false \ - -Ddocumentation=disabled \ -" - -RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" - -inherit meson pkgconfig python3native - -do_configure:prepend() { - sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py -} - -do_install:append() { - chrpath -d ${D}${libdir}/libcamera.so - chrpath -d ${D}${libdir}/v4l2-compat.so -} - -addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata -do_recalculate_ipa_signatures_package() { - local modules - for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do - module="${module%.sign}" - if [ -f "${module}" ] ; then - modules="${modules} ${module}" - fi - done - - ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" -} - -FILES:${PN} += " ${libdir}/v4l2-compat.so" -FILES:${PN}-gst = "${libdir}/gstreamer-1.0" - -# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to -# both 32 and 64 bit file APIs. -GLIBC_64BIT_TIME_FLAGS = "" - diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb new file mode 100644 index 0000000000..14a20b4317 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.5.bb @@ -0,0 +1,71 @@ +SUMMARY = "Linux libcamera framework" +SECTION = "libs" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" + +LIC_FILES_CHKSUM = "\ + file://LICENSES/GPL-2.0-or-later.txt;md5=fed54355545ffd980b814dab4a3b312c \ + file://LICENSES/LGPL-2.1-or-later.txt;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ +" + +SRC_URI = " \ + git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ +" + +SRCREV = "fb44403f1c5571549ac128c21daee9761eb9249c" + +PE = "1" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-pyyaml-native python3-jinja2-native python3-ply-native python3-jinja2-native udev gnutls chrpath-native libevent libyaml" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}" + +PACKAGES =+ "${PN}-gst" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[gst] = "-Dgstreamer=enabled,-Dgstreamer=disabled,gstreamer1.0 gstreamer1.0-plugins-base" + +EXTRA_OEMESON = " \ + -Dpipelines=uvcvideo,simple,vimc \ + -Dipas=vimc \ + -Dv4l2=true \ + -Dcam=enabled \ + -Dlc-compliance=disabled \ + -Dtest=false \ + -Ddocumentation=disabled \ +" + +RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}" + +inherit meson pkgconfig python3native + +do_configure:prepend() { + sed -i -e 's|py_compile=True,||' ${S}/utils/ipc/mojo/public/tools/mojom/mojom/generate/template_expander.py +} + +do_install:append() { + chrpath -d ${D}${libdir}/libcamera.so + chrpath -d ${D}${libdir}/v4l2-compat.so +} + +addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata +do_recalculate_ipa_signatures_package() { + local modules + for module in $(find ${PKGD}/usr/lib/libcamera -name "*.so.sign"); do + module="${module%.sign}" + if [ -f "${module}" ] ; then + modules="${modules} ${module}" + fi + done + + ${S}/src/ipa/ipa-sign-install.sh ${B}/src/ipa-priv-key.pem "${modules}" +} + +FILES:${PN} += " ${libdir}/v4l2-compat.so" +FILES:${PN}-gst = "${libdir}/gstreamer-1.0" + +# libcamera-v4l2 explicitly sets _FILE_OFFSET_BITS=32 to get access to +# both 32 and 64 bit file APIs. +GLIBC_64BIT_TIME_FLAGS = "" + -- cgit v1.2.3-54-g00ecf