Open mirzak opened 4 years ago
In Mendel the way it's done is that introspection is explicitly disabled in the gstreamer imx package (https://coral.googlesource.com/imx-gst-plugins-base-debian/+/refs/heads/master/debian/rules#131) and then edgetpuvision has the appropriate dependency: https://coral.googlesource.com/edgetpuvision/+/refs/heads/release-day/debian/control#14
Thanks for the link and for confirming my suspicion :). This is not hard to solve but since there is no concept of gir
packages in Yocto it would be a hack at best. I guess this will go away for the 1.16 release of gstreamer-imx which do seem to have introspection enabled.
I have (mostly) enabled introspection, and the build of GstAllocators, with this patch:
diff --git a/meta-coral-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.b
bappend b/meta-coral-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bbap
pend
index bd11f4d..57e06fd 100644
--- a/meta-coral-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bbappend
+++ b/meta-coral-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.imx.bbappend
@@ -24,3 +24,20 @@ SRC_URI_append_coral-dev = " \
file://0016-fdmem-always-map-dmabuf-with-PROT_WRITE.patch \
file://0017-Tightly-pack-RGB-buffers-downloaded-from-GPU.patch \
"
+# enabling introspection requires additional dependencies on native packages
+DEPENDS += " \
+ qemu-native \
+ prelink-native \
+ gobject-introspection-native \
+ "
+
+# enable introspection
+EXTRA_OECONF_append = " --enable-introspection"
+
+# add extra lib paths, including allocators, which is needed for introspection
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs:${B}/gst-libs/gst/allocators/.libs"
+}
+
+# add the files generated by introspection
+FILES_${PN} += "${prefix}/share"
The only issue is the "export GIR_EXTRA_LIBS_PATH" do_compile prepend. That line in my patch is put first in the run_compile script, but immediately after it is the original "export GIR_EXTRA_LIBS_PATH" from the freescale bb recipe, overwriting my change. I have not found a way for the bbappend do_compile_prepend to be listed after the do_compile_prepend of the freescale bb recipe. I hacked around it by putting my "export GIR_EXTRA_LIBS_PATH" statement in the freescale bb.
I have (mostly) enabled introspection, and the build of GstAllocators, with this patch:
Maybe it is actually worth sending a patch towards meta-freescale to fix this.
The error typically manifests it self in something like this,
We can also clearly see that they are missing if we try to search for them:
The
GstGL
,GstVideo
andGstAllocators
are typically provided by the gstreamer1.0-plugins-base package.But we are using gstreamer1.0-plugins-base_1.14.imx which has disabled introspection due to an build error as can be seen here
Pretty much all the demo applications that relate to video streams provided by Coral rely on gstreamer introspection files.
I have looked at how this is built in Mendel OS, but it also has disabled introspection as can be seen here. So I think they only way this can work in Mendel OS is because introspection files are provided as separate package, gir1.2-gst-plugins-base-1.0.
So my conclusion is that the
typelib
files used in Mendel OS are not built from thegstreamer1.0-plugins-base_1.14.imx
and instead are using the upstream files of the same package.Need to figure out a workaround for this in Yocto.