On Wed, 10 Jun 2020, Farshid Monhaseri wrote: > Hello everybody, > I was testing v4l2 GStreamer plugins with AGL master(9.90.0), GStreamer 1.16.2 on imx6solo (automotive grade) and I noticed that some of the v4l2 GStreamer plugins which use the VPU (CODA 960) fail to load at runtime. > This happens when they loaded by GStreamer API by application (launched by AFM). When I call the "gst_element_factory_make" GStreamer function to load those plugins, the returned values are "NULL". > > First I thought it is because of SMACK, but when I checked the journal messages, no warning or notification though from SMACK but I want to be sure so I gave full access to my app at "/etc/smack/access.d/..." manually and recursively changed the GStreamer shared libraries to SMACK labels to "_" but the result was same. > Then I removed AGL dependences in my app and changed the Weston shell to "desktop-shell", I launch the app from the command line and it worked! ... all the v4l2 plugins loaded. Of course, the problem was not the Wayland shell, I test the app with "IVI-shell" too (without the app screen) and again the v4l2 GStreamer plugins loaded successfully. The plugins are loaded successfully with the GStreamer command-line tool "gst-launch-1.0" also. > > These plugins loaded anyway since they are general v4l2 GStreamer plugins: > v4l2src > v4l2sink > v4l2radio > The following plugins fail to load with AFM launch inside the app (GStreamer API): > v4l2h264enc > v4l2mpeg4enc > v4l2mpeg4dec > v4l2mpeg2dec > v4l2h264dec > > It seems something in AFM security infrastructure (Security-Manager or Cynorgia) is blocking the v4l2 hardware-accelerated GStreamer plugins which use the CODA 960 VPU. > First I would be appreciated if anyone can check the issue on his imx6 board, AGL 9.90.0, and GStreamer 1.16.2 (gstreamer-plugins-good) (if anyone) if not, Does anyone have any idea or hint about this issue? Weston and the AGL applications run as non-root, so in addition to SMACK labelling as '*', devices that they use need to have their group set as "display" to be usable. See the udev rules creation done by the weston-init recipe in: meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend or the rules file created by: meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtcompositor-conf_1.0.bb for examples. Scott -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8416): https://lists.automotivelinux.org/g/agl-dev-community/message/8416 Mute This Topic: https://lists.automotivelinux.org/mt/74791925/2167316 Mute #help: https://lists.automotivelinux.org/g/AutomotiveLinux+agl-dev-community/mutehashtag/help Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/883735764/xyzzy [list-automotive-discussions82@xxxxxxxxxxx] -=-=-=-=-=-=-=-=-=-=-=-