diff options
Diffstat (limited to 'recipes-core/libxcam')
-rw-r--r-- | recipes-core/libxcam/files/0001-modules-vulkan-point-to-correct-location-of-spv-shad.patch | 30 | ||||
-rw-r--r-- | recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch | 94 | ||||
-rw-r--r-- | recipes-core/libxcam/libxcam_1.5.0.bb (renamed from recipes-core/libxcam/libxcam_1.2.2.bb) | 20 |
3 files changed, 108 insertions, 36 deletions
diff --git a/recipes-core/libxcam/files/0001-modules-vulkan-point-to-correct-location-of-spv-shad.patch b/recipes-core/libxcam/files/0001-modules-vulkan-point-to-correct-location-of-spv-shad.patch deleted file mode 100644 index 911d7aac..00000000 --- a/recipes-core/libxcam/files/0001-modules-vulkan-point-to-correct-location-of-spv-shad.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 99f7a588ee827e25a153ac066a4f80f13a86e10e Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Mon, 29 Jul 2019 12:27:19 +0800 | ||
4 | Subject: [PATCH] modules/vulkan: point to correct location of spv shaders | ||
5 | |||
6 | They are not generated and are present in source directory. | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/intel/libxcam/pull/654] | ||
9 | |||
10 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
11 | --- | ||
12 | modules/vulkan/Makefile.am | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/modules/vulkan/Makefile.am b/modules/vulkan/Makefile.am | ||
16 | index 22763f0..56578ec 100644 | ||
17 | --- a/modules/vulkan/Makefile.am | ||
18 | +++ b/modules/vulkan/Makefile.am | ||
19 | @@ -5,7 +5,7 @@ XCAM_VK_CXXFLAGS = \ | ||
20 | $(LIBVULKAN_CFLAGS) \ | ||
21 | -I$(top_srcdir)/xcore \ | ||
22 | -I$(top_srcdir)/modules \ | ||
23 | - -I$(top_builddir)/shaders/spv \ | ||
24 | + -I$(top_srcdir)/shaders/spv \ | ||
25 | $(NULL) | ||
26 | |||
27 | XCAM_VK_LIBS = \ | ||
28 | -- | ||
29 | 2.7.4 | ||
30 | |||
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_1.2.2.bb b/recipes-core/libxcam/libxcam_1.5.0.bb index 80bef154..df459d72 100644 --- a/recipes-core/libxcam/libxcam_1.2.2.bb +++ b/recipes-core/libxcam/libxcam_1.5.0.bb | |||
@@ -7,12 +7,12 @@ SECTION = "lib" | |||
7 | inherit autotools pkgconfig | 7 | inherit autotools pkgconfig |
8 | 8 | ||
9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
10 | SRCREV = "28769ade4793006c8db9a1720359c310fa1e0d6a" | 10 | SRCREV = "231a1d5243cd45c7a6b511b667f1ec52178fdda8" |
11 | SRC_URI = "git://github.com/intel/libxcam.git;branch=1.2.2 \ | 11 | SRC_URI = "git://github.com/intel/libxcam.git;branch=1.5.0;protocol=https \ |
12 | file://0001-modules-vulkan-point-to-correct-location-of-spv-shad.patch \ | 12 | file://0001-fake_v4l2_device.h-fix-narrowing-warning.patch \ |
13 | " | 13 | " |
14 | 14 | ||
15 | COMPATIBLE_HOST_libc-musl = "null" | 15 | COMPATIBLE_HOST:libc-musl = "null" |
16 | 16 | ||
17 | PACKAGECONFIG ??= " gst \ | 17 | PACKAGECONFIG ??= " gst \ |
18 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gles", "", d)} \ | 18 | ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gles", "", d)} \ |
@@ -28,4 +28,12 @@ PACKAGECONFIG[gles] = "--enable-gles, --disable-gles, virtual/mesa" | |||
28 | PACKAGECONFIG[vulkan] = "--enable-vulkan, --disable-vulkan, vulkan-loader virtual/mesa" | 28 | PACKAGECONFIG[vulkan] = "--enable-vulkan, --disable-vulkan, vulkan-loader virtual/mesa" |
29 | PACKAGECONFIG[dnn] = "--enable-dnn, --disable-dnn," | 29 | PACKAGECONFIG[dnn] = "--enable-dnn, --disable-dnn," |
30 | 30 | ||
31 | FILES_${PN} += "${libdir}/gstreamer-*/*.so" | 31 | do_install:append () { |
32 | install -d ${D}${bindir}/libxcam | ||
33 | cp -r ${B}/tests/.libs/* ${D}${bindir}/libxcam/ | ||
34 | } | ||
35 | |||
36 | FILES:${PN} += "${libdir}/gstreamer-*/*.so" | ||
37 | FILES:${PN}-test = "${bindir}/libxcam/*" | ||
38 | PACKAGES =+ "${PN}-test" | ||
39 | RDEPENDS:${PN}-test =+ "bash" | ||