package/libcamera-apps: new package
PATCH v3 1/1 package/libcamera-apps: new package
---
Changes v2 -> v3:
- bump version
- add license file entry/hash
- exchange patch 0002-cmake-remove-unrecognized-gcc-command-line-option.patch with 0002-cmake-add-option-ENABLE_COMPILE_FLAGS_FOR_TARGET.patch (a upstream suggested solution) and add cmake configure option accordingly
Changes v1 -> v2:
- fix Config.in indent (Thomas Petazzoni)
- fix Config.in select ordering (Thomas Petazzoni)
- fix Config.in comment regarding OpenGL
- change download to use github macro (Thomas Petazzoni)
- update 0001-cmake-remove-unsafe-host-include-path-for-libdrm-use.patch (add upstream link)
- update 0002-cmake-remove-unrecognized-gcc-command-line-option.patch (add upstream link)
- update 0003-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch (new patch)
- update 0004-libcamera_vid-fix-getline-call-needs-size_t.patch (add upstream link)
- update 0005-libcamera_still-fix-getline-call-needs-size_t.patch (add upstream link)
- update 0006-libcamera_app-fix-int64_t-constants.patch
(add upstream link)
- update 0007-cmake-fix-linking-with-exif-jpeg.patch
(add upstream link)
- update 0008-cmake-add-install-target.patch
(add upstream link, update on upstream request to support older cmake versions - add DESTINATION defaults)
- update 0009-cmake-no-need-to-link-against-ipa_rpi.so.patch (add upstream link)
- update 0010-circular_output-fix-size_t-vs.-unsigned-int-narrowin.patch (new patch)
- update 0011-egl_preview-fix-XVisualInfo-initializer.patch (new patch)
- update 0012-jpeg-fix-long-unsigned-int-vs.-size_t-mismatch.patch (new patch)
- update 0013-jpeg-fix-bool-vs.-boolean-mismatch.patch
(new patch)
- update 0014-mjpeg_encoder-fix-long-unsigned-int-vs.-size_t-misma.patch (new patch)
- update 0015-mjpeg_encoder-fix-bool-vs.-boolean-mismatch.patch (new patch)
Notes:
- Tested with test-pkg and the following two test configs
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER=y
BR2_PACKAGE_MESA3D_DRIVER=y
BR2_PACKAGE_MESA3D_GALLIUM_KMSRO=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y
BR2_PACKAGE_MESA3D_GBM=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XLIB_LIBX11=y
BR2_PACKAGE_LIBEPOXY=y
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_BOOST=y
BR2_PACKAGE_BOOST_PROGRAM_OPTIONS=y
BR2_PACKAGE_LIBEXIF=y
BR2_PACKAGE_JPEG=y
BR2_PACKAGE_TIFF=y
BR2_PACKAGE_LIBPNG=y
BR2_PACKAGE_LIBCAMERA=y
BR2_PACKAGE_LIBCAMERA_V4L2=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER=y
BR2_PACKAGE_MESA3D_DRIVER=y
BR2_PACKAGE_MESA3D_GALLIUM_KMSRO=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y
BR2_PACKAGE_MESA3D_GBM=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XLIB_LIBX11=y
BR2_PACKAGE_LIBEPOXY=y
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_BOOST=y
BR2_PACKAGE_BOOST_PROGRAM_OPTIONS=y
BR2_PACKAGE_LIBEXIF=y
BR2_PACKAGE_JPEG=y
BR2_PACKAGE_TIFF=y
BR2_PACKAGE_LIBPNG=y
BR2_PACKAGE_LIBCAMERA=y
BR2_PACKAGE_LIBCAMERA_V4L2=y- runtime tested on RPi4 as described here
http://lists.busybox.net/pipermail/buildroot/2021-January/302373.html --- DEVELOPERS | 1 + package/Config.in | 1 + ...afe-host-include-path-for-libdrm-use.patch | 30 +++++ ...tion-ENABLE_COMPILE_FLAGS_FOR_TARGET.patch | 46 ++++++++ ...tal-errors-compiler-command-line-opt.patch | 25 ++++ ...ra_vid-fix-getline-call-needs-size_t.patch | 38 ++++++ ..._still-fix-getline-call-needs-size_t.patch | 38 ++++++ ...-libcamera_app-fix-int64_t-constants.patch | 39 +++++++ ...007-cmake-fix-linking-with-exif-jpeg.patch | 48 ++++++++ .../0008-cmake-add-install-target.patch | 25 ++++ ...e-no-need-to-link-against-ipa_rpi.so.patch | 59 ++++++++++ ...fix-size_t-vs.-unsigned-int-narrowin.patch | 38 ++++++ ..._preview-fix-XVisualInfo-initializer.patch | 38 ++++++ ...ong-unsigned-int-vs.-size_t-mismatch.patch | 109 ++++++++++++++++++ ...3-jpeg-fix-bool-vs.-boolean-mismatch.patch | 36 ++++++ ...x-long-unsigned-int-vs.-size_t-misma.patch | 89 ++++++++++++++ ...ncoder-fix-bool-vs.-boolean-mismatch.patch | 37 ++++++ package/libcamera-apps/Config.in | 31 +++++ package/libcamera-apps/libcamera-apps.hash | 3 + package/libcamera-apps/libcamera-apps.mk | 25 ++++ 20 files changed, 756 insertions(+) create mode 100644 package/libcamera-apps/0001-cmake-remove-unsafe-host-include-path-for-libdrm-use.patch create mode 100644 package/libcamera-apps/0002-cmake-add-option-ENABLE_COMPILE_FLAGS_FOR_TARGET.patch create mode 100644 package/libcamera-apps/0003-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch create mode 100644 package/libcamera-apps/0004-libcamera_vid-fix-getline-call-needs-size_t.patch create mode 100644 package/libcamera-apps/0005-libcamera_still-fix-getline-call-needs-size_t.patch create mode 100644 package/libcamera-apps/0006-libcamera_app-fix-int64_t-constants.patch create mode 100644 package/libcamera-apps/0007-cmake-fix-linking-with-exif-jpeg.patch create mode 100644 package/libcamera-apps/0008-cmake-add-install-target.patch create mode 100644 package/libcamera-apps/0009-cmake-no-need-to-link-against-ipa_rpi.so.patch create mode 100644 package/libcamera-apps/0010-circular_output-fix-size_t-vs.-unsigned-int-narrowin.patch create mode 100644 package/libcamera-apps/0011-egl_preview-fix-XVisualInfo-initializer.patch create mode 100644 package/libcamera-apps/0012-jpeg-fix-long-unsigned-int-vs.-size_t-mismatch.patch create mode 100644 package/libcamera-apps/0013-jpeg-fix-bool-vs.-boolean-mismatch.patch create mode 100644 package/libcamera-apps/0014-mjpeg_encoder-fix-long-unsigned-int-vs.-size_t-misma.patch create mode 100644 package/libcamera-apps/0015-mjpeg_encoder-fix-bool-vs.-boolean-mismatch.patch create mode 100644 package/libcamera-apps/Config.in create mode 100644 package/libcamera-apps/libcamera-apps.hash create mode 100644 package/libcamera-apps/libcamera-apps.mk
DEVELOPERS +1 -0
@@ -2102,6 +2102,7 @@ F: package/gstreamer1/gst1-devtools/ F: package/gstreamer1/gst1-interpipe/ F: package/gstreamer1/gstreamer1-editing-services/ F: package/iwd/ +F: package/libcamera-apps/ F: package/libevdev/ F: package/libuev/ F: package/log4cplus/
package/Config.in +1 -0
@@ -1673,6 +1673,7 @@ menu "Multimedia" source "package/libbdplus/Config.in" source "package/libbluray/Config.in" source "package/libcamera/Config.in" + source "package/libcamera-apps/Config.in" source "package/libdcadec/Config.in" source "package/libdvbcsa/Config.in" source "package/libdvbpsi/Config.in"
package/libcamera-apps/0001-cmake-remove-unsafe-host-include-path-for-libdrm-use.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 80f4778564ae0f0e29da37da336cd262db2f1498 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 27 Jan 2021 20:13:17 +0100 +Subject: [PATCH] cmake: remove unsafe host include path for libdrm (use + pkgconfig instead) + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 85d2b5d..c02f200 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,8 +25,9 @@ project(libcamera-still) + + find_package(PkgConfig REQUIRED) + pkg_check_modules(CAMERA REQUIRED camera) ++pkg_check_modules(LIBDRM REQUIRED libdrm) + +-include_directories(. "${CAMERA_INCLUDE_DIRS}" /usr/include/libdrm) ++include_directories(. "${CAMERA_INCLUDE_DIRS}" "${LIBDRM_INCLUDE_DIRS}") + + find_package( Boost REQUIRED COMPONENTS program_options ) + +-- +2.30.0 +
package/libcamera-apps/0002-cmake-add-option-ENABLE_COMPILE_FLAGS_FOR_TARGET.patch new file +46 -0
46 lines not on this page · raw message
package/libcamera-apps/0003-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 1f6b9285c0d92991170be88c6003b1a99fd0b95a Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Fri, 5 Feb 2021 18:24:08 +0100 +Subject: [PATCH] cmake: remove -Wfatal-errors compiler command line option + +Signed-off-by: Peter Seiderer <[email protected]> +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6bbae3c..2a062b1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,7 +10,6 @@ endif() + set (CMAKE_EXPORT_COMPILE_COMMANDS ON) + set (CMAKE_CXX_STANDARD 17) + set (CMAKE CXX_FLAGS "-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new") +-add_definitions(-Wfatal-errors) + add_definitions(-Wno-psabi) + add_definitions(-DBOOST_LOG_DYN_LINK) + +-- +2.30.0 +
package/libcamera-apps/0004-libcamera_vid-fix-getline-call-needs-size_t.patch new file +38 -0
@@ -0,0 +1,38 @@ +From c3500a59fba4573797ece7748b71aa1782ca7c94 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 27 Jan 2021 23:06:23 +0100 +Subject: [PATCH] libcamera_vid: fix getline call (needs size_t) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + +.../libcamera-apps-custom/libcamera_vid.cpp:39:26: error: cannot convert ?unsigned int*? to ?size_t*? {aka ?long unsigned int*?} + 39 | getline(&user_string, &len, stdin); + | ^~~~ + | | + | unsigned int* + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + libcamera_vid.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcamera_vid.cpp b/libcamera_vid.cpp +index 40a5fcb..7b573c0 100644 +--- a/libcamera_vid.cpp ++++ b/libcamera_vid.cpp +@@ -35,7 +35,7 @@ static int get_key_or_signal(VideoOptions const &options, pollfd p[1]) + if (p[0].revents & POLLIN) + { + char *user_string = nullptr; +- unsigned int len; ++ size_t len; + getline(&user_string, &len, stdin); + key = user_string[0]; + } +-- +2.30.0 +
package/libcamera-apps/0005-libcamera_still-fix-getline-call-needs-size_t.patch new file +38 -0
@@ -0,0 +1,38 @@ +From c5c9bc995d56673cedd06003ed492e5f434fc28a Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 27 Jan 2021 23:08:18 +0100 +Subject: [PATCH] libcamera_still: fix getline call (needs size_t) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + +.../build/libcamera-apps-custom/libcamera_still.cpp:152:26: error: cannot convert ?unsigned int*? to ?size_t*? {aka ?long unsigned int*?} + 152 | getline(&user_string, &len, stdin); + | ^~~~ + | | + | unsigned int* + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + libcamera_still.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcamera_still.cpp b/libcamera_still.cpp +index fb74996..c951669 100644 +--- a/libcamera_still.cpp ++++ b/libcamera_still.cpp +@@ -148,7 +148,7 @@ static int get_key_or_signal(StillOptions const &options, pollfd p[1]) + if (p[0].revents & POLLIN) + { + char *user_string = nullptr; +- unsigned int len; ++ size_t len; + getline(&user_string, &len, stdin); + key = user_string[0]; + } +-- +2.30.0 +
package/libcamera-apps/0006-libcamera_app-fix-int64_t-constants.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 4a260207a3161627f944bda3c2cecfb4a695a4f7 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 28 Jan 2021 22:40:22 +0100 +Subject: [PATCH] libcamera_app: fix int64_t constants +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + +.../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libcamera/libcamera/controls.h: In instantiation of ?void libcamera::ControlList::set(const libcamera::Control<T>&, const std::initializer_list<_Up>&) [with T = libcamera::Span<const long int>; V = long long int]?: +.../libcamera_app.hpp:331:18: required from ?void LibcameraApp<OPTIONS>::StartCamera() [with OPTIONS = StillOptions]? +.../libcamera_jpeg.cpp:35:18: required from here +.../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libcamera/libcamera/controls.h:399:14: error: no matching function for call to ?libcamera::ControlValue::set<libcamera::Span<const long int, 18446744073709551615> >(libcamera::Span<const long long int, 18446744073709551615>)? + 399 | val->set<T>(Span<const typename std::remove_cv_t<V>>{ value.begin(), value.size() }); + | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + libcamera_app.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcamera_app.hpp b/libcamera_app.hpp +index 7be0f7a..02b71cb 100644 +--- a/libcamera_app.hpp ++++ b/libcamera_app.hpp +@@ -328,7 +328,7 @@ public: + if (!controls_.contains(controls::FrameDurations)) + { + if (still_stream_) +- controls_.set(controls::FrameDurations, { 100LL, 1000000000LL }); ++ controls_.set(controls::FrameDurations, { INT64_C(100), INT64_C(1000000000) }); + else if (options.framerate > 0) + { + int64_t frame_time = 1000000 / options.framerate; // in us +-- +2.30.0 +
package/libcamera-apps/0007-cmake-fix-linking-with-exif-jpeg.patch new file +48 -0
48 lines not on this page · raw message
package/libcamera-apps/0008-cmake-add-install-target.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 64b9efb5980f7af027c253b8d1c067e4913d137e Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 27 Jan 2021 23:27:53 +0100 +Subject: [PATCH] cmake: add install target + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 889cd87..a1b4bc2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -74,3 +74,6 @@ project(libcamera-jpeg) + + add_executable(libcamera-jpeg libcamera_jpeg.cpp) + target_link_libraries(libcamera-jpeg common "${LIBCAMERA_LIBRARY}" "${IPA_RPI_LIBRARY}" exif jpeg ${Boost_LIBRARIES} pthread "${X11_LIBRARIES}" "${EPOXY_LIBRARY}" "${DRM_LIBRARY}") ++ ++install(TARGETS common encoders LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++install(TARGETS libcamera-still libcamera-vid libcamera-hello libcamera-raw libcamera-jpeg RUNTIME DESTINATION bin) +-- +2.30.0 +
package/libcamera-apps/0009-cmake-no-need-to-link-against-ipa_rpi.so.patch new file +59 -0
59 lines not on this page · raw message
package/libcamera-apps/0010-circular_output-fix-size_t-vs.-unsigned-int-narrowin.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 582893855cf628edff6726a987b2b8478061824a Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Sat, 30 Jan 2021 18:55:23 +0100 +Subject: [PATCH] circular_output: fix size_t vs. unsigned int narrowing + conversion +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/circular_output.cpp: In member function ?virtual void CircularOutput::outputBuffer(void*, size_t, int64_t, uint32_t)?: + .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/circular_output.cpp:72:62: warning: narrowing conversion of ?size? from ?size_t {aka long unsigned int}? to ?unsigned int? inside { } [-Wnarrowing] + Header header = { size, flags & FLAG_KEYFRAME, timestamp_us }; + ^ + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + circular_output.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/circular_output.cpp b/circular_output.cpp +index e00b6b1..cbbfc3c 100644 +--- a/circular_output.cpp ++++ b/circular_output.cpp +@@ -69,7 +69,7 @@ void CircularOutput::outputBuffer(void *mem, size_t size, int64_t timestamp_us, + cb_.Read([&dst](void *src, int n) { memcpy(dst, src, n); dst += n; }, sizeof(header)); + cb_.Skip((header.length + ALIGN - 1) & ~(ALIGN - 1)); + } +- Header header = { size, flags & FLAG_KEYFRAME, timestamp_us }; ++ Header header = { static_cast<unsigned int>(size), flags & FLAG_KEYFRAME, timestamp_us }; + cb_.Write(&header, sizeof(header)); + cb_.Write(mem, size); + cb_.Pad(pad); +-- +2.30.0 +
package/libcamera-apps/0011-egl_preview-fix-XVisualInfo-initializer.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 7a6ff03ac689243741390ff7e6c1377d58070740 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Sat, 30 Jan 2021 19:06:59 +0100 +Subject: [PATCH] egl_preview: fix XVisualInfo initializer +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/egl_preview.cpp: In member function ?void EglPreview::makeWindow(const char*)?: + .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/egl_preview.cpp:219:65: sorry, unimplemented: non-trivial designated initializers not supported + XVisualInfo visTemplate = { .visualid = (long unsigned int)vid }; + ^ + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + egl_preview.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/egl_preview.cpp b/egl_preview.cpp +index 5b2c64b..9dd3652 100644 +--- a/egl_preview.cpp ++++ b/egl_preview.cpp +@@ -216,7 +216,8 @@ void EglPreview::makeWindow(char const *name) + if (!eglGetConfigAttrib(egl_display_, config, EGL_NATIVE_VISUAL_ID, &vid)) + throw std::runtime_error("eglGetConfigAttrib() failed\n"); + +- XVisualInfo visTemplate = { .visualid = (long unsigned int)vid }; ++ XVisualInfo visTemplate = {}; ++ visTemplate.visualid = (VisualID)vid; + int num_visuals; + XVisualInfo *visinfo = XGetVisualInfo(display_, VisualIDMask, + &visTemplate, &num_visuals); +-- +2.30.0 +
package/libcamera-apps/0012-jpeg-fix-long-unsigned-int-vs.-size_t-mismatch.patch new file +109 -0
109 lines not on this page · raw message
package/libcamera-apps/0013-jpeg-fix-bool-vs.-boolean-mismatch.patch new file +36 -0
@@ -0,0 +1,36 @@ +From cf01195301f07831d3b15d722eca5a045c4e6a50 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 3 Feb 2021 23:48:12 +0100 +Subject: [PATCH] jpeg: fix bool vs. boolean mismatch +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/mjpeg_encoder.cpp:57:22: error: cannot convert ?bool? to ?boolean? in assignment + 57 | cinfo.raw_data_in = true; + | ^~~~ + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + jpeg.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/jpeg.cpp b/jpeg.cpp +index 43a6496..a8fb792 100644 +--- a/jpeg.cpp ++++ b/jpeg.cpp +@@ -325,7 +325,7 @@ static void YUV420_to_JPEG_fast(const uint8_t *input, + cinfo.restart_interval = restart; + + jpeg_set_defaults(&cinfo); +- cinfo.raw_data_in = true; ++ cinfo.raw_data_in = TRUE; + jpeg_set_quality(&cinfo, quality, TRUE); + jpeg_buffer = NULL; + jpeg_len = 0; +-- +2.30.0 +
package/libcamera-apps/0014-mjpeg_encoder-fix-long-unsigned-int-vs.-size_t-misma.patch new file +89 -0
89 lines not on this page · raw message
package/libcamera-apps/0015-mjpeg_encoder-fix-bool-vs.-boolean-mismatch.patch new file +37 -0
@@ -0,0 +1,37 @@ +From cc365cdc48fcb29ab15051c5042921aad1a86382 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 3 Feb 2021 23:52:40 +0100 +Subject: [PATCH] mjpeg_encoder: fix bool vs. boolean mismatch +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes: + + .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/mjpeg_encoder.cpp:57:22: error: cannot convert ?bool? to ?boolean? in assignment + 57 | cinfo.raw_data_in = true; + | ^~~~ + compilation terminated due to -Wfatal-errors. + +Upstream: https://github.com/raspberrypi/libcamera-apps/pull/1 +Signed-off-by: Peter Seiderer <[email protected]> +--- + mjpeg_encoder.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mjpeg_encoder.cpp b/mjpeg_encoder.cpp +index 74b177b..caabd52 100644 +--- a/mjpeg_encoder.cpp ++++ b/mjpeg_encoder.cpp +@@ -60,7 +60,7 @@ void MjpegEncoder::encodeJPEG(struct jpeg_compress_struct &cinfo, EncodeItem &it + cinfo.restart_interval = 0; + + jpeg_set_defaults(&cinfo); +- cinfo.raw_data_in = true; ++ cinfo.raw_data_in = TRUE; + jpeg_set_quality(&cinfo, options_.quality, TRUE); + encoded_buffer = nullptr; + buffer_len = 0; +-- +2.30.0 +
package/libcamera-apps/Config.in new file +31 -0
@@ -0,0 +1,31 @@ +config BR2_PACKAGE_LIBCAMERA_APPS + bool "libcamera-apps" + depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera + depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost + depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera + depends on !BR2_STATIC_LIBS # gnutls/libcamera + depends on BR2_USE_WCHAR # gnutls/libcamera/boost + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBCAMERA + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBEPOXY + select BR2_PACKAGE_LIBEXIF + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_TIFF + select BR2_PACKAGE_XLIB_LIBX11 + help + This is a small suite of libcamera-based apps that aim to copy + the functionality of the existing "raspicam" apps. + + https://github.com/raspberrypi/libcamera-apps + +comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7 and needs an OpenGL and/or OpenGL EGL backend" + depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR + depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
package/libcamera-apps/libcamera-apps.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed +sha256 403fef767aa9a90df2e0cf1a5956771edc55221c0838fca90668c47d6696146e libcamera-apps-3b3589cdb9cc0a58981333aef4b576f7c6ea9d18.tar.gz +sha256 36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a license.txt
package/libcamera-apps/libcamera-apps.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# libcamera-apps +# +################################################################################ + +LIBCAMERA_APPS_VERSION = 3b3589cdb9cc0a58981333aef4b576f7c6ea9d18 +LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,$(LIBCAMERA_APPS_VERSION)) +LIBCAMERA_APPS_LICENSE = BSD-2-Clause +LIBCAMERA_APPS_LICENSE_FILES = license.txt +LIBCAMERA_APPS_DEPENDENCIES = \ + host-pkgconf \ + boost \ + jpeg \ + libcamera \ + libdrm \ + libexif \ + libepoxy \ + libpng \ + tiff \ + xlib_libX11 + +LIBCAMERA_APPS_CONF_OPTS = -DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled + +$(eval $(cmake-package))
Signature · 1 line
2.30.0