diff options
Diffstat (limited to 'recipes-core/libxcam')
-rw-r--r-- | recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch | 94 | ||||
-rw-r--r-- | recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch | 37 | ||||
-rw-r--r-- | recipes-core/libxcam/libxcam_1.5.0.bb (renamed from recipes-core/libxcam/libxcam_1.4.0.bb) | 17 |
3 files changed, 103 insertions, 45 deletions
diff --git a/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch b/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch new file mode 100644 index 00000000..f15d5cc7 --- /dev/null +++ b/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch | |||
@@ -0,0 +1,94 @@ | |||
1 | From d4c97b50b577ea16b9ff6d9a352ab474a119310e Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 18 May 2022 15:41:24 +0800 | ||
4 | Subject: [PATCH] fake_v4l2_device.h: fix narrowing warning | ||
5 | |||
6 | Use uint32_t instead of int for IOCTLs commands. | ||
7 | |||
8 | Warning log: | ||
9 | | ../../../git/xcore/fake_v4l2_device.h: In member function 'virtual int XCam::FakeV4l2Device::io_control(int, void*)': | ||
10 | | ../../../git/xcore/fake_v4l2_device.h:42:14: error: narrowing conversion of '3225441794' from 'long unsigned int' to 'int' [-Wnarrowing] | ||
11 | | 42 | case VIDIOC_ENUM_FMT: | ||
12 | | | ^~~~~~~~~~~~~~~ | ||
13 | | make[4]: *** [Makefile:685: libgstxcamsrc_la-gstxcamsrc.lo] Error 1 | ||
14 | |||
15 | Issue: https://github.com/intel/libxcam/issues/801 | ||
16 | Upstream-Status: Submitted [https://github.com/intel/libxcam/pull/802] | ||
17 | |||
18 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
19 | --- | ||
20 | xcore/base/xcam_common.h | 2 +- | ||
21 | xcore/fake_v4l2_device.h | 2 +- | ||
22 | xcore/v4l2_device.cpp | 2 +- | ||
23 | xcore/v4l2_device.h | 2 +- | ||
24 | xcore/xcam_common.cpp | 2 +- | ||
25 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
26 | |||
27 | diff --git a/xcore/base/xcam_common.h b/xcore/base/xcam_common.h | ||
28 | index 1f16e1e..4aa6cb9 100644 | ||
29 | --- a/xcore/base/xcam_common.h | ||
30 | +++ b/xcore/base/xcam_common.h | ||
31 | @@ -75,7 +75,7 @@ void xcam_free (void *ptr); | ||
32 | * return, 0 successfully | ||
33 | * else, check errno | ||
34 | */ | ||
35 | -int xcam_device_ioctl (int fd, int cmd, void *arg); | ||
36 | +int xcam_device_ioctl (int fd, uint32_t cmd, void *arg); | ||
37 | const char *xcam_fourcc_to_string (uint32_t fourcc); | ||
38 | |||
39 | void xcam_set_log (const char* file_name); | ||
40 | diff --git a/xcore/fake_v4l2_device.h b/xcore/fake_v4l2_device.h | ||
41 | index f679c19..e29787d 100644 | ||
42 | --- a/xcore/fake_v4l2_device.h | ||
43 | +++ b/xcore/fake_v4l2_device.h | ||
44 | @@ -33,7 +33,7 @@ public: | ||
45 | : V4l2Device ("/dev/null") | ||
46 | {} | ||
47 | |||
48 | - int io_control (int cmd, void *arg) | ||
49 | + int io_control (uint32_t cmd, void *arg) | ||
50 | { | ||
51 | XCAM_UNUSED (arg); | ||
52 | |||
53 | diff --git a/xcore/v4l2_device.cpp b/xcore/v4l2_device.cpp | ||
54 | index 395461e..66a8ac6 100644 | ||
55 | --- a/xcore/v4l2_device.cpp | ||
56 | +++ b/xcore/v4l2_device.cpp | ||
57 | @@ -185,7 +185,7 @@ V4l2Device::close () | ||
58 | } | ||
59 | |||
60 | int | ||
61 | -V4l2Device::io_control (int cmd, void *arg) | ||
62 | +V4l2Device::io_control (uint32_t cmd, void *arg) | ||
63 | |||
64 | { | ||
65 | if (_fd <= 0) | ||
66 | diff --git a/xcore/v4l2_device.h b/xcore/v4l2_device.h | ||
67 | index b4ad7ad..2551a92 100644 | ||
68 | --- a/xcore/v4l2_device.h | ||
69 | +++ b/xcore/v4l2_device.h | ||
70 | @@ -104,7 +104,7 @@ public: | ||
71 | XCamReturn queue_buffer (SmartPtr<V4l2Buffer> &buf); | ||
72 | |||
73 | // use as less as possible | ||
74 | - virtual int io_control (int cmd, void *arg); | ||
75 | + virtual int io_control (uint32_t cmd, void *arg); | ||
76 | |||
77 | protected: | ||
78 | |||
79 | diff --git a/xcore/xcam_common.cpp b/xcore/xcam_common.cpp | ||
80 | index 848884d..d4d5093 100644 | ||
81 | --- a/xcore/xcam_common.cpp | ||
82 | +++ b/xcore/xcam_common.cpp | ||
83 | @@ -53,7 +53,7 @@ void xcam_free(void *ptr) | ||
84 | free (ptr); | ||
85 | } | ||
86 | |||
87 | -int xcam_device_ioctl (int fd, int cmd, void *arg) | ||
88 | +int xcam_device_ioctl (int fd, uint32_t cmd, void *arg) | ||
89 | { | ||
90 | int ret = 0; | ||
91 | int tried_time = 0; | ||
92 | -- | ||
93 | 2.25.1 | ||
94 | |||
diff --git a/recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch b/recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch deleted file mode 100644 index 67db3e4c..00000000 --- a/recipes-core/libxcam/libxcam/0001-test-soft-image.cpp-fix-header-path.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 8f8a1d131a05aa1494825f0fae32580cbed680e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Thu, 25 Jun 2020 14:22:59 +0800 | ||
4 | Subject: [PATCH] test-soft-image.cpp: fix header path | ||
5 | |||
6 | throw compilation error: | ||
7 | | ../../git/tests/test-soft-image.cpp:31:10: fatal error: xcore/fisheye_dewarp.h: No such file or directory | ||
8 | | 31 | #include <xcore/fisheye_dewarp.h> | ||
9 | | | ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
10 | | compilation terminated. | ||
11 | |||
12 | TEST_BASE_CXXFLAGS already includes -I$(top_srcdir)/xcore | ||
13 | |||
14 | Ref: https://github.com/intel/libxcam/blob/1.4.0/tests/Makefile.am#L48 | ||
15 | |||
16 | Upstream-Status: Submitted [https://github.com/intel/libxcam/pull/734] | ||
17 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
18 | --- | ||
19 | tests/test-soft-image.cpp | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/tests/test-soft-image.cpp b/tests/test-soft-image.cpp | ||
23 | index a9e02d8..1c687e5 100644 | ||
24 | --- a/tests/test-soft-image.cpp | ||
25 | +++ b/tests/test-soft-image.cpp | ||
26 | @@ -28,7 +28,7 @@ | ||
27 | #include <interface/blender.h> | ||
28 | #include <interface/geo_mapper.h> | ||
29 | #include <interface/stitcher.h> | ||
30 | -#include <xcore/fisheye_dewarp.h> | ||
31 | +#include <fisheye_dewarp.h> | ||
32 | |||
33 | #define MAP_WIDTH 3 | ||
34 | #define MAP_HEIGHT 4 | ||
35 | -- | ||
36 | 2.17.1 | ||
37 | |||
diff --git a/recipes-core/libxcam/libxcam_1.4.0.bb b/recipes-core/libxcam/libxcam_1.5.0.bb index 987f94ee..31e9344b 100644 --- a/recipes-core/libxcam/libxcam_1.4.0.bb +++ b/recipes-core/libxcam/libxcam_1.5.0.bb | |||
@@ -7,11 +7,12 @@ SECTION = "lib" | |||
7 | inherit autotools pkgconfig | 7 | inherit autotools pkgconfig |
8 | 8 | ||
9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
10 | SRCREV = "e0d740f0706f7902d4f262b649d42b1b48c5e4e3" | 10 | SRCREV = "231a1d5243cd45c7a6b511b667f1ec52178fdda8" |
11 | SRC_URI = "git://github.com/intel/libxcam.git;branch=1.4.0; \ | 11 | SRC_URI = "git://github.com/intel/libxcam.git;branch=1.5.0;protocol=https \ |
12 | file://0001-test-soft-image.cpp-fix-header-path.patch" | 12 | file://0001-fake_v4l2_device.h-fix-narrowing-warning.patch \ |
13 | " | ||
13 | 14 | ||
14 | COMPATIBLE_HOST_libc-musl = "null" | 15 | COMPATIBLE_HOST:libc-musl = "null" |
15 | 16 | ||
16 | PACKAGECONFIG ??= " gst \ | 17 | PACKAGECONFIG ??= " gst \ |
17 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gles", "", d)} \ | 18 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gles", "", d)} \ |
@@ -27,12 +28,12 @@ PACKAGECONFIG[gles] = "--enable-gles, --disable-gles, virtual/mesa" | |||
27 | PACKAGECONFIG[vulkan] = "--enable-vulkan, --disable-vulkan, vulkan-loader virtual/mesa" | 28 | PACKAGECONFIG[vulkan] = "--enable-vulkan, --disable-vulkan, vulkan-loader virtual/mesa" |
28 | PACKAGECONFIG[dnn] = "--enable-dnn, --disable-dnn," | 29 | PACKAGECONFIG[dnn] = "--enable-dnn, --disable-dnn," |
29 | 30 | ||
30 | do_install_append () { | 31 | do_install:append () { |
31 | install -d ${D}${bindir}/libxcam | 32 | install -d ${D}${bindir}/libxcam |
32 | cp -r ${WORKDIR}/build/tests/.libs/* ${D}${bindir}/libxcam/ | 33 | cp -r ${WORKDIR}/build/tests/.libs/* ${D}${bindir}/libxcam/ |
33 | } | 34 | } |
34 | 35 | ||
35 | FILES_${PN} += "${libdir}/gstreamer-*/*.so" | 36 | FILES:${PN} += "${libdir}/gstreamer-*/*.so" |
36 | FILES_${PN}-test = "${bindir}/libxcam/*" | 37 | FILES:${PN}-test = "${bindir}/libxcam/*" |
37 | PACKAGES =+ "${PN}-test" | 38 | PACKAGES =+ "${PN}-test" |
38 | RDEPENDS_${PN}-test =+ "bash" | 39 | RDEPENDS:${PN}-test =+ "bash" |