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.

AM5728 using VPE and Ducati to encode 1080p30 video from USB camera

Other Parts Discussed in Thread: AM5728

Hello,

I have a couple of questions regarding the use of the VPE and Ducatih264enc elements together in Gstreamer on the AM5728 processor using the TI Processor SDK Linux distribution. I'm trying to generate a pipeline that pulls in raw video from a USB 3.0 camera, uses the VPE element to convert it from YUYV to NV12, and encodes it using the Ducati H264 hardware encoder. I'm having issues interfacing with the VPE element, specifically relating to DMA buffer allocation.

The kernel module appears to be loaded correctly, so my issue seems to be with my userspace implementation. My ultimate goal is to use the Appsrc with a camera that has a custom Api, but if I can get a pipeline working with V4l2src or Videotestsrc, that would help as well. Is there some documentation or sample code on allocating and sharing buffers between my source, VPE, and encoder properly?

My pipeline looks roughly like this
Source (v4l2/app/videotest) ! capsfilter YUYV 1920x1080@30p ! vpe ! capsfilter NV12 1920x1080@30p ! ducatih264enc ! h264parse ! rtph264pay ! udpsink

And the errors that this returns are generally related to the DMA buffer handling, so I believe that's where my problem lies. Depending on what options I pass to the VPE and the source, I get errors such as "basesrc internal data flow error,", "vpebufferpool alloc function failed", or "gstvpe this plugin does not support buffers not allocated by self"


I have not found any sample pipelines or code that use the VPE in conjunction with a raw video source and the Ducati encoder, so any info on that would be appreciated. Please let me know if you have any info that could help me solve my problem.

