Freescale / gstreamer-imx

GStreamer 1.0 plugins for i.MX platforms
Other
184 stars 127 forks source link

i.MX8 support for gstreamer-imx #242

Closed tyama-zaki closed 3 years ago

tyama-zaki commented 5 years ago

I am trying to use gstreamer with i.MX8mmevk. When I created yocto image and tried to add gstreamer-imx, the following error occurred and the build failed.

Parsing recipes: 100% |##########################################| Time: 0:05:04 Parsing of 2562 .bb files complete (0 cached, 2562 parsed). 3483 targets, 223 skipped, 8 masked, 0 errors. NOTE: Resolving any missing task queue dependencies ERROR: Nothing RPROVIDES 'gstreamer1.0-plugins-imx' (but /data/imx-yocto-bsp/sources/meta-fsl-bsp-release/imx/meta-sdk/dynamic-layers/qt5-layer/recipes-fsl/images/fsl-image-qt5-validation-imx.bb RDEPENDS on or otherwise requires it) gstreamer1.0-plugins-imx was skipped: incompatible with machine imx8mmevk (not in COMPATIBLE_MACHINE) NOTE: Runtime target 'gstreamer1.0-plugins-imx' is unbuildable, removing... Missing or unbuildable dependency chain was: ['gstreamer1.0-plugins-imx'] ERROR: Required build target 'fsl-image-qt5-validation-imx' has no buildable providers. Missing or unbuildable dependency chain was: ['fsl-image-qt5-validation-imx', 'gstreamer1.0-plugins-imx']

So I realize can't build using gstreamer-imx with i.MX8mmevk.

Is there a way to use gstreamer-imx with i.MX8mmevk ?

Also, when will gstreamer1.0-plugins-imx_git.bb be compatible with i.MX8 ?

JustBenj commented 4 years ago

I am about to attempt this myself on an i.MX8mq. Not very experienced with Yocto, so I may be oversimplifying. I believe 'gstreamer1.0-plugins-imx_git.bb' needs to be modified in 3 ways:

  1. Fetch the source code from the V2 gstreamer-imx branch, which should be i.MX8 compatible based on the README
  2. Inherit meson to build instead of waf
  3. Add imx8 to COMPATIBLE_MACHINE

Steps 1 and 3 are easy enough, I think. I've never worked with meson before so step 2 might have further complications.

dv1 commented 4 years ago

Hello,

sorry for the silence. I am involved in a truckload of projects at the moment, which leaves me next to no free time.

meson is actually fairly easy to work with in Yocto. By inheriting from the meson bbclass, most of the work is already done.

As for V2 itself, what is currently holding back the merge to master & a new release is the matter of the V4L2 plugins & the IPU/PxP/G2D plugins. These are necessary for i.MX6 devices, but not for i.MX8 ones. However, since gstreamer-imx is intended to support both, these plugins cannot be omitted. Porting the old ones to V2 would work, though it would be a wasted opportunity to do a complete overhaul (in the V4L2 case, a rewrite of the plugin, in the 2D blitter case, an extraction of the IPU/PxP/G2D specific code to a separate library, just like what was done with libimxdmabuffer).

jobusch commented 4 years ago

I am about to attempt this myself on an i.MX8mq. Not very experienced with Yocto, so I may be oversimplifying. I believe 'gstreamer1.0-plugins-imx_git.bb' needs to be modified in 3 ways:

  1. Fetch the source code from the V2 gstreamer-imx branch, which should be i.MX8 compatible based on the README
  2. Inherit meson to build instead of waf
  3. Add imx8 to COMPATIBLE_MACHINE

Steps 1 and 3 are easy enough, I think. I've never worked with meson before so step 2 might have further complications.

Have you been successful with your try? :) We are working with the same model.

tyama-zaki commented 4 years ago

I'm sorry, my i.mx8 design was suspended in favor of another design. I hope that the process being discussed now is more advanced to the restart.

JustBenj commented 4 years ago

@jobusch I did get V2 to build and run on my i.MX8! Using the meta-freescale master branch, I was able to make the changes I described earlier. In the end the recipe looked like this: gstreamer1.0-plugins-imx_git.bb.txt

There might've been some build errors on the meta-freescale master, but I just worked through those one at a time until everything built.

Once I flashed my board with the new image, I did a gst-inspect-1.0 | grep imx and noticed that only the imxvpu decoders were installed. Are plugins such as the compositor and encoders still in development for v2? I'm primarily interested in using the compositor, because doing that function without hardware acceleration is not good.

jobusch commented 4 years ago

@jobusch I did get V2 to build and run on my i.MX8! Using the meta-freescale master branch, I was able to make the changes I described earlier. In the end the recipe looked like this: gstreamer1.0-plugins-imx_git.bb.txt

There might've been some build errors on the meta-freescale master, but I just worked through those one at a time until everything built.

Once I flashed my board with the new image, I did a gst-inspect-1.0 | grep imx and noticed that only the imxvpu decoders were installed. Are plugins such as the compositor and encoders still in development for v2? I'm primarily interested in using the compositor, because doing that function without hardware acceleration is not good.

Please correct me if I am wrong, but I am pretty sure sadly there is no hardware encoder on the i.MX8M.

dv1 commented 3 years ago

I finally managed to make a release. If you are still working on this, can you try again? If it doesn't work, feel free to reopen the issue.