summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/recipes-graphics/opencv
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-02-06 11:26:56 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-03-05 03:22:02 +0000
commit0f4248d75dcb91a0cb351284d5a2daea6247d457 (patch)
treea5af38f02b621e9db49f9ba07d71ac69b3a4bc9e /meta-agl-bsp/recipes-graphics/opencv
parentbd5938866114aa399d77524c10eda1088c444c4d (diff)
Change opencv support max device number to 16
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>
Diffstat (limited to 'meta-agl-bsp/recipes-graphics/opencv')
-rw-r--r--meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch26
-rw-r--r--meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend5
2 files changed, 31 insertions, 0 deletions
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
index 000000000..fb574847a
--- /dev/null
+++ b/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch
@@ -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
index 000000000..8a68b0641
--- /dev/null
+++ b/meta-agl-bsp/recipes-graphics/opencv/opencv_3.3.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " \
+ file://0004-Change-Max-Device-Count-To-16.patch \
+ "
200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
import 'package:flutter_ics_homescreen/export.dart';
// import 'package:media_kit_video/media_kit_video.dart';

class HomeScreen extends ConsumerStatefulWidget {
  const HomeScreen({
    super.key,
  });

  @override
  HomeScreenState createState() => HomeScreenState();
}

class HomeScreenState extends ConsumerState<HomeScreen> {
  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    // player.dispose();
    super.dispose();
  }

  @override
  Widget build(
    BuildContext context,
  ) {
    return Consumer(builder: (context, ref, child) {
      final state = ref.read(appProvider);
      if (disableBkgAnimation) {
        print('Background animation: disabled');
      }
      return Scaffold(
        key: homeScaffoldKey,
        extendBody: true,
        extendBodyBehindAppBar: true,
        appBar: const CustomTopBar(),
        body: Stack(
          children: [
            if (!disableBkgAnimation)
              Lottie.asset(
                'animations/BG-dotwaveform.json',
                fit: BoxFit.cover,
                repeat: true,
              ),
            FlowBuilder<AppState>(
              state: ref.watch(appProvider),
              onGeneratePages: onGenerateAppViewPages,
              observers: [
                HeroController(),
              ],
            ),
            if (state != AppState.splash)
              Positioned(
                top: 0,
                bottom: 0,
                child: Container(
                    padding: const EdgeInsets.only(left: 8),
                    height: 500,
                    child: const VolumeFanControl()),
              ),
          ],
        ),
        bottomNavigationBar:
            state == AppState.splash ? null : const CustomBottomBar(),
      );
    });
  }
}