Thank you
Lucas 

  • Hi Lucas,

    I will forward this to our video experts.
  • Hi Lucas,

    Which version of PSDK are you trying? Here's one example gst pipeline of simultaneous encode decode. I tried it at my end using PSDK 2.2 and do not see any warnings or errors thrown. You will need weston running to run this example pipeline as this is using waylandsink.

    gst-launch-1.0 -v -e videotestsrc num-buffers=500 ! queue ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)22/1' ! queue ! ducatih264enc ! queue ! h264parse ! queue ! ducatih264dec ! queue ! waylandsink

     

  • I am using a distribution by Compulab, who makes the board I'm using, which is based on PSDK version 2.00.01. I'm not having issues with the encode or decode on its own. Rather, I'm having problems with the connection to VPE. I can run your example just fine (using a different sink since I'm using X without Weston), but as soon as I try to modify it to something like this is when I have issues:

    gst-launch-1.0 -v -e videotestsrc num-buffers=500 ! queue ! 'video/x-raw,format=(string)YUYV,width=(int)1920,height=(int)1080,framerate=(int)22/1' ! vpe ! 'video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)22/1' ! queue ! ducatih264enc ! queue ! h264parse ! queue ! ducatih264dec ! queue ! waylandsink

    So my question is more specifically related to putting VPE in the pipeline. Sorry if I was unclear

    Thanks

    Lucas

  • vpe plugin doesn't connect to every other gstreamer plugin due to the way it accepts buffer. It's only able to connect to ti provided hardware accelerated gstreamer plugin. The v4l2src warpper for vip was modified to be able to connect to vpe plugin. We plan to remove this restriction when we migrate to gstreamer version 1.6. Expect the changes to be incorporated in 3Q PSDK release.

    This example pipleline works well using capture from VIP on GP EVM-
    gst-launch-1.0 –v v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=30/1' ! queue ! vpe num-input-buffers=8 ! 'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720' ! ducatih264enc bitrate=4000 ! queue ! h264parse ! queue ! ducatih264dec ! queue ! vpe ! 'video/x-raw, format=(string)NV12, width=(int)800, height=(int)480' ! queue ! waylandsink
  • Thanks for the help Manisha, it has been very valuable so far.

    So if I'm able to use the VIP (which I am not yet able to with the version of board I am using), then the VPE should be compatible. I assume that doesn't apply to USB 3.0 V4L2 sources as well, correct? Is there no way to use VPE with different sources using manual buffer allocation in a C++ Gstreamer application?

    If neither of these is possible, do you have any other tips to help me encode 1080p@30fps using a different method? I'm running into processor limitations using videoconvert instead of vpe to convert YUYV into NV12, and I haven't found any ways to optimize it further. I tried to attached my code for reference, if it helps.

    Thank you 

    Lucas

    pixelink_test.cpp

  • Hi Lucas,

    Yes, once you use vip for video capture, you should be able to connect the VIP with VPE. Infact, VIP can do the YUYV capture format to NV12 conversion for you. USB3 v4l2src also will have problem. For USB3 v4l2src discussion, check the discussions here - e2e.ti.com/.../1908760

    Let me see if I can get the changes required at src plugin side to get it connected with vpe.

    Regards,
    Manisha
  • Hi Manisha

    Are there any updates on Gstreamer 1.6 or the plugin changes? I noticed PSDK 3.0 came out; does it contain the update, or will that still come at a later date?

    Thanks
    Lucas
  • Hi Lucas,

    Migration to gstreamer 1.6 is planned for PSDK 3.1 release scheduled end of 3Q, 2016. 

    Regards,

    Manisha

  • Hi Manisha,


    I'm working with Lucas to get the VPE plugin working with gstreamer  and was wondering if PSDK 3.1 is out yet, or if possible an early version of if with a new plugin available?

    Dave

  • PSDK 3.1 is expected to be released in next couple of days. In this release vpe plugin can work with other plugins that supports dmabuf.

  • Manisha,

    Thanks for the work on the PSDK update. I have been experimenting with building and using it over the past couple of weeks, and I'm still having issues. To show where I'm having trouble, I'm following the "Capture and Display Fullscreen" pipeline on the Multimedia Training page:

    Capture and Display Fullscreen
      target #  gst-launch-1.0 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

    But I get the following errors. I'll copy and paste the output with debug level 2, and attempt to attach the console output with debug level 4.

    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    0:00:00.644739255   809   0x170660 WARN          v4l2bufferpool gstv4l2bufferpool.c:1197:gst_v4l2_buffer_pool_dqbuf:<v4l2src0:pool:src> Driver should never set v4l2_buffer.field to ANY
    0:00:00.644852308   809   0x170660 WARN          v4l2bufferpool gstv4l2bufferpool.c:1949:gst_v4l2_buffer_pool_process:<v4l2src0:pool:src> Dropping corrupted buffer without payload
    0:00:00.644932665   809   0x170660 WARN          v4l2bufferpool gstv4l2bufferpool.c:1949:gst_v4l2_buffer_pool_process:<v4l2src0:pool:src> Dropping corrupted buffer without payload
    0:00:01.344712138   809   0x170660 WARN                     vpe gstvpebufferpool.c:607:gst_vpe_buffer_pool_import: Allocating a new input buffer index: 0/128, 0
    0:00:01.380326540   809   0x170660 ERROR                    vpe gstvpebufferpool.c:519:gst_vpe_buffer_pool_queue: vpebufferpool: QBUF failed: Bad address, index = 31
    0:00:01.380660820   809   0x170600 WARN              bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
    0:00:01.380838127   809   0x170660 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
    0:00:01.380882372   809   0x170660 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason error (-5)
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason error (-5)
    Execution ended after 0:00:01.175735469
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...

    0:00:00.000228710   818    0x2fc00 INFO                GST_INIT gst.c:511:init_pre: Initializing GStreamer Core Library version 1.8.3
    0:00:00.000426024   818    0x2fc00 INFO                GST_INIT gst.c:512:init_pre: Using library installed in /usr/lib/arm-linux-gnueabihf
    0:00:00.000474336   818    0x2fc00 INFO                GST_INIT gst.c:523:init_pre: Linux cl-som-am57x-sid 4.4.19-cl-som-am57x-ti-03.01.00.06-gdb0b54cdad #13 SMP PREEMPT Thu Oct 20 11:12:59 CDT 2016 armv7l
    0:00:00.001448222   818    0x2fc00 INFO                GST_INIT gstmessage.c:119:_priv_gst_message_initialize: init messages
    0:00:00.003510998   818    0x2fc00 INFO                GST_INIT gstcontext.c:83:_priv_gst_context_initialize: init contexts
    0:00:00.004649827   818    0x2fc00 INFO      GST_PLUGIN_LOADING gstplugin.c:316:_priv_gst_plugin_initialize: registering 0 static plugins
    0:00:00.005004440   818    0x2fc00 INFO      GST_PLUGIN_LOADING gstplugin.c:224:gst_plugin_register_static: registered static plugin "staticelements"
    0:00:00.005051126   818    0x2fc00 INFO      GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: added static plugin "staticelements", result: 1
    0:00:00.005144008   818    0x2fc00 INFO            GST_REGISTRY gstregistry.c:1723:ensure_current_registry: reading registry cache: /root/.cache/gstreamer-1.0/registry.arm.bin
    0:00:00.078719606   818    0x2fc00 INFO            GST_REGISTRY gstregistrybinary.c:619:priv_gst_registry_binary_read_cache: loaded /root/.cache/gstreamer-1.0/registry.arm.bin in 0.073511 seconds
    0:00:00.078970926   818    0x2fc00 INFO            GST_REGISTRY gstregistry.c:1579:scan_and_update_registry: Validating plugins from registry cache: /root/.cache/gstreamer-1.0/registry.arm.bin
    0:00:00.083681752   818    0x2fc00 INFO            GST_REGISTRY gstregistry.c:1681:scan_and_update_registry: Registry cache has not changed
    0:00:00.083736896   818    0x2fc00 INFO            GST_REGISTRY gstregistry.c:1758:ensure_current_registry: registry reading and updating done, result = 1
    0:00:00.083775448   818    0x2fc00 INFO                GST_INIT gst.c:724:init_post: GLib runtime version: 2.50.1
    0:00:00.083817254   818    0x2fc00 INFO                GST_INIT gst.c:726:init_post: GLib headers version: 2.48.1
    0:00:00.083855806   818    0x2fc00 INFO                GST_INIT gst.c:727:init_post: initialized GStreamer successfully
    0:00:00.084012454   818    0x2fc00 INFO            GST_PIPELINE gstparse.c:323:gst_parse_launch_full: parsing pipeline description 'v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! video/x-raw,format=YUY2,width=1280,height=720,framerate=30/1 ! vpe num-input-buffers=8 ! queue ! kmssink '
    0:00:00.195027736   818    0x2fc00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/gstreamer-1.0/libgstvideo4linux2.so" loaded
    0:00:00.195104352   818    0x2fc00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "v4l2src"
    0:00:00.197153464   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseSrc@0x1760a0> adding pad 'src'
    0:00:00.199707331   818    0x2fc00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/gstreamer-1.0/libgstvpe.so" loaded
    0:00:00.199763288   818    0x2fc00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "vpe"
    0:00:00.200306432   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstVpe@0x17b040> adding pad 'sink'
    0:00:00.200360925   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstVpe@0x17b040> adding pad 'src'
    0:00:00.201815165   818    0x2fc00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/gstreamer-1.0/libgstcoreelements.so" loaded
    0:00:00.201954083   818    0x2fc00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "queue"
    0:00:00.202357496   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstQueue@0x17e0e0> adding pad 'sink'
    0:00:00.202469736   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstQueue@0x17e0e0> adding pad 'src'
    0:00:00.203271357   818    0x2fc00 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/gstreamer-1.0/libgstkmssink.so" loaded
    0:00:00.203320483   818    0x2fc00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "kmssink"
    0:00:00.203703075   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseSink@0x1830f8> adding pad 'sink'
    0:00:00.203797259   818    0x2fc00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
    0:00:00.204056387   818    0x2fc00 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstV4l2Src named v4l2src0 to some pad of GstVpe named vpe0 (0/0) with caps "video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)30/1"
    0:00:00.204150245   818    0x2fc00 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "capsfilter"
    0:00:00.204452805   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x18a0b8> adding pad 'sink'
    0:00:00.204535440   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x18a0b8> adding pad 'src'
    0:00:00.204600181   818    0x2fc00 INFO              GST_STATES gstbin.c:1915:gst_bin_get_state_func:<pipeline0> getting state
    0:00:00.204669965   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to NULL
    0:00:00.204727061   818    0x2fc00 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
    0:00:00.204776024   818    0x2fc00 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element v4l2src0:(any) to element capsfilter0:sink
    0:00:00.204824987   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:sink
    0:00:00.204866467   818    0x2fc00 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: v4l2src0 and capsfilter0 in same bin, no need for ghost pads
    0:00:00.204927304   818    0x2fc00 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link v4l2src0:src and capsfilter0:sink
    0:00:00.205029784   818    0x2fc00 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<capsfilter0:src> pad has no peer
    0:00:00.205099080   818    0x2fc00 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked v4l2src0:src and capsfilter0:sink, successful
    0:00:00.205144789   818    0x2fc00 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
    0:00:00.205181715   818    0x2fc00 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<v4l2src0:src> Received event on flushing pad. Discarding
    0:00:00.205240763   818    0x2fc00 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element capsfilter0:src to element vpe0:(any)
    0:00:00.205285659   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:src
    0:00:00.205330392   818    0x2fc00 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link capsfilter0:src and vpe0:sink
    0:00:00.205441981   818    0x2fc00 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: capsfilter0 and vpe0 in same bin, no need for ghost pads
    0:00:00.205498101   818    0x2fc00 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter0:src and vpe0:sink
    0:00:00.205603509   818    0x2fc00 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter0:src and vpe0:sink, successful
    0:00:00.205648568   818    0x2fc00 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
    0:00:00.205684680   818    0x2fc00 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<capsfilter0:src> Received event on flushing pad. Discarding
    0:00:00.205742752   818    0x2fc00 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstVpe named vpe0 to some pad of GstQueue named queue0 (0/0) with caps "(NULL)"
    0:00:00.205798059   818    0x2fc00 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element vpe0:(any) to element queue0:(any)
    0:00:00.205846045   818    0x2fc00 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link vpe0:src and queue0:sink
    0:00:00.205915667   818    0x2fc00 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<queue0:src> pad has no peer
    0:00:00.205961376   818    0x2fc00 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: vpe0 and queue0 in same bin, no need for ghost pads
    0:00:00.206014893   818    0x2fc00 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link vpe0:src and queue0:sink
    0:00:00.206079960   818    0x2fc00 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<queue0:src> pad has no peer
    0:00:00.206124693   818    0x2fc00 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked vpe0:src and queue0:sink, successful
    0:00:00.206166499   818    0x2fc00 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
    0:00:00.206201635   818    0x2fc00 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<vpe0:src> Received event on flushing pad. Discarding
    0:00:00.206281504   818    0x2fc00 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstQueue named queue0 to some pad of GstKMSSink named kmssink0 (0/0) with caps "(NULL)"
    0:00:00.206342341   818    0x2fc00 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element queue0:(any) to element kmssink0:(any)
    0:00:00.206390979   818    0x2fc00 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link queue0:src and kmssink0:sink
    0:00:00.206495248   818    0x2fc00 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: queue0 and kmssink0 in same bin, no need for ghost pads
    0:00:00.206550880   818    0x2fc00 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link queue0:src and kmssink0:sink
    0:00:00.206630424   818    0x2fc00 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked queue0:src and kmssink0:sink, successful
    0:00:00.206673368   818    0x2fc00 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
    0:00:00.206708016   818    0x2fc00 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<queue0:src> Received event on flushing pad. Discarding
    Setting pipeline to PAUSED ...
    0:00:00.206892155   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<kmssink0> current NULL pending VOID_PENDING, desired next READY
    0:00:00.207136643   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<kmssink0> completed state change to READY
    0:00:00.207180400   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<kmssink0> notifying about state-changed NULL to READY (VOID_PENDING pending)
    0:00:00.207254901   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'kmssink0' changed state to 2(READY) successfully
    0:00:00.207313461   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<queue0> current NULL pending VOID_PENDING, desired next READY
    0:00:00.207358520   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<queue0> completed state change to READY
    0:00:00.207395283   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<queue0> notifying about state-changed NULL to READY (VOID_PENDING pending)
    0:00:00.207447987   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'queue0' changed state to 2(READY) successfully
    0:00:00.207500528   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<vpe0> current NULL pending VOID_PENDING, desired next READY
    0:00:00.207545749   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<vpe0> completed state change to READY
    0:00:00.207581211   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<vpe0> notifying about state-changed NULL to READY (VOID_PENDING pending)
    0:00:00.207632451   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'vpe0' changed state to 2(READY) successfully
    0:00:00.207709067   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current NULL pending VOID_PENDING, desired next READY
    0:00:00.207756565   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to READY
    0:00:00.207792189   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed NULL to READY (VOID_PENDING pending)
    0:00:00.207843755   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 2(READY) successfully
    0:00:00.207892392   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current NULL pending VOID_PENDING, desired next READY
    0:00:00.208189584   818    0x2fc00 INFO                    v4l2 v4l2_calls.c:587:gst_v4l2_open:<v4l2src0> Opened device 'UNITY' (/dev/video1) successfully
    0:00:00.208256115   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to READY
    0:00:00.208295805   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed NULL to READY (VOID_PENDING pending)
    0:00:00.208350461   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 2(READY) successfully
    0:00:00.208405443   818    0x2fc00 INFO              GST_STATES gstelement.c:2347:gst_element_continue_state:<pipeline0> committing state from NULL to READY, pending PAUSED, next PAUSED
    0:00:00.208449525   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed NULL to READY (PAUSED pending)
    0:00:00.208543221   818    0x2fc00 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<pipeline0> continue state change READY to PAUSED, final PAUSED
    0:00:00.208621139   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<kmssink0> current READY pending VOID_PENDING, desired next PAUSED
    0:00:00.208689459   818    0x2fc00 INFO              GST_STATES gstbin.c:2770:gst_bin_change_state_func:<pipeline0> child 'kmssink0' is changing state asynchronously to PAUSED
    0:00:00.208743301   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<queue0> current READY pending VOID_PENDING, desired next PAUSED
    0:00:00.208835696   818    0x2fc00 INFO                    task gsttask.c:451:gst_task_set_lock: setting stream lock 0x1785ac on task 0x18e028
    0:00:00.208879128   818    0x2fc00 INFO                GST_PADS gstpad.c:5980:gst_pad_start_task:<queue0:src> created task 0x18e028
    0:00:00.209099216   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<queue0> completed state change to PAUSED
    0:00:00.209151920   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<queue0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
    0:00:00.209216661   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'queue0' changed state to 3(PAUSED) successfully
    0:00:00.209306779   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<vpe0> current READY pending VOID_PENDING, desired next PAUSED
    0:00:00.209382419   818    0x2fc00 INFO                    task gsttask.c:451:gst_task_set_lock: setting stream lock 0x17830c on task 0x18e0d0
    0:00:00.209424875   818    0x2fc00 INFO                GST_PADS gstpad.c:5980:gst_pad_start_task:<vpe0:src> created task 0x18e0d0
    0:00:00.209575504   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<vpe0> completed state change to PAUSED
    0:00:00.209633088   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<vpe0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
    0:00:00.209695064   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'vpe0' changed state to 3(PAUSED) successfully
    0:00:00.209752811   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current READY pending VOID_PENDING, desired next PAUSED
    0:00:00.209815112   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to PAUSED
    0:00:00.209853176   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
    0:00:00.209906368   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 3(PAUSED) successfully
    0:00:00.209956469   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current READY pending VOID_PENDING, desired next PAUSED
    0:00:00.210016819   818    0x2fc00 INFO                 basesrc gstbasesrc.c:1344:gst_base_src_do_seek:<v4l2src0> seeking: time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
    0:00:00.210102056   818    0x2fc00 INFO                    task gsttask.c:451:gst_task_set_lock: setting stream lock 0x17806c on task 0x18e178
    0:00:00.210143699   818    0x2fc00 INFO                GST_PADS gstpad.c:5980:gst_pad_start_task:<v4l2src0:src> created task 0x18e178
    0:00:00.210282453   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to PAUSED
    0:00:00.210332229   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
    0:00:00.210395507   818    0x2fc00 INFO              GST_STATES gstbin.c:2807:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 3(PAUSED) successfully without preroll
    0:00:00.210429016   818   0x170660 INFO        GST_ELEMENT_PADS gstelement.c:904:gst_element_get_static_pad: no such pad 'sink' in element "v4l2src0"
    0:00:00.210459597   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to PAUSED
    0:00:00.210578181   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
    Pipeline is live and does not need PREROLL ...
    0:00:00.210849997   818   0x170660 INFO                    v4l2 gstv4l2object.c:1068:gst_v4l2_object_fill_format_list:<v4l2src0> got 1 format(s):
    0:00:00.210914901   818   0x170660 INFO                    v4l2 gstv4l2object.c:1074:gst_v4l2_object_fill_format_list:<v4l2src0>   YUYV
    Setting pipeline to PLAYING ...
    0:00:00.212458283   818    0x2fc00 INFO               GST_EVENT gstevent.c:1253:gst_event_new_latency: creating latency event 0:00:00.000000000
    0:00:00.212573613   818    0x2fc00 INFO                     bin gstbin.c:2593:gst_bin_do_latency_func:<pipeline0> configured latency of 0:00:00.000000000
    0:00:00.212660965   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<kmssink0> current READY pending PAUSED, desired next PLAYING
    0:00:00.212707976   818    0x2fc00 INFO              GST_STATES gstbin.c:2770:gst_bin_change_state_func:<pipeline0> child 'kmssink0' is changing state asynchronously to PLAYING
    0:00:00.212761656   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<queue0> current PAUSED pending VOID_PENDING, desired next PLAYING
    0:00:00.212809643   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<queue0> completed state change to PLAYING
    0:00:00.212847056   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<queue0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
    0:00:00.212901061   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'queue0' changed state to 4(PLAYING) successfully
    0:00:00.212956043   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<vpe0> current PAUSED pending VOID_PENDING, desired next PLAYING
    0:00:00.213002728   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<vpe0> completed state change to PLAYING
    0:00:00.213039653   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<vpe0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
    0:00:00.213091707   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'vpe0' changed state to 4(PLAYING) successfully
    0:00:00.213144411   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current PAUSED pending VOID_PENDING, desired next PLAYING
    0:00:00.213189795   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to PLAYING
    0:00:00.213226395   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
    0:00:00.213278936   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 4(PLAYING) successfully
    0:00:00.213336520   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to PLAYING
    0:00:00.213404677   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
    0:00:00.213459821   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 4(PLAYING) successfully
    New clock: GstSystemClock
    0:00:00.587001047   818   0x170660 INFO                    v4l2 gstv4l2object.c:3610:gst_v4l2_object_get_caps:<v4l2src0> probed caps: video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1, 9/2, 4/1, 7/2, 3/1, 5/2, 2/1, 3/2, 1/1 }; video/x-raw, format=(string)YUY2, width=(int)1600, height=(int)1200, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1, 9/2, 4/1, 7/2, 3/1, 5/2, 2/1, 3/2, 1/1 }; video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)960, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1, 9/2, 4/1, 7/2, 3/1, 5/2, 2/1, 3/2, 1/1 }; video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1, 9/2, 4/1, 7/2, 3/1, 5/2, 2/1, 3/2, 1/1 }; video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1, 9/2, 4/1, 7/2, 3/1, 5/2, 2/1, 3/2, 1/1 }
    0:00:00.639626967   818   0x170660 INFO                    v4l2 gstv4l2object.c:3221:gst_v4l2_object_set_format_full:<v4l2src0> Set framerate to 30/1
    0:00:00.639688455   818   0x170660 INFO                    v4l2 gstv4l2object.c:2594:gst_v4l2_object_setup_pool:<v4l2src0> accessing buffers via mode 4
    0:00:00.640217121   818   0x170660 INFO          v4l2bufferpool gstv4l2bufferpool.c:552:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 2
    0:00:00.640262831   818   0x170660 INFO          v4l2bufferpool gstv4l2bufferpool.c:565:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
    0:00:00.640324319   818   0x170660 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1
    0:00:00.640527815   818   0x170660 INFO           basetransform gstbasetransform.c:1367:gst_base_transform_setcaps:<capsfilter0> reuse caps
    0:00:00.640572548   818   0x170660 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1
    0:00:00.640838833   818   0x170660 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
    0:00:00.641330900   818   0x170660 INFO                     vpe gstvpe.c:731:gst_vpe_sink_setcaps:<vpe0> set caps done 1
    0:00:00.641705359   818   0x170660 INFO          v4l2bufferpool gstv4l2bufferpool.c:552:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> increasing minimum buffers to 2
    0:00:00.641779209   818   0x170660 INFO          v4l2bufferpool gstv4l2bufferpool.c:565:gst_v4l2_buffer_pool_set_config:<v4l2src0:pool:src> reducing maximum buffers to 32
    0:00:00.652269257   818   0x170660 WARN          v4l2bufferpool gstv4l2bufferpool.c:1197:gst_v4l2_buffer_pool_dqbuf:<v4l2src0:pool:src> Driver should never set v4l2_buffer.field to ANY
    0:00:00.652344572   818   0x170660 WARN          v4l2bufferpool gstv4l2bufferpool.c:1949:gst_v4l2_buffer_pool_process:<v4l2src0:pool:src> Dropping corrupted buffer without payload
    0:00:00.652418748   818   0x170660 WARN          v4l2bufferpool gstv4l2bufferpool.c:1949:gst_v4l2_buffer_pool_process:<v4l2src0:pool:src> Dropping corrupted buffer without payload
    0:00:01.328423999   818   0x170660 INFO                 v4l2src gstv4l2src.c:810:gst_v4l2src_create:<v4l2src0> sync to 0:00:00.033333333 out ts 0:00:00.581929222
    0:00:01.328664909   818   0x170660 INFO               GST_EVENT gstevent.c:760:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
    0:00:01.329188695   818   0x170660 INFO                 basesrc gstbasesrc.c:2843:gst_base_src_loop:<v4l2src0> marking pending DISCONT
    0:00:01.329718663   818   0x170660 INFO               GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
    0:00:01.330287834   818   0x170660 WARN                     vpe gstvpebufferpool.c:607:gst_vpe_buffer_pool_import: Allocating a new input buffer index: 0/128, 0
    0:00:01.365821554   818   0x170660 ERROR                    vpe gstvpebufferpool.c:519:gst_vpe_buffer_pool_queue: vpebufferpool: QBUF failed: Bad address, index = 31
    0:00:01.366181210   818   0x170600 WARN              bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
    0:00:01.366278973   818   0x170660 INFO                 basesrc gstbasesrc.c:2856:gst_base_src_loop:<v4l2src0> pausing after gst_pad_push() = error
    0:00:01.366371855   818   0x170660 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
    0:00:01.366432530   818   0x170660 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason error (-5)
    0:00:01.366505405   818   0x170660 INFO        GST_ERROR_SYSTEM gstelement.c:1879:gst_element_message_full:<v4l2src0> posting message: Internal data flow error.
    0:00:01.366629194   818   0x170660 INFO        GST_ERROR_SYSTEM gstelement.c:1902:gst_element_message_full:<v4l2src0> posted error message: Internal data flow error.
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason error (-5)
    Execution ended after 0:00:01.153371404
    Setting pipeline to PAUSED ...
    0:00:01.366912885   818   0x170660 INFO                    task gsttask.c:316:gst_task_func:<v4l2src0:src> Task going to paused
    0:00:01.366998122   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<kmssink0> current PAUSED pending VOID_PENDING, desired next PAUSED
    0:00:01.367089866   818    0x2fc00 INFO              GST_STATES gstbin.c:2433:gst_bin_element_set_state:<kmssink0> skipping transition from PAUSED to  PAUSED
    0:00:01.367134274   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'kmssink0' changed state to 3(PAUSED) successfully
    0:00:01.367191695   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<queue0> current PLAYING pending VOID_PENDING, desired next PAUSED
    0:00:01.367241634   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<queue0> completed state change to PAUSED
    0:00:01.367280999   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<queue0> notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending)
    0:00:01.367337282   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'queue0' changed state to 3(PAUSED) successfully
    0:00:01.367400071   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<vpe0> current PLAYING pending VOID_PENDING, desired next PAUSED
    0:00:01.367449034   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<vpe0> completed state change to PAUSED
    0:00:01.367489538   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<vpe0> notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending)
    0:00:01.367544357   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'vpe0' changed state to 3(PAUSED) successfully
    0:00:01.367599013   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current PLAYING pending VOID_PENDING, desired next PAUSED
    0:00:01.367645210   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to PAUSED
    0:00:01.367683111   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending)
    0:00:01.367736791   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 3(PAUSED) successfully
    0:00:01.367787543   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current PLAYING pending VOID_PENDING, desired next PAUSED
    0:00:01.367844802   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to PAUSED
    0:00:01.367882866   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed PLAYING to PAUSED (VOID_PENDING pending)
    0:00:01.367939962   818    0x2fc00 INFO              GST_STATES gstbin.c:2807:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 3(PAUSED) successfully without preroll
    0:00:01.367998359   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to PAUSED
    Setting pipeline to READY ...
    0:00:01.368141506   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<kmssink0> current PAUSED pending VOID_PENDING, desired next READY
    0:00:01.368250330   818   0x1705b0 INFO                    task gsttask.c:316:gst_task_func:<queue0:src> Task going to paused
    0:00:01.368288557   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<kmssink0> completed state change to READY
    0:00:01.368365823   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<kmssink0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
    0:00:01.368423733   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'kmssink0' changed state to 2(READY) successfully
    0:00:01.368484895   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<queue0> current PAUSED pending VOID_PENDING, desired next READY
    0:00:01.368561511   818   0x1705b0 INFO                    task gsttask.c:318:gst_task_func:<queue0:src> Task resume from paused
    0:00:01.368679119   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<queue0> completed state change to READY
    0:00:01.368721087   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<queue0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
    0:00:01.368776069   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'queue0' changed state to 2(READY) successfully
    0:00:01.368830887   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<vpe0> current PAUSED pending VOID_PENDING, desired next READY
    0:00:01.383687071   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<vpe0> completed state change to READY
    0:00:01.383750837   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<vpe0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
    0:00:01.383814765   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'vpe0' changed state to 2(READY) successfully
    0:00:01.383875927   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current PAUSED pending VOID_PENDING, desired next READY
    0:00:01.383971738   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to READY
    0:00:01.384013218   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
    0:00:01.384067061   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 2(READY) successfully
    0:00:01.385485351   818   0x170660 INFO                    task gsttask.c:318:gst_task_func:<v4l2src0:src> Task resume from paused
    0:00:01.385723007   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to READY
    0:00:01.385770994   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
    0:00:01.385858509   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 2(READY) successfully
    0:00:01.385921461   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to READY
    0:00:01.385960338   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
    0:00:01.386048829   818    0x2fc00 INFO              GST_STATES gstbin.c:1915:gst_bin_get_state_func:<pipeline0> getting state
    Setting pipeline to NULL ...
    0:00:01.386154887   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<kmssink0> current READY pending VOID_PENDING, desired next NULL
    0:00:01.386300149   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<kmssink0> completed state change to NULL
    0:00:01.386344394   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<kmssink0> notifying about state-changed READY to NULL (VOID_PENDING pending)
    0:00:01.386400677   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'kmssink0' changed state to 1(NULL) successfully
    0:00:01.386457122   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<queue0> current READY pending VOID_PENDING, desired next NULL
    0:00:01.386514869   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<queue0> completed state change to NULL
    0:00:01.386553258   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<queue0> notifying about state-changed READY to NULL (VOID_PENDING pending)
    0:00:01.386607101   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'queue0' changed state to 1(NULL) successfully
    0:00:01.386661919   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<vpe0> current READY pending VOID_PENDING, desired next NULL
    0:00:01.386719341   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<vpe0> completed state change to NULL
    0:00:01.386757405   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<vpe0> notifying about state-changed READY to NULL (VOID_PENDING pending)
    0:00:01.386810271   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'vpe0' changed state to 1(NULL) successfully
    0:00:01.386863626   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current READY pending VOID_PENDING, desired next NULL
    0:00:01.386919583   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to NULL
    0:00:01.386957647   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed READY to NULL (VOID_PENDING pending)
    0:00:01.387011165   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 1(NULL) successfully
    0:00:01.387087455   818    0x2fc00 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<v4l2src0> current READY pending VOID_PENDING, desired next NULL
    0:00:01.387301525   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<v4l2src0> completed state change to NULL
    0:00:01.387346095   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<v4l2src0> notifying about state-changed READY to NULL (VOID_PENDING pending)
    0:00:01.387400589   818    0x2fc00 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'v4l2src0' changed state to 1(NULL) successfully
    0:00:01.387564882   818    0x2fc00 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<pipeline0> completed state change to NULL
    0:00:01.387606525   818    0x2fc00 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed READY to NULL (VOID_PENDING pending)
    Freeing pipeline ...
    0:00:01.387700058   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking v4l2src0:src(0x178020) and capsfilter0:sink(0x178800)
    0:00:01.387768378   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked v4l2src0:src and capsfilter0:sink
    0:00:01.387837349   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter0:src(0x178950) and vpe0:sink(0x178170)
    0:00:01.387901439   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter0:src and vpe0:sink
    0:00:01.387963253   818    0x2fc00 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "capsfilter0"
    0:00:01.388023765   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<capsfilter0> dispose
    0:00:01.388063293   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<capsfilter0> removing pad 'sink'
    0:00:01.388124618   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<capsfilter0> removing pad 'src'
    0:00:01.388177485   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<capsfilter0> parent class dispose
    0:00:01.388217989   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<capsfilter0> finalize
    0:00:01.388254263   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<capsfilter0> finalize parent
    0:00:01.388300135   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking queue0:src(0x178560) and kmssink0:sink(0x1786b0)
    0:00:01.388361135   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked queue0:src and kmssink0:sink
    0:00:01.388429455   818    0x2fc00 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "kmssink0"
    0:00:01.388478581   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<kmssink0> dispose
    0:00:01.388539581   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<kmssink0> removing pad 'sink'
    0:00:01.388592122   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<kmssink0> parent class dispose
    0:00:01.388635717   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<kmssink0> finalize
    0:00:01.388672479   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<kmssink0> finalize parent
    0:00:01.388717050   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking vpe0:src(0x1782c0) and queue0:sink(0x178410)
    0:00:01.388777237   818    0x2fc00 INFO        GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked vpe0:src and queue0:sink
    0:00:01.388848647   818    0x2fc00 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "queue0"
    0:00:01.388897935   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<queue0> dispose
    0:00:01.388934210   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<queue0> removing pad 'sink'
    0:00:01.388989029   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<queue0> removing pad 'src'
    0:00:01.389044661   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<queue0> parent class dispose
    0:00:01.389086791   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<queue0> finalize
    0:00:01.389121927   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<queue0> finalize parent
    0:00:01.389170239   818    0x2fc00 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "vpe0"
    0:00:01.389219039   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<vpe0> dispose
    0:00:01.389256127   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<vpe0> removing pad 'sink'
    0:00:01.389311109   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<vpe0> removing pad 'src'
    0:00:01.389366253   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<vpe0> parent class dispose
    0:00:01.389406757   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<vpe0> finalize
    0:00:01.389442381   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<vpe0> finalize parent
    0:00:01.389495898   818    0x2fc00 INFO           GST_PARENTAGE gstbin.c:1630:gst_bin_remove_func:<pipeline0> removed child "v4l2src0"
    0:00:01.389544373   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<v4l2src0> dispose
    0:00:01.389580810   818    0x2fc00 INFO        GST_ELEMENT_PADS gstelement.c:776:gst_element_remove_pad:<v4l2src0> removing pad 'src'
    0:00:01.389630586   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<v4l2src0> parent class dispose
    0:00:01.389672717   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<v4l2src0> finalize
    0:00:01.389730789   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<v4l2src0> finalize parent
    0:00:01.389771130   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2947:gst_element_dispose:<pipeline0> dispose
    0:00:01.389851162   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:2992:gst_element_dispose:<pipeline0> parent class dispose
    0:00:01.389891829   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3023:gst_element_finalize:<pipeline0> finalize
    0:00:01.389927615   818    0x2fc00 INFO         GST_REFCOUNTING gstelement.c:3028:gst_element_finalize:<pipeline0> finalize parent
    0:00:01.389966818   818    0x2fc00 INFO                GST_INIT gst.c:960:gst_deinit: deinitializing GStreamer
    0:00:01.403472381   818    0x2fc00 INFO                GST_INIT gst.c:1097:gst_deinit: deinitialized GStreamer
    

    It appears that with a USB V4L2 camera, it is still unable to allocate a dmabuf to share with VPE, and I don't see an option for VPE to allocate the buffer and pass it to the v4l2src. Am I missing something obvious, or is there something else I need to be doing?

    Thanks

    Lucas

  • Is it going to take a modification to gst-v4l2src, or even to videobuf-core? It appears that gstv4l2bufferpool.c is setting the CORRUPTED flag which throws an error, and I suspect it's related to the fact that videobuf-core.c says that it doesn't handle DMABUF.

    Or perhaps do I need to figure out how to let vpe or ducatih264enc allocate the buffer and then share it back to v4l2src?
  • From some of the log info, it seems QBUF is failing. Looks like dmabuf operations are failing. Is the USB driver capable of exporting and importing dmabufs?

    Can you please share log with just v4l2src debug (--gst-debug=*v4l2*:5). Add –v option too for negotiation info. Also, please share video4linux/video1 debug log.
  • I've attached the outputs from gst_debug and from dmesg. I'm not familiar with the USB driver, but I'm using whatever came with the Processor SDK 3.01. I assumed it was capable of it, but I can start researching on it if you think that's the missing link.

    v4l2_debug.txt

    [18870.681864] video1: VIDIOC_QUERYCAP
    [18870.695982] video1: VIDIOC_QUERYCAP
    [18870.696096] video1: VIDIOC_ENUMINPUT
    [18870.696173] video1: VIDIOC_ENUMINPUT: error -22
    [18870.696227] video1: VIDIOC_ENUMSTD: error -25
    [18870.696311] video1: VIDIOC_QUERYCTRL
    [18870.696464] video1: VIDIOC_QUERYCTRL
    [18870.696558] video1: VIDIOC_QUERYCTRL
    [18870.696645] video1: VIDIOC_QUERYCTRL
    [18870.696733] video1: VIDIOC_QUERYCTRL
    [18870.696820] video1: VIDIOC_QUERYCTRL
    [18870.696905] video1: VIDIOC_QUERYCTRL
    [18870.696991] video1: VIDIOC_QUERYCTRL
    [18870.697075] video1: VIDIOC_QUERYCTRL
    [18870.697160] video1: VIDIOC_QUERYCTRL: error -22
    [18870.697323] video1: VIDIOC_G_STD: error -25
    [18870.697415] video1: VIDIOC_G_INPUT
    [18870.697920] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [18870.738634] video1: VIDIOC_ENUM_FMT
    [18870.738658] video1: VIDIOC_ENUM_FMT: error -22
    [18870.738831] video1: VIDIOC_ENUM_FRAMESIZES
    [18870.738851] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738872] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738889] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738904] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738918] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738932] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738948] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738962] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738975] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.738989] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.739002] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.739016] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.739030] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.739044] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.739057] video1: VIDIOC_ENUM_FRAMEINTERVALS: error -22
    [18870.739085] video1: VIDIOC_CROPCAP
    [18870.747832] video1: VIDIOC_TRY_FMT
    [18870.773985] video1: VIDIOC_TRY_FMT
    [18870.800142] video1: VIDIOC_TRY_FMT
    [18870.800209] video1: VIDIOC_ENUM_FRAMESIZES
    [18870.800225] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800244] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800260] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800276] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800290] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800304] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800319] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800333] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800347] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800360] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800373] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800387] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800400] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800413] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.800425] video1: VIDIOC_ENUM_FRAMEINTERVALS: error -22
    [18870.800452] video1: VIDIOC_CROPCAP
    [18870.826301] video1: VIDIOC_TRY_FMT
    [18870.852548] video1: VIDIOC_TRY_FMT
    [18870.878796] video1: VIDIOC_TRY_FMT
    [18870.878862] video1: VIDIOC_ENUM_FRAMESIZES
    [18870.878878] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.878895] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.878912] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.878927] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.878941] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.878955] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.878982] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.878997] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.879011] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.879024] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.879037] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.879051] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.879064] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.879078] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.879090] video1: VIDIOC_ENUM_FRAMEINTERVALS: error -22
    [18870.879116] video1: VIDIOC_CROPCAP
    [18870.905036] video1: VIDIOC_TRY_FMT
    [18870.931276] video1: VIDIOC_TRY_FMT
    [18870.957525] video1: VIDIOC_TRY_FMT
    [18870.957586] video1: VIDIOC_ENUM_FRAMESIZES
    [18870.957602] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957619] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957636] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957651] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957665] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957678] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957693] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957707] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957720] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957733] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957746] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957760] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957773] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957786] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18870.957798] video1: VIDIOC_ENUM_FRAMEINTERVALS: error -22
    [18870.957823] video1: VIDIOC_CROPCAP
    [18870.983771] video1: VIDIOC_TRY_FMT
    [18871.010012] video1: VIDIOC_TRY_FMT
    [18871.036265] video1: VIDIOC_TRY_FMT
    [18871.036325] video1: VIDIOC_ENUM_FRAMESIZES
    [18871.036341] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036359] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036375] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036390] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036404] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036417] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036433] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036447] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036461] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036474] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036487] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036500] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036514] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036527] video1: VIDIOC_ENUM_FRAMEINTERVALS
    [18871.036539] video1: VIDIOC_ENUM_FRAMEINTERVALS: error -22
    [18871.036564] video1: VIDIOC_CROPCAP
    [18871.062514] video1: VIDIOC_TRY_FMT
    [18871.088748] video1: VIDIOC_TRY_FMT
    [18871.114992] video1: VIDIOC_TRY_FMT
    [18871.115057] video1: VIDIOC_ENUM_FRAMESIZES: error -22
    [18871.141236] video1: VIDIOC_S_FMT
    [18871.141379] video1: VIDIOC_G_PARM
    [18871.167654] video1: VIDIOC_S_PARM
    [18871.167891] video1: VIDIOC_G_CTRL: error -22
    [18871.168195] video1: VIDIOC_REQBUFS
    [18871.168214] video1: VIDIOC_CREATE_BUFS
    [18871.168230] video1: VIDIOC_REQBUFS
    [18871.168245] video1: VIDIOC_CREATE_BUFS
    [18871.168260] video1: VIDIOC_REQBUFS
    [18871.168273] video1: VIDIOC_CREATE_BUFS
    [18871.171278] video1: VIDIOC_G_CTRL: error -22
    [18871.174898] video1: VIDIOC_REQBUFS
    [18871.175028] video1: VIDIOC_QUERYBUF
    [18871.175047] video1: VIDIOC_QUERYBUF
    [18871.175094] video1: VIDIOC_EXPBUF
    [18871.175206] video1: VIDIOC_EXPBUF
    [18871.175877] video1: VIDIOC_STREAMON
    [18871.868570] contiguous chunk is too small 4096/1843200 b
    [18871.892460] video1: VIDIOC_STREAMOFF
    [18871.893093] video1: VIDIOC_REQBUFS
    
    

  • Also, is v4l2video0convert something I should try troubleshooting as well? According to the description, it sounds like it points to vpe but it has some more parameters that can be set.

  • Hi Lucas,

    Sorry for the late reply. I expect to get usb camera at my end, replicate the issue and look into it by end of this week. I shall update you on the suggestion to resolve the issue as soon I have some answer for you.

    Regards,
    Manisha
  • HI Manisha,

    I am also looking for same solution to get work . (i.e USB 3.0 camera pipeline working with VPE and Ducati) , Can you share when PSDK 3.1 will be released for AM5728 .

    Regards
    Pallab Sarkar

    e2e.ti.com/.../553891
  • Pallab,

    PSDK 3.1 is already released and available for download on ti.com. USB camera is still having issue connecting to vpe in gst pipeline for this version. We are looking into this.

    Regards,
    Manisha
  • Root caused the issue to be with usb/uvc driver. The usb/uvc driver was using vmalloc to allocate the video buffers and hence large allocated buffers were not contiguous.  VPE driver need contiguous buffers to work on and hence the handshake was failing. I modified the usb/uvc driver to work in dma-contiguous mode and with that change, below gstreamer pipeline works great. Attached patch of the changes done to usb/uvc driver. 

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

    diff --git a/drivers/media/usb/uvc/Kconfig b/drivers/media/usb/uvc/Kconfig
    index 6ed85efa..d7eb610 100644
    --- a/drivers/media/usb/uvc/Kconfig
    +++ b/drivers/media/usb/uvc/Kconfig
    @@ -1,7 +1,8 @@
     config USB_VIDEO_CLASS
     	tristate "USB Video Class (UVC)"
     	depends on VIDEO_V4L2
    -	select VIDEOBUF2_VMALLOC
    +#select VIDEOBUF2_VMALLOC
    +	select VIDEOBUF2_DMA_CONTIG
     	---help---
     	  Support for the USB Video Class (UVC).  Currently only video
     	  input devices, such as webcams, are supported.
    diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
    index d11fd6a..ed04bcc 100644
    --- a/drivers/media/usb/uvc/uvc_driver.c
    +++ b/drivers/media/usb/uvc/uvc_driver.c
    @@ -23,6 +23,7 @@
     #include <linux/version.h>
     #include <asm/unaligned.h>
     
    +#include <media/videobuf2-dma-contig.h>
     #include <media/v4l2-common.h>
     
     #include "uvcvideo.h"
    @@ -1924,6 +1925,8 @@ static int uvc_probe(struct usb_interface *intf,
     	if (v4l2_device_register(&intf->dev, &dev->vdev) < 0)
     		goto error;
     
    +	dev->alloc_ctx = vb2_dma_contig_init_ctx(&intf->dev);
    +	intf->dev.coherent_dma_mask = DMA_BIT_MASK(32);
     	/* Initialize controls. */
     	if (uvc_ctrl_init_device(dev) < 0)
     		goto error;
    diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
    index cfb868a..b3278c0 100644
    --- a/drivers/media/usb/uvc/uvc_queue.c
    +++ b/drivers/media/usb/uvc/uvc_queue.c
    @@ -18,10 +18,11 @@
     #include <linux/module.h>
     #include <linux/usb.h>
     #include <linux/videodev2.h>
    -#include <linux/vmalloc.h>
    +//#include <linux/vmalloc.h>
     #include <linux/wait.h>
     #include <media/videobuf2-v4l2.h>
    -#include <media/videobuf2-vmalloc.h>
    +//#include <media/videobuf2-vmalloc.h>
    +#include <media/videobuf2-dma-contig.h>
     
     #include "uvcvideo.h"
     
    @@ -80,7 +81,7 @@ static int uvc_queue_setup(struct vb2_queue *vq, const void *parg,
     	/* Make sure the image size is large enough. */
     	if (fmt && fmt->fmt.pix.sizeimage < stream->ctrl.dwMaxVideoFrameSize)
     		return -EINVAL;
    -
    +	alloc_ctxs[0] = stream->dev->alloc_ctx;
     	*nplanes = 1;
     
     	sizes[0] = fmt ? fmt->fmt.pix.sizeimage
    @@ -202,7 +203,7 @@ int uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type,
     	queue->queue.drv_priv = queue;
     	queue->queue.buf_struct_size = sizeof(struct uvc_buffer);
     	queue->queue.ops = &uvc_queue_qops;
    -	queue->queue.mem_ops = &vb2_vmalloc_memops;
    +	queue->queue.mem_ops = &vb2_dma_contig_memops;//&vb2_vmalloc_memops;
     	queue->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
     		| V4L2_BUF_FLAG_TSTAMP_SRC_SOE;
     	queue->queue.lock = &queue->mutex;
    diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
    index f0f2391..d2ba071 100644
    --- a/drivers/media/usb/uvc/uvcvideo.h
    +++ b/drivers/media/usb/uvc/uvcvideo.h
    @@ -549,6 +549,7 @@ struct uvc_device {
     	struct urb *int_urb;
     	__u8 *status;
     	struct input_dev *input;
    +	struct vb2_alloc_ctx *alloc_ctx;
     	char input_phys[64];
     };
     
    

  • Thank you so much for the help Manisha. That appears to have fixed the problem. The VPE returns data now. It will take some tweaking to make sure the memory operations are configured correctly so it can run at full speed, and interface it with non-V4L2 cameras, but this is a great start.


    Thanks

    Lucas

  • Thank you for the update Lucas! I am glad to know that the patch helped to resolve the issue at your end.
  • Hello manisha,

    I have the same problem and i want to know how to use the "usb_capture.txt" file to fix this issue.
    Thank you,

    BR :)
    Faiez
  • Faiez,

    Copy the file usb_capture under top linux directory (eg - on PLSDK 3.3 - board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d directory), then on linux terminal window, make your current directory the directory where the file is residing
    #cd ti-processor-sdk-linux-am57xx-evm-03.03.00.04/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d

    After that use following command to apply the patch.
    #patch -p1 < usb_capture.txt

    If their is no incompatibility between the source code on top of which patch was created and the source code on which you are applying the patch, patch application will be successful, else you may see some error. In that case you should apply the patch manually, by looking at the modifications in patch file and reading the new source file on which you want to apply the patch.
  • Manisha,

    i don't have this directory ("ti-processor-sdk-linux-am57xx-evm-03.03.00.04/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d") in the latest processor SDK and i have this:

    root@am57xx-evm:/# ls
    + gitAUTOINC mnt ti-processor-sdk-linux-am57xx-evm-03.03.00.04
    bin home opt tmp
    board-support include proc usb_capture.txt
    boot lib run usr
    dev linux-4.4.41 sbin var
    etc lost+found srv www
    f9f6f0db2d-gf9f6f0db2d media sys
    root@am57xx-evm:/#

    Best regards,
    Faiez :)
  • Faiez,

    Looks like you are not that familiar with linux. Please do google on basic linux commands and patching the files. 

    Regards,

    Manisha

  • Hello,

    Faiez said:
    ti-processor-sdk-linux-am57xx-evm-03.03.00.04/board-support/linux-4.4.41+gitAUTOINC+f9f6f0db2d-gf9f6f0db2d

    This folder is allocated on the PC where your PSDK is installed not on the board.

    If you do not have PSDK installed on the PC please install it. 

    BR
    Margarita

  • What version of the SDK is the patch for?I used this patch in sdk3.0,but it did not work.So,I want to know what version of the SDK is appropriate with the patch which you provided?Thank you。

  • The patch was tested on PLSDK version 3.1.