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.

TMDSCM572X: GStreamer pipeline issue

Part Number: TMDSCM572X
Other Parts Discussed in Thread: AM5728

Hello,

EVM: Ti AM5728 evm

Kernel: 4.4.41

I use this pipeline to simple capture & display and is not working:

gst-launch-1.0  -v --gst-debug=2 v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! 'video/x-raw, \
format=(string)YUY2, width=(int)1280, height=(int)720' ! vpe num-input-buffers=8 ! queue ! kmssink

root@am57xx-evm:/# gst-launch-1.0 -v --gst-debug=2 v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! 'video/x-raw, \
format=(string)YUY2, width=(int)1280, height=(int)720' ! vpe num-input-buffers=8 ! queue ! kmssink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-m"
/GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)10"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction"
/GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fra"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fractio"
/GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-"
0:00:00.288726988 2332 0x143c30 WARN v4l2bufferpool gstv4l2bufferpool.c:749:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
/GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)10"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction"
/GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fra"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fractio"
0:00:00.436926081 2332 0x143c30 WARN vpe gstvpebufferpool.c:462:gst_vpe_buffer_pool_import: Allocating a new input buffer index: 0/128, 0
0:00:00.447965780 2332 0x144030 WARN bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
0:00:00.458225004 2332 0x144030 WARN bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
0:00:00.460187252 2332 0x143c30 WARN vpe gstvpebufferpool.c:462:gst_vpe_buffer_pool_import: Allocating a new input buffer index: 1/128, 0
0:00:00.468431198 2332 0x144030 WARN bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
0:00:00.470062745 2332 0x144000 WARN kmssink gstkmssink.c:364:gst_kms_sink_show_frame:<kmssink0> error: drmModeSetPlane failed: Permission denied (13)
ERROR: from element /GstPipeline:pipeline0/GstKMSSink:kmssink0: GStreamer encountered a general resource error.
Additional debug info:
../../../git/sys/kms/gstkmssink.c(364): gst_kms_sink_show_frame (): /GstPipeline:pipeline0/GstKMSSink:kmssink0:
drmModeSetPlane failed: Permission denied (13)
0:00:00.478578996 2332 0x144030 WARN bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
Execution ended after 0:00:00.385884047
Setting pipeline to PAUSED ...
0:00:00.664821267 2332 0x143c30 WARN vpe gstvpebufferpool.c:462:gst_vpe_buffer_pool_import: Allocating a new input buffer index: 2/128, 0
0:00:00.667199291 2332 0x143c30 WARN v4l2src gstv4l2src.c:827:gst_v4l2src_create:<v4l2src0> lost frames detected: count = 1 - ts: 0:00:00.263099244
Setting pipeline to READY ...
0:00:00.676525784 2332 0x1465a0 WARN bufferpool gstbufferpool.c:537:gst_buffer_pool_set_active:<vpebufferpool1> stop failed
0:00:00.681577723 2332 0x1465a0 WARN bufferpool gstbufferpool.c:537:gst_buffer_pool_set_active:<vpebufferpool1> stop failed
Setting pipeline to NULL ...
Freeing pipeline ...
root@am57xx-evm:/#

BR,

