This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: GStreamer plugin issue

Part Number: AM5728

Tool/software: Linux

Hi all,

I want to do changes in v4l2 plugin. For that, i have successfully cross compiled gst-plugin-good-1.2.3 with am5728.

while running v4l2src pipeline gives error like below.

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.229419830  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 0
0:00:00.229677496  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 1
0:00:00.229813324  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 2
0:00:00.229966721  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 3
0:00:00.230091650  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 4
0:00:00.230216091  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 5
0:00:00.230337930  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 6
0:00:00.230459931  3984   0x129690 WARN                    v4l2 gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_qbuf:<v4l2bufferpool0> could not queue a buffer 7

Any solution for this problem?

Regards,

Prerak

 

  • Hi,

    The software team have been notified. They will respond here.
  • Hello,

    Are you see this with the compiled plugin?
    If yes, could you try to compile it by following this guide:
    processors.wiki.ti.com/.../Processor_SDK_Building_The_SDK
    (Check the below of this page and select the proper PSDK version that you are using )
    Or you see it with the default one in the SDK?

    BR
    Margartia

  • Hi Margarita,

    QUE: " Are you see this with the compiled plugin? "

    ANS: Earlier v4l2src plugin of gstremer works fine.

    There is no any source code available for gstv4l2src  in sdk. So for that, i have download gst-pluin-good-1.2.3( v4l2src ) and cross compiled with AM5728 with no any changes in source code.After that, while running pipeline gives error like mention above thread.

    BR
    Prerak

  • Hello,

    Have you tried with :
    MACHINE=am57xx-evm bitbake gstreamer1.0-plugins-good

    Check the guide in my previous post.
    In the guide you also could find information about how you could recompile the plugin after source code modification.

    BR
    Margarita
  • Hi Margarita,

    Thank you very much for your support.

    I  have success fully cross compiled gst-plugin-good.1.2.3 for am5728.

    I have question regarding ducatih264enc.

    What is maximum resolution supported by ducatih264enc?

    Thanks,

    Prerak

  • Hello,

    The h264 encoder supports:

    "resolution from 96x80 to 4352 x 4096. Encoder should be

    created with appropriate level – for example, Level 5.1 for 4096x2048."

    For more information you could check  the h264 encoder user guide under /ipumm/extrel/ti/ivahd_codecs/packages/ti/sdo/codecs/h264enc/docs folder.

    The ipumm folder is not present in the PSDK. You could use this guide for the ipumm:

    or use :

    MACHINE=am57xx-evm bitbake ipumm-fw (you should follow the guide for building SDK).

    Regarding the gsth264enc you could check here:

    BR

    Margarita

  • Hi Margarita,

    Thanks for your quick response.

    Output of my camera sensor is jpeg format.

    How can we configure v4l2src to take input as image/jpeg in Am5728 ?

     

    Regards,

    Prerak

  • Hello,

    Could you try:

    gst-launch-1.0 v4l2src device=/dev/videoX ! fakesink -v

    gst-launch-1.0 v4l2src device=/dev/videoX ! 'image/jpeg, .... ' ! fakesink -v

    There is an example for camera that delivers jpeg images(in this example I would recommend the jpegparse to be add before the decoder):
    gstreamer.freedesktop.org/.../gst-plugins-good-plugins-v4l2src.html

    I would also recommend to try your camera on PC with the gstreamer(v4l2) if this is possible.
    Just to verify that is working with the v4l2src on PC.

    BR
    Margarita
  • Hi Margarita,

    I have tried both.

    For AM5728 bord it does not works.

    I have tried it on my pc with camera sensor, It works fine.

    Regards,
    Prerak
  • Share the gstreamer pipeline you are using along with debug prints enable (--gst-debug-level=3)

  • Hi,

    1) GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video1 ! image/jpeg,width=1280,height=720,framerate=5/1! fakesink

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    0:00:00.093189619 1458 0x122630 WARN basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2865:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
    0:00:00.093410847 1458 0x122630 WARN basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2865:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4)
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason not-negotiated (-4)
    Execution ended after 0:00:00.007037021
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    2) GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video1 ! fakesink -v

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    0:00:00.121787805 1462 0x122490 ERROR v4l2 ../../../gst-plugins-good-1.2.3/sys/v4l2/gstv4l2bufferpool.c:537:gst_v4l2_buffer_pool_set_config:<v4l2bufferpool0> error requesting 4 buffers: Cannot allocate memory
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)100/1
    /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)100/1
    0:00:00.142349539 1462 0x122490 ERROR v4l2 ../../../gst-plugins-good-1.2.3/sys/v4l2/gstv4l2bufferpool.c:537:gst_v4l2_buffer_pool_set_config:<v4l2bufferpool0> error requesting 4 buffers: Cannot allocate memory
    0:00:00.162569507 1462 0x122490 ERROR v4l2 ../../../gst-plugins-good-1.2.3/sys/v4l2/gstv4l2bufferpool.c:537:gst_v4l2_buffer_pool_set_config:<v4l2bufferpool0> error requesting 4 buffers: Cannot allocate memory
    0:00:00.162782115 1462 0x122490 ERROR bufferpool ../../gstreamer-1.2.3/gst/gstbufferpool.c:485:gst_buffer_pool_set_active:<v4l2bufferpool0> pool was not configured
    0:00:00.162916153 1462 0x122490 ERROR basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2922:gst_base_src_set_allocation:<v4l2src0> failed to activate bufferpool.
    0:00:00.163070688 1462 0x122490 WARN basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2865:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
    0:00:00.163205702 1462 0x122490 WARN basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2865:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4)
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason not-negotiated (-4)
    Execution ended after 0:00:00.077501094
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    3) GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video1 ! jpegparse ! fakesink -v

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    0:00:00.123718511 1466 0x122490 ERROR v4l2 ../../../gst-plugins-good-1.2.3/sys/v4l2/gstv4l2bufferpool.c:537:gst_v4l2_buffer_pool_set_config:<v4l2bufferpool0> error requesting 4 buffers: Cannot allocate memory
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)100/1
    /GstPipeline:pipeline0/GstJpegParse:jpegparse0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)100/1
    0:00:00.144219082 1466 0x122490 ERROR v4l2 ../../../gst-plugins-good-1.2.3/sys/v4l2/gstv4l2bufferpool.c:537:gst_v4l2_buffer_pool_set_config:<v4l2bufferpool0> error requesting 4 buffers: Cannot allocate memory
    0:00:00.163795209 1466 0x122490 ERROR v4l2 ../../../gst-plugins-good-1.2.3/sys/v4l2/gstv4l2bufferpool.c:537:gst_v4l2_buffer_pool_set_config:<v4l2bufferpool0> error requesting 4 buffers: Cannot allocate memory
    0:00:00.164001635 1466 0x122490 ERROR bufferpool ../../gstreamer-1.2.3/gst/gstbufferpool.c:485:gst_buffer_pool_set_active:<v4l2bufferpool0> pool was not configured
    0:00:00.164134860 1466 0x122490 ERROR basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2922:gst_base_src_set_allocation:<v4l2src0> failed to activate bufferpool.
    0:00:00.164292486 1466 0x122490 WARN basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2865:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
    0:00:00.164422945 1466 0x122490 WARN basesrc ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c:2865:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason not-negotiated (-4)
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.2.3/libs/gst/base/gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason not-negotiated (-4)
    Execution ended after 0:00:00.075855543
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    Regards,

    Prerak
  • /dev/video1 is VIP interface. What is your requirement?
    1. Are you wanting VIP to do the compression.
    2. Is camera sending the jpeg compressed data and you wanting to bring that jpeg data through VIP interface?

    If your requirement is -
    #1. VIP cannot do jpeg compression. You will need to use ducatijpegenc plugin in the pipeline to encode
    #2. VIP driver will need modification to bring MJPEG compressed data in. You will need to treat the data as raw data format and follow the RAW format settings to modify the driver.
  • Hi Manisha,

    As my camera sensor gives JPEG data, VIP driver need to be modified.

    What are the changes need to be done in VIP driver to accept JPEG data ?

    Please do needful.

    Regards,

    Prerak

  • Please check this link to understand how  VIP can be used to bring in any data type not supported by it.  

    VIP receives the signal with VSYNC/VBLK and HSYNC/ACTVID signal combination. It could have received MJPEG from FPGA by programming the FPGA per VIP need. Getting MJPEG data through VIP interface through sensor board doesn't look possible in absence of  synced  HSYNC and VSYNC signal with MJPEG frame size. It will need care for variable frame size with MJPEG compressed data. 

  • Hi Margarita,

    I cant find steps to compile gst-plugin-ducati.

    Should  i follow the same steps as you suggested above or, there are some another guideline for that ?

    Regards,

    Prerak

  • Hi Manisha,

    we have Hsync and Vsync for JPEG frames from hardware.
    Hsync after 1280 pixels and Vsync after 720 lines.

    Regards,
    Prerak
  • Hi Prerak,

    VIP wiki page information has been enhanced to reflect the needed driver changes. Please refer to below link -

    http://processors.wiki.ti.com/index.php/Linux_Core_VIP_User's_Guide#Can_VIP_be_used_as_high_speed_interface_to_bring_any_data_in.3F

  • Hi Manisha/Margarita,

    Thanks for your support.

    I have done some changes in ducatijpegdec.

    Now everything works fine.

    Regards,

    Prerak