Change opencv support max device number to 16 41/19941/11
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>
Wed, 6 Feb 2019 02:26:56 +0000 (11:26 +0900)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 5 Mar 2019 03:22:02 +0000 (03:22 +0000)
When using m3ulcb or h3ulcb with usb camera,
the board already had 10 video devices,
and opencv only support max device number is eight.
Need change to 16 so rcar can use usb camera with opencv.

[Patch Set 4]
    Change max device number to 16.
    Make this package specific to m3.

[Patch Set 5]
    Make this patch generic not only for m3.

Change-Id: Ice8b34f92addb8b8a4bcaf6db5491862a4545244
Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch [new file with mode: 0644]
meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend [new file with mode: 0644]

diff --git a/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch b/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch
new file mode 100644 (file)
index 0000000..fb57484
--- /dev/null
@@ -0,0 +1,26 @@
+diff --git a/modules/videoio/src/cap_libv4l.cpp b/modules/videoio/src/cap_libv4l.cpp
+index d82ad43..a3929a6 100644
+--- a/modules/videoio/src/cap_libv4l.cpp
++++ b/modules/videoio/src/cap_libv4l.cpp
+@@ -271,7 +271,7 @@ make & enjoy!
+ #define DEFAULT_V4L_HEIGHT 480
+
+ #define CHANNEL_NUMBER 1
+-#define MAX_CAMERAS 8
++#define MAX_CAMERAS 16
+
+
+ // default and maximum number of V4L buffers, not including last, 'special' buffer
+diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp
+index 37d93cd..6b4321c 100644
+--- a/modules/videoio/src/cap_v4l.cpp
++++ b/modules/videoio/src/cap_v4l.cpp
+@@ -241,7 +241,7 @@ make & enjoy!
+ #define DEFAULT_V4L_FPS 30
+
+ #define CHANNEL_NUMBER 1
+-#define MAX_CAMERAS 8
++#define MAX_CAMERAS 16
+
+
+ // default and maximum number of V4L buffers, not including last, 'special' buffer
diff --git a/meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend b/meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend
new file mode 100644 (file)
index 0000000..8a68b06
--- /dev/null
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+        file://0004-Change-Max-Device-Count-To-16.patch \
+        "