meta-digi: Add Edge TPU simple camera examples
This commit adds the Edge TPU simple camera examples to exercise the Google Coral devices with Digi Embedded Yocto. https://onedigi.atlassian.net/browse/DEL-7547 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
6316ec9cc5
commit
0c9a497de9
|
|
@ -0,0 +1,27 @@
|
||||||
|
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
Date: Mon, 28 Jun 2021 15:00:58 +0200
|
||||||
|
Subject: [PATCH] gstreamer: fix video sink for wayland images
|
||||||
|
|
||||||
|
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
|
---
|
||||||
|
gstreamer/gstreamer.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/gstreamer/gstreamer.py b/gstreamer/gstreamer.py
|
||||||
|
index 2676439..e055d77 100644
|
||||||
|
--- a/gstreamer/gstreamer.py
|
||||||
|
+++ b/gstreamer/gstreamer.py
|
||||||
|
@@ -249,11 +249,11 @@ def run_pipeline(user_function,
|
||||||
|
scale_caps = 'video/x-raw,width={width},height={height}'.format(width=scale[0], height=scale[1])
|
||||||
|
PIPELINE += """ ! tee name=t
|
||||||
|
t. ! {leaky_q} ! videoconvert ! videoscale ! {scale_caps} ! videobox name=box autocrop=true
|
||||||
|
! {sink_caps} ! {sink_element}
|
||||||
|
t. ! {leaky_q} ! videoconvert
|
||||||
|
- ! rsvgoverlay name=overlay ! videoconvert ! ximagesink sync=false
|
||||||
|
+ ! rsvgoverlay name=overlay ! videoconvert ! waylandsink sync=false
|
||||||
|
"""
|
||||||
|
|
||||||
|
SINK_ELEMENT = 'appsink name=appsink emit-signals=true max-buffers=1 drop=true'
|
||||||
|
SINK_CAPS = 'video/x-raw,format=RGB,width={width},height={height}'
|
||||||
|
LEAKY_Q = 'queue max-size-buffers=1 leaky=downstream'
|
||||||
|
--
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
SUMMARY = "Edge TPU simple camera examples"
|
||||||
|
HOMEPAGE = "https://coral.ai/examples"
|
||||||
|
LICENSE = "Apache-2.0"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||||
|
|
||||||
|
SRCREV = "19335531f599133e054ec2ddcc31733d24031ba5"
|
||||||
|
SRC_URI = "git://github.com/google-coral/examples-camera.git;protocol=https \
|
||||||
|
file://0001-gstreamer-fix-video-sink-for-wayland-images.patch \
|
||||||
|
"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit gobject-introspection
|
||||||
|
|
||||||
|
RDEPENDS_${PN} = "python3-pycoral \
|
||||||
|
gstreamer1.0-plugins-base \
|
||||||
|
"
|
||||||
|
|
||||||
|
do_configure() {
|
||||||
|
bash download_models.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
# Install Gstreamer examples
|
||||||
|
install -d ${D}/opt/libedgetpu
|
||||||
|
install -d ${D}/opt/libedgetpu/all_models
|
||||||
|
install -d ${D}/opt/libedgetpu/gstreamer
|
||||||
|
rm -f ${S}/gstreamer/install_requirements.sh
|
||||||
|
install -m 0555 ${S}/all_models/* ${D}/opt/libedgetpu/all_models/
|
||||||
|
install -m 0555 ${S}/gstreamer/* ${D}/opt/libedgetpu/gstreamer/
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN} += "/opt/libedgetpu/* \
|
||||||
|
"
|
||||||
Loading…
Reference in New Issue