AnsweredAssumed Answered

Yocto GStreamer Video Problem [fsl-image-fb]

Question asked by Suman Ranjan on Apr 14, 2014
Latest reply on Jun 30, 2014 by Yixing Kong

Board : imx6sabresd quadcore board

Recipe : fsl-image-fb

 

Step 1: get the code

$ mkdir fsl-community-bsp

$ cd fsl-community-bsp

$ repo init -u http://github.com/Freescale/fsl-community-bsp-platform -b dora

$ mv .repo/manifest.xml .repo/manifest.orig #remove community manifest

$  cp <location>/fsl-yocto-release-manifest.xml .repo/manifest.xml #replace with freescale manifest.xml within Yocto Release

$ repo sync #sync the repo

$ cp -r sources/meta-fsl-bsp-release/imx/meta-fsl-arm/conf/machine sources/metafsl-arm/conf # This step copies the new machine configuration files into the meta-fsl-arm so that

# community setup can find new machine files.

Step 2: build it

$ MACHINE=imx6qsabresd source setup-environment build-fb

$ cd ..

$ source fsl-setup-release.sh -b build-fb -e fb

$ bitbake fsl-image-fb


Things build OK and graphics OpenGL/ES tests run fine on imx6sabresd board. However, GStreamer has a problem in this image. First of all, I see that only few GStreamer plugins are copied to filesystem rootfs, but many plugins are present in 'sysroot' folder. Why this is so ??


1. gst-inspect command shows very few plugins.

Total count: 4 plugins, 26 features

 

   When I checked in the "sysroot" of the build folder I found many plugins were present : ../fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib/gstreamer-0.10. I copied all plugins from sysroot folder  

   to rootfs folder ( /usr/lib/).

    After this gst-inspect shows many plugins.

Total count: 177 plugins (1 blacklist entry not shown), 594 features


After copying plugins from sysroot folder below tests pass.


a. .264 file is playing successfully.

gst-launch filesrc location=FVDO_Plane_4cif.264 typefind=true ! vpudec ! mfw_v4lsink


b. rtsp camera stream is decoded successfully.

gst-launch rtspsrc location=rtsp://10.20.1.48/axis-media/media.amp typefind=true !  gstrtpjitterbuffer ! rtph264depay queue-delay=0 ! capsfilter caps="video/x-h264,width=640,height=480,framerate=(fraction)30/1" ! vpudec low-latency=true ! queue max-size-buffers=0 max-size-time=0 ! mfw_v4lsink sync=false



2. Before copying plugins from sysroot 'aiurdemux' was not even present, but after copy 'aiurdemux' shows up in 'gst-inspect' command and throws following error.


# gst-inspect aiurdemux

  

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion `GST_IS_PAD_TEMPLATE (templ)' failed

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_pad_new_from_template: assertion `GST_IS_PAD_TEMPLATE (templ)' failed

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_pad_set_activate_function: assertion `GST_IS_PAD (pad)' failed

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_pad_set_activatepull_function: assertion `GST_IS_PAD (pad)' failed

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_pad_set_activatepush_function: assertion `GST_IS_PAD (pad)' failed

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_pad_set_chain_function: assertion `GST_IS_PAD (pad)' failed

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_pad_set_event_function: assertion `GST_IS_PAD (pad)' failed

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_element_add_pad: assertion `GST_IS_PAD (pad)' failed

 

(gst-inspect-0.10:666): GStreamer-CRITICAL **: gst_pad_set_setcaps_function: assertion `GST_IS_PAD (pad)' failed

Factory Details:

  Long name:    aiur universal demuxer

  Class:        Codec/Demuxer

  Description:  demux container file to video, audio, and subtitle

  Author(s):    Multimedia Team <shmmmw@freescale.com>

  Rank:         primary + 1 (257)

 

 

Plugin Details:

  Name:                 aiur.imx

  Description:          aiur universal demux/mux

  Filename:             /usr/lib/gstreamer-0.10/libmfw_gst_aiur_demux.so

  Version:              3.0.9

  License:              LGPL

  Source module:        gst-fsl-plugins

  Binary package:       Freescle Gstreamer Multimedia Plugins

  Origin URL:           http://www.freescale.com


3. MP4 video fails to play using GStreamer pipeline.

    gst-launch filesrc location=test.mp4 typefind=true ! aiurdemux ! vpudec ! mfw_v4lsink  

Logs:

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion `GST_IS_PAD_TEMPLATE (templ)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_pad_new_from_template: assertion `GST_IS_PAD_TEMPLATE (templ)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_pad_set_activate_function: assertion `GST_IS_PAD (pad)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_pad_set_activatepull_function: assertion `GST_IS_PAD (pad)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_pad_set_activatepush_function: assertion `GST_IS_PAD (pad)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_pad_set_chain_function: assertion `GST_IS_PAD (pad)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_pad_set_event_function: assertion `GST_IS_PAD (pad)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_element_add_pad: assertion `GST_IS_PAD (pad)' failed

(gst-launch-0.10:684): GStreamer-CRITICAL **: gst_pad_set_setcaps_function: assertion `GST_IS_PAD (pad)' failed

MFW_GST_V4LSINK_PLUGIN 3.0.9 build on Apr 11 2014 10:15:40.

WARNING: erroneous pipeline: could not link filesrc0 to aiurdemux0

 

4. I have another yocto setup with 'fsl-image-gui'. Running the same MP4 playback pipeline works fine. The difference I can make out is in the library version of 'aiurdemux' . 'fsl-image-gui' is using 3.0.5 and 'fsl-image-fb' is using 3.0.9 of 'aiurdemux'.

 

root@imx6qsabresd:/usr/lib/gstreamer-0.10# gst-inspect aiurdemux

Factory Details:

  Long name:    aiur universal demuxer

  Class:        Codec/Demuxer

  Description:  demux container file to video, audio, and subtitle

  Author(s):    Multimedia Team <shmmmw@freescale.com>

  Rank:         primary + 1 (257)

 

 

Plugin Details:

  Name:                 aiur.imx

  Description:          aiur universal demux/mux

  Filename:             /usr/lib/gstreamer-0.10/libmfw_gst_aiur_demux.so

  Version:              3.0.5

  License:              LGPL

  Source module:        gst-fsl-plugins

  Binary package:       Freescle Gstreamer Multimedia Plugins

  Origin URL:           http://www.freescale.com.

 

Questions:

1. Why most of the compiled plugins are present in 'sysroot' folder instead of '/usr/lib' folder ? Do you think that copying those plugins from 'sysroot' to rootfs may create any issue ? 'aiurdemux' is one thing that I see creating issue right now(after sysroot copy) and other pipelines e.g. RTSP and .264 file decoding works without any problem.

 

2. Has anyone tested 3.0.9 version of 'aiurdemux' on sabresd board with 'fsl-image-fb' recipe ?

 

3. How should I fix this issue ?

Outcomes