Faiez :)

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

    Please could you try first to stop Weston and then execute the pipeline. Here is the command:
    /etc/init.d/weston stop


    BR
    Margarita

  • Part Number: TMDSCM572X

    Hi, 

    EVM: Ti AM5728 evm,

    Kernel: 4.4.41

    device: Camera module

    The pipeline works at the beginning but if I run it one more time it does not work, here is the error:

    root@am57xx-evm:~# gst-launch-1.0 -v --gst-debug=2 v4l2src device=/dev/video1 num-buffers=900 io-mode=4 ! 'video/x-raw, \
    format=(string)YUY2, width=(int)1280, height=(int)720' ! vpe num-input-buffers=8 ! queue ! kmssink


    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-m"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)10"
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction"
    /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fra"
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fractio"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-"
    0:00:00.119408557 1245 0x143fb0 ------------[ cut here ]------------
    1mWARN v4l2bufferpool gstv4l2bufferpool.c:749:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
    [ 363.666490] WARNING: CPU: 1 PID: 1248 at /home/gtbldadm/processor-sdk-linux-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work-shared/am57xx-evm/kernel-source/drivers/media/v4l2-core)
    [ 363.705958] Modules linked in: bc_example(O) xhci_plat_hcd xhci_hcd usbcore rpmsg_proto rpmsg_rpc rpmsg_pru dwc3 udc_core virtio_rpmsg_bus cbc drbg xfrm_user xfrm4_tunnel ipcomp xfrm_ipcomp esp4 ah4 af)
    [ 363.776927] CPU: 0 PID: 1248 Comm: v4l2src0:src Tainted: G O 4.4.41-gf9f6f0db2d #1
    [ 363.785664] Hardware name: Generic DRA74X (Flattened Device Tree)
    [ 363.791781] Backtrace:
    [ 363.794256] [<c00130f8>] (dump_backtrace) from [<c00132f4>] (show_stack+0x18/0x1c)
    [ 363.801855] r7:c04a81bc r6:60010013 r5:00000000 r4:c0964e4c
    [ 363.807580] [<c00132dc>] (show_stack) from [<c02b46ac>] (dump_stack+0x8c/0xa0)
    [ 363.814839] [<c02b4620>] (dump_stack) from [<c0034a1c>] (warn_slowpath_common+0x88/0xb8)
    [ 363.822961] r7:c04a81bc r6:00000523 r5:00000009 r4:00000000
    [ 363.828681] [<c0034994>] (warn_slowpath_common) from [<c0034af0>] (warn_slowpath_null+0x24/0x2c)
    [ 363.837501] r8:c097f9d4 r7:ffffff87 r6:ede5387c r5:ede53ad0 r4:ede539d8
    [ 363.844275] [<c0034acc>] (warn_slowpath_null) from [<c04a81bc>] (vb2_start_streaming+0xe0/0x15c)
    [ 363.853100] [<c04a80dc>] (vb2_start_streaming) from [<c04a9dc8>] (vb2_core_streamon+0x114/0x160)
    [ 363.861920] r7:c049486c r6:ed9f2c00 r5:ed8d9480 r4:ede5387c
    [ 363.867638] [<c04a9cb4>] (vb2_core_streamon) from [<c04abc18>] (vb2_streamon+0x38/0x58)
    [ 363.875672] r5:ed8d9480 r4:00000001
    [ 363.879277] [<c04abbe0>] (vb2_streamon) from [<c04abc7c>] (vb2_ioctl_streamon+0x44/0x48)
    [ 363.887405] [<c04abc38>] (vb2_ioctl_streamon) from [<c0494890>] (v4l_streamon+0x24/0x28)
    [ 363.895527] r5:40045612 r4:c04abc38
    [ 363.899134] [<c049486c>] (v4l_streamon) from [<c04986d8>] (__video_do_ioctl+0x2c0/0x334)
    [ 363.907256] r5:40045612 r4:00000001
    [ 363.910862] [<c0498418>] (__video_do_ioctl) from [<c049810c>] (video_usercopy+0x1d4/0x4c4)
    [ 363.919159] r10:00000001 r9:00148594 r8:ed931e30 r7:00000000 r6:00000004 r5:00000004
    [ 363.927059] r4:40045612
    [ 363.929610] [<c0497f38>] (video_usercopy) from [<c0498414>] (video_ioctl2+0x18/0x1c)
    [ 363.937383] r10:00000000 r9:ed930000 r8:edf7a0cc r7:00148594 r6:40045612 r5:ed8d9480
    [ 363.945285] r4:ed9f2c00
    [ 363.947838] [<c04983fc>] (video_ioctl2) from [<c0493374>] (v4l2_ioctl+0xa8/0xe0)
    [ 363.955270] [<c04932cc>] (v4l2_ioctl) from [<c0130b28>] (do_vfs_ioctl+0x3f0/0x614)
    [ 363.962869] r9:ed930000 r8:00148594 r7:0000000b r6:ed8d9480 r5:ed964958 r4:00148594
    [ 363.970686] [<c0130738>] (do_vfs_ioctl) from [<c0130d88>] (SyS_ioctl+0x3c/0x64)
    [ 363.978023] r10:00000000 r9:ed930000 r8:00148594 r7:40045612 r6:ed8d9480 r5:0000000b
    [ 363.985919] r4:ed8d9481
    [ 363.988472] [<c0130d4c>] (SyS_ioctl) from [<c000fa20>] (ret_fast_syscall+0x0/0x34)
    [ 363.996070] r9:ed930000 r8:c000fbc4 r7:00000036 r6:b6ab23c8 r5:b5410118 r4:00000000
    [ 364.004738] ---[ end trace a015a1d9c04fca05 ]---
    0:00:00.645080366 1245 0x143fb0 ERROR v4l2bufferpool gstv4l2bufferpool.c:636:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool:src> error with STREAMON 121 (Remote I/O error)
    0:00:00.645298014 1245 0x143fb0 WARN v4l2bufferpool gstv4l2bufferpool.c:1055:gst_v4l2_buffer_pool_poll:<v4l2src0> error: poll error 1: Remote I/O error (121)
    0:00:00.645492075 1245 0x143fb0 WARN v4l2src gstv4l2src.c:848:gst_v4l2src_create:<v4l2src0> error: Failed to allocate a buffer
    0:00:00.645616678 1245 0x143fb0 WARN basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
    0:00:00.645653115 1245 0x143fb0 WARN basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason error (-5)
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not read from resource.
    Additional debug info:
    ../../../gst-plugins-good-1.6.3/sys/v4l2/gstv4l2bufferpool.c(1055): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    poll error 1: Remote I/O error (121)
    Execution ended after 0:00:00.538923775
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    0:00:00.650564510 1245 0x1593a0 WARN v4l2bufferpool gstv4l2bufferpool.c:913:gst_v4l2_buffer_pool_stop:<v4l2src0:pool:src> some buffers are still outstanding
    0:00:00.650606315 1245 0x1593a0 WARN bufferpool gstbufferpool.c:537:gst_buffer_pool_set_active:<v4l2src0:pool:src> stop failed

    (gst-launch-1.0:1245): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#

    Best regards :)

    Faiez,

  • Hello,

    Could you post me what exactly you are running and what you are trying to archive?



    BR
    Margarita

  • Hello,

    It was a simple Capture and Display Fullscreen using Ti AM5728 evm camera module and i use this pipeline:

    root@am57xx-evm:~# gst-launch-1.0 -v --gst-debug=2 v4l2src device=/dev/video1 num-buffers=900 io-mode=4 ! 'video/x-raw, \
    format=(string)YUY2, width=(int)1280, height=(int)720' ! vpe num-input-buffers=8 ! queue ! kmssink

    In fact, the pipeline works at the beginning but if I run it one more time it does not work.

    Best regards :)
    Faiez,

  • Hello Faiez,

    I am sorry I can not understand the use case.

    1. First case:
    You are running this pipeline

    gst-launch-1.0 -v --gst-debug=2 v4l2src device=/dev/video1 num-buffers=900 io-mode=4 ! 'video/x-raw, \
    format=(string)YUY2, width=(int)1280, height=(int)720' ! vpe num-input-buffers=8 ! queue ! kmssink

    after 900 frames the pipeline receiving EOS and it is moved to Stop State. After that you are running it for second time and then you are observing the error in your post?

    or

    2. You are running the pipeline and before the execution of the first pipeline is finished you are running it again(simultaneously running two pipelines for capture->kmssink display)? If this is the case, it will not work.

    BR
    Margarita
  • It would be better if you share with me the full console log so I could check what you are executing in the console(the use case)not only the pipeline with the error.

    BR
    Margarita
  • Hello, 

    1. After the execution of the pipeline it is ended by itself (After 900 frames), after that i'm running it (the same pipeline) for second time and then i'm observing the error in my post (and it was always like that),

    2. The use case it was a simple Capture and Display Fullscreen using Ti AM5728 evm camera module.

    Best regards :)

    Faiez,

  • Hello,

    Please share the full console log.

    Could you try when the first pipeline ends to run not the gstreamer pipeline run this instead of gstreamer:
    yavta -c60 -fYUYV -Fvout_1280x720_yuyv.yuv -s1280x720 /dev/video1
    Here is the wiki how you could run this example:
    processors.wiki.ti.com/.../Linux_Core_VIP_User's_Guide

    Could you execute this command after the first pipeline ends :
    ls /dev/video*

    Could you add -e to the pipeline also:
    gst-launch-1.0 -v --gst-debug=2 -e v4l2src device=/dev/video1 num-buffers=900 io-mode=4 ! ....

    BR
    Margarita
  • Hello,

    Also i need to know the default frame rate of the camera module.

    Best regards :)
    Faiez,