gst_base_sink_wait_preroll

The pipeline structure I have proposed is described as

appsrc ->decodebin->@@@@@@@@@@@@@@@@@@@@@@@@@-> queue -> fakesink
appsrc ->decodebin->@nvstreammux—>nvconv—>demuxer@-> queue -> fakesink
appsrc ->decodebin->@@@@@@@@@@@@@@@@@@@@@@@@@-> queue -> fakesink

However, when running, the pipeline always falls into a state that “gst_base_sink_wait_preroll” in all “queue” elements is waiting all the time. I am quite confused.
The part of gstream log are attached as follows.

It looks like the pipeline is stuck somewhere because some of the
elements don’t receive enough data to complete the preroll.But i have added queue after demuxer.

if i set the property: fakesink’s async=false,it works.but my pipeline still blocked finally

[code]0:00:00.039726497 25328 0x7f3094062630 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x487, scanning for more frames…
0:00:00.039742392 25328 0x7f30940624f0 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x886, scanning for more frames…
0:00:00.039747447 25328 0x7f3094062630 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x913, scanning for more frames…
0:00:00.039766113 25328 0x7f3094062630 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0xd0d, scanning for more frames…
0:00:00.040146492 25328 0x7f3094062370 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x826, scanning for more frames…
0:00:00.040159677 25328 0x7f3094062370 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0xba2, scanning for more frames…
0:00:00.040592793 25328 0x7f3094062590 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x1e8, scanning for more frames…
0:00:00.040602623 25328 0x7f3094062590 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x208, scanning for more frames…
0:00:00.040829211 25328 0x7f30940622d0 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x6b0, scanning for more frames…
0:00:00.041111346 25328 0x7f3094062630 INFO GST_TYPEFIND gsttypefind.c:71:gst_type_find_register: registering typefind function for subparse_typefind
0:00:00.041139416 25328 0x7f3094062630 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin “/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstsubparse.so” loaded
0:00:00.041176750 25328 0x7f3094062450 INFO typefindfunctions gsttypefindfunctions.c:1151:aac_type_find: Possible LOAS syncword at offset 0x8c6, scanning for more frames…
0:00:00.041475935 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream
0:00:00.041506112 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:src
0:00:00.041513728 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:sink
0:00:00.041552546 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad0:proxypad12
0:00:00.041560590 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad0:proxypad12, successful
0:00:00.041567564 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.041847180 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream
0:00:00.041867315 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:src
0:00:00.041874689 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:sink
0:00:00.041900704 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad1:proxypad13
0:00:00.041908516 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad1:proxypad13, successful
0:00:00.041914741 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.042032912 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d1b60) and decodepad0:proxypad12(0x7f308809a590)
0:00:00.042046079 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad0:proxypad12
0:00:00.042055686 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad0:proxypad12
0:00:00.042061822 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad0:proxypad12, successful
0:00:00.042067485 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.042077127 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d1b60) and decodepad0:proxypad12(0x7f308809a590)
0:00:00.042086126 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad0:proxypad12
0:00:00.042087963 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d0060) and decodepad1:proxypad13(0x7f308809aed0)
0:00:00.042099853 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad1:proxypad13
0:00:00.042108223 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad1:proxypad13
0:00:00.042114323 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad1:proxypad13, successful
0:00:00.042120035 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.042129099 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d0060) and decodepad1:proxypad13(0x7f308809aed0)
0:00:00.042136982 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad1:proxypad13
0:00:00.042675786 25328 0x7f3094062630 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin “/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoparsersbad.so” loaded
0:00:00.042688496 25328 0x7f3094062630 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “h264parse”
0:00:00.042734451 25328 0x7f30940624f0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “h264parse”
0:00:00.042740052 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f3050022ee0 adding pad ‘sink’
0:00:00.042757090 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x41271970 adding pad ‘sink’
0:00:00.042773546 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f3050022ee0 adding pad ‘src’
0:00:00.042774222 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x41271970 adding pad ‘src’
0:00:00.042794079 25328 0x7f3094062630 INFO baseparse gstbaseparse.c:3942:gst_base_parse_set_pts_interpolation:GstH264Parse@0x7f3050022ee0 PTS interpolation: no
0:00:00.042795412 25328 0x7f30940624f0 INFO baseparse gstbaseparse.c:3942:gst_base_parse_set_pts_interpolation:GstH264Parse@0x41271970 PTS interpolation: no
0:00:00.042814906 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and h264parse0:sink
0:00:00.042823220 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and h264parse0:sink, successful
0:00:00.042831154 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.042824536 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and h264parse1:sink
0:00:00.042841714 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.042854314 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.042847349 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and h264parse1:sink, successful
0:00:00.042870429 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.042875742 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad h264parse0:src
0:00:00.042879990 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.042888773 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse0:src and decodepad0:proxypad12
0:00:00.042890047 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.042897304 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse0:src and decodepad0:proxypad12, successful
0:00:00.042909400 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.042914911 25328 0x7f3094062630 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse0:src Received event on flushing pad. Discarding
0:00:00.042924152 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream
0:00:00.042943931 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:src
0:00:00.042955828 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:sink
0:00:00.042957809 25328 0x7f3094062630 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “capsfilter”
0:00:00.042914057 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad h264parse1:src
0:00:00.042990491 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad2:proxypad14
0:00:00.042999921 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f30800b97b0 adding pad ‘sink’
0:00:00.043002377 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad2:proxypad14, successful
0:00:00.043022713 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043020317 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f30800b97b0 adding pad ‘src’
0:00:00.043033538 25328 0x7f3094062590 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream
0:00:00.043041412 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043052145 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:src
0:00:00.043056000 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2347:gst_element_continue_state: committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.043060357 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:sink
0:00:00.043001724 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse1:src and decodepad1:proxypad13
0:00:00.043068823 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.043082568 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse1:src and decodepad1:proxypad13, successful
0:00:00.043098710 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043098428 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad3:proxypad15
0:00:00.043108202 25328 0x7f30940624f0 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse1:src Received event on flushing pad. Discarding
0:00:00.043144367 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream
0:00:00.043155448 25328 0x7f30940624f0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “capsfilter”
0:00:00.043115307 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad3:proxypad15, successful
0:00:00.043168053 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415a36c0) and decodepad2:proxypad14(0x7f308809b810)
0:00:00.043175157 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f3050028860 adding pad ‘sink’
0:00:00.043158526 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:src
0:00:00.043180025 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad2:proxypad14
0:00:00.043190889 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f3050028860 adding pad ‘src’
0:00:00.043194493 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:sink
0:00:00.043220620 25328 0x7f3094062590 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043239531 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad4:proxypad16
0:00:00.043247467 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad4:proxypad16, successful
0:00:00.043253440 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043394806 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d1260) and decodepad3:proxypad15(0x7f30480223d0)
0:00:00.043405522 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad3:proxypad15
0:00:00.043415566 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad3:proxypad15
0:00:00.043423990 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad3:proxypad15, successful
0:00:00.043429712 25328 0x7f3094062590 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043438377 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d1260) and decodepad3:proxypad15(0x7f30480223d0)
0:00:00.043445960 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad3:proxypad15
0:00:00.043453137 25328 0x7f3094062590 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “h264parse”
0:00:00.043465501 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f305400ae60 adding pad ‘sink’
0:00:00.043476086 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f305400ae60 adding pad ‘src’
0:00:00.043486637 25328 0x7f3094062590 INFO baseparse gstbaseparse.c:3942:gst_base_parse_set_pts_interpolation:GstH264Parse@0x7f305400ae60 PTS interpolation: no
0:00:00.043488941 25328 0x7f30940622d0 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream
0:00:00.043213116 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043486574 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d0960) and decodepad4:proxypad16(0x7f3048022d10)
0:00:00.043204963 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad2:proxypad14
0:00:00.043534172 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and h264parse2:sink
0:00:00.043507415 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:src
0:00:00.043197137 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2354:gst_element_continue_state: continue state change READY to PAUSED, final PAUSED
0:00:00.043561694 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.043567767 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.043525012 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad4:proxypad16
0:00:00.043535462 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad2:proxypad14, successful
0:00:00.043542313 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and h264parse2:sink, successful
0:00:00.043595066 25328 0x7f3094062590 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043598091 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad typefind:sink
0:00:00.043585157 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad4:proxypad16
0:00:00.043587907 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043613664 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad4:proxypad16, successful
0:00:00.043626059 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043633901 25328 0x7f30940622d0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad5:proxypad17
0:00:00.043515893 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2347:gst_element_continue_state: committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.043651685 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415a36c0) and decodepad2:proxypad14(0x7f308809b810)
0:00:00.043646393 25328 0x7f3094062590 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.043666139 25328 0x7f30940622d0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad5:proxypad17, successful
0:00:00.043674231 25328 0x7f30940622d0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043655943 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.043662189 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad2:proxypad14
0:00:00.043698181 25328 0x7f3094062370 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “h264parse”
0:00:00.043711919 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f3048024a60 adding pad ‘sink’
0:00:00.043721582 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f3048024a60 adding pad ‘src’
0:00:00.043731882 25328 0x7f3094062370 INFO baseparse gstbaseparse.c:3942:gst_base_parse_set_pts_interpolation:GstH264Parse@0x7f3048024a60 PTS interpolation: no
0:00:00.043744302 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and h264parse3:sink
0:00:00.043751123 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and h264parse3:sink, successful
0:00:00.043756680 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043764226 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.043768998 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.043784595 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad h264parse3:src
0:00:00.043794157 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse3:src and decodepad2:proxypad14
0:00:00.043800199 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse3:src and decodepad2:proxypad14, successful
0:00:00.043805416 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043578844 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking h264parse0:src(0x7f30700b3020) and decodepad0:proxypad12(0x7f308809a590)
0:00:00.043636888 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415d0960) and decodepad4:proxypad16(0x7f3048022d10)
0:00:00.043690698 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2354:gst_element_continue_state: continue state change READY to PAUSED, final PAUSED
0:00:00.043804562 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415a2dc0) and decodepad5:proxypad17(0x7f3048023650)
0:00:00.043811472 25328 0x7f3094062370 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse3:src Received event on flushing pad. Discarding
0:00:00.043875898 25328 0x7f3094062370 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “capsfilter”
0:00:00.043891777 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f3050029520 adding pad ‘sink’
0:00:00.043900685 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f3050029520 adding pad ‘src’
0:00:00.043909165 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043915857 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2347:gst_element_continue_state: committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.043921905 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.043928523 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2354:gst_element_continue_state: continue state change READY to PAUSED, final PAUSED
0:00:00.043935710 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.043940294 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.043949773 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking h264parse3:src(0x7f3054010b90) and decodepad2:proxypad14(0x7f308809b810)
0:00:00.043957968 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked h264parse3:src and decodepad2:proxypad14
0:00:00.043965442 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter2:sink
0:00:00.043971572 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse3:src and capsfilter2:sink
0:00:00.043977110 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse3:src and capsfilter2:sink, successful
0:00:00.043982446 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.043986783 25328 0x7f3094062370 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse3:src Received event on flushing pad. Discarding
0:00:00.043992543 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter2:src
0:00:00.043998500 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter2:src and decodepad2:proxypad14
0:00:00.044004102 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter2:src and decodepad2:proxypad14, successful
0:00:00.044009296 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.044013910 25328 0x7f3094062370 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse3:src Received event on flushing pad. Discarding
0:00:00.044159201 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.044166803 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.044205946 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad2> pad has no peer
0:00:00.044236454 25328 0x7f3094062370 INFO typefind gsttypefindelement.c:180:gst_type_find_element_have_type: found caps video/x-h264, stream-format=(string)byte-stream, probability=50
0:00:00.044260005 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad2> pad has no peer
0:00:00.044285541 25328 0x7f3094062370 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:00.044376988 25328 0x7f3094062370 INFO h264parse gsth264parse.c:1736:gst_h264_parse_update_src_caps: resolution changed 1920x1080
0:00:00.044399891 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad2> pad has no peer
0:00:00.044420620 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, framerate=(fraction)0/1, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)4.2
0:00:00.044457450 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad2> pad has no peer
0:00:00.044468175 25328 0x7f3094062370 INFO basetransform gstbasetransform.c:1367:gst_base_transform_setcaps: reuse caps
0:00:00.044475534 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, framerate=(fraction)0/1, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)4.2
0:00:00.044492553 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter2:src(0x7f3054011010) and decodepad2:proxypad14(0x7f308809b810)
0:00:00.044502202 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter2:src and decodepad2:proxypad14
0:00:00.044510270 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter2:src and decodepad2:proxypad14
0:00:00.044516105 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter2:src and decodepad2:proxypad14, successful
0:00:00.044521527 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.044554499 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter2:src(0x7f3054011010) and decodepad2:proxypad14(0x7f308809b810)
0:00:00.044563900 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter2:src and decodepad2:proxypad14
0:00:00.044571302 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter2:src and decodepad2:proxypad14
0:00:00.044576892 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter2:src and decodepad2:proxypad14, successful
0:00:00.044582431 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.044591477 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter2:src(0x7f3054011010) and decodepad2:proxypad14(0x7f308809b810)
0:00:00.044599049 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter2:src and decodepad2:proxypad14
0:00:00.044606481 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter2:src and decodepad2:proxypad14
0:00:00.044612011 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter2:src and decodepad2:proxypad14, successful
0:00:00.044617154 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.044627798 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter2:src(0x7f3054011010) and decodepad2:proxypad14(0x7f308809b810)
0:00:00.044635351 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter2:src and decodepad2:proxypad14
0:00:00.045243147 25328 0x7f3094062370 INFO GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin “/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst_videocodecs.so” loaded
0:00:00.045253512 25328 0x7f3094062370 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “nvdec_h264”
0:00:00.045317622 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstVideoDecoder@0x7f3048078600 adding pad ‘sink’
0:00:00.045330806 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstVideoDecoder@0x7f3048078600 adding pad ‘src’
0:00:00.045362414 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter2:src and nvcuvidh264dec0:sink
0:00:00.045371952 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter2:src and nvcuvidh264dec0:sink, successful
0:00:00.045377786 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.045388926 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.045394327 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.045433468 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:nvcuvidh264dec0:src pad has no peer
0:00:00.045460523 25328 0x7f3094062370 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad nvcuvidh264dec0:src
0:00:00.045472361 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link nvcuvidh264dec0:src and decodepad2:proxypad14
0:00:00.045479889 25328 0x7f3094062370 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked nvcuvidh264dec0:src and decodepad2:proxypad14, successful
0:00:00.045486247 25328 0x7f3094062370 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.045491187 25328 0x7f3094062370 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:nvcuvidh264dec0:src Received event on flushing pad. Discarding
0:00:00.045502782 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.045508341 25328 0x7f3094062370 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.045533011 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad2> pad has no peer
0:00:00.046021590 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad2> pad has no peer
0:00:00.046108268 25328 0x7f3094062370 INFO videodecoder gstvideodecoder.c:1334:gst_video_decoder_sink_event_default: upstream tags: taglist, video-codec=(string)“H.264\ (Main\ Profile)”;
0:00:00.046139028 25328 0x7f3094062370 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad2> pad has no peer
0:00:00.046156836 25328 0x7f3094062370 INFO basetransform gstbasetransform.c:1367:gst_base_transform_setcaps: reuse caps
0:00:00.048303909 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad5:proxypad17
0:00:00.043826381 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad4:proxypad16
0:00:00.043835625 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.048306761 25328 0x7f3094062590 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.048326754 25328 0x7f30940622d0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and decodepad5:proxypad17
0:00:00.048378834 25328 0x7f30940622d0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and decodepad5:proxypad17, successful
0:00:00.048384439 25328 0x7f30940622d0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048396302 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking typefind:src(0x415a2dc0) and decodepad5:proxypad17(0x7f3048023650)
0:00:00.048344628 25328 0x7f3094062450 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “h264parse”
0:00:00.048347938 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.048436849 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f30480702f0 adding pad ‘sink’
0:00:00.048449640 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f30480702f0 adding pad ‘src’
0:00:00.048462554 25328 0x7f3094062450 INFO baseparse gstbaseparse.c:3942:gst_base_parse_set_pts_interpolation:GstH264Parse@0x7f30480702f0 PTS interpolation: no
0:00:00.048415316 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked typefind:src and decodepad5:proxypad17
0:00:00.048438118 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking h264parse1:src(0x7f30700b3920) and decodepad1:proxypad13(0x7f308809aed0)
0:00:00.048478643 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and h264parse4:sink
0:00:00.048492636 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and h264parse4:sink, successful
0:00:00.048498265 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048505938 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.048510561 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.048483025 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked h264parse1:src and decodepad1:proxypad13
0:00:00.048397814 25328 0x7f3094062590 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad h264parse2:src
0:00:00.048558586 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse2:src and decodepad3:proxypad15
0:00:00.048527779 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad h264parse4:src
0:00:00.048538577 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter1:sink
0:00:00.048592207 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse4:src and decodepad4:proxypad16
0:00:00.048570990 25328 0x7f3094062590 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse2:src and decodepad3:proxypad15, successful
0:00:00.048594634 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse1:src and capsfilter1:sink
0:00:00.048597612 25328 0x7f30940622d0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “h264parse”
0:00:00.043819957 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked h264parse0:src and decodepad0:proxypad12
0:00:00.048604583 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse4:src and decodepad4:proxypad16, successful
0:00:00.048617106 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse1:src and capsfilter1:sink, successful
0:00:00.048652469 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048641517 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048648196 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f3054014260 adding pad ‘sink’
0:00:00.048655022 25328 0x7f3094062590 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048636209 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:sink
0:00:00.048663150 25328 0x7f30940624f0 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse1:src Received event on flushing pad. Discarding
0:00:00.048671192 25328 0x7f3094062450 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse4:src Received event on flushing pad. Discarding
0:00:00.048716425 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter1:src
0:00:00.048725435 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter1:src and decodepad1:proxypad13
0:00:00.048732790 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter1:src and decodepad1:proxypad13, successful
0:00:00.048738360 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048743635 25328 0x7f30940624f0 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse1:src Received event on flushing pad. Discarding
0:00:00.048784856 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.048784164 25328 0x7f3094062450 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “capsfilter”
0:00:00.048795570 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.048811149 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f304802a620 adding pad ‘sink’
0:00:00.048821352 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseTransform@0x7f304802a620 adding pad ‘src’
0:00:00.048832495 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048837528 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad1> pad has no peer
0:00:00.048847908 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2347:gst_element_continue_state: committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.048861333 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.048868640 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2354:gst_element_continue_state: continue state change READY to PAUSED, final PAUSED
0:00:00.048876220 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.048880946 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.048689852 25328 0x7f30940622d0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstBaseParse@0x7f3054014260 adding pad ‘src’
0:00:00.048898158 25328 0x7f30940622d0 INFO baseparse gstbaseparse.c:3942:gst_base_parse_set_pts_interpolation:GstH264Parse@0x7f3054014260 PTS interpolation: no
0:00:00.048901194 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking h264parse4:src(0x7f3054011d90) and decodepad4:proxypad16(0x7f3048022d10)
0:00:00.048912929 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked h264parse4:src and decodepad4:proxypad16
0:00:00.048881089 25328 0x7f30940624f0 INFO typefind gsttypefindelement.c:180:gst_type_find_element_have_type: found caps video/x-h264, stream-format=(string)byte-stream, probability=50
0:00:00.048842440 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse0:src and capsfilter0:sink
0:00:00.048921220 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter3:sink
0:00:00.048922403 25328 0x7f30940622d0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link typefind:src and h264parse5:sink
0:00:00.048924723 25328 0x7f3094062590 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse2:src Received event on flushing pad. Discarding
0:00:00.048944729 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse4:src and capsfilter3:sink
0:00:00.048970712 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse4:src and capsfilter3:sink, successful
0:00:00.048976992 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048981597 25328 0x7f3094062450 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse4:src Received event on flushing pad. Discarding
0:00:00.048987714 25328 0x7f3094062450 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter3:src
0:00:00.048993938 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter3:src and decodepad4:proxypad16
0:00:00.048999516 25328 0x7f3094062450 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter3:src and decodepad4:proxypad16, successful
0:00:00.049004651 25328 0x7f3094062450 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049009388 25328 0x7f3094062450 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse4:src Received event on flushing pad. Discarding
0:00:00.049114070 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse0:src and capsfilter0:sink, successful
0:00:00.049122621 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.048953853 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad1> pad has no peer
0:00:00.048952330 25328 0x7f30940622d0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked typefind:src and h264parse5:sink, successful
0:00:00.049152990 25328 0x7f3094062630 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse0:src Received event on flushing pad. Discarding
0:00:00.049163109 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:src
0:00:00.049157129 25328 0x7f30940624f0 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:00.049123344 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.049166588 25328 0x7f30940622d0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049206368 25328 0x7f30940622d0 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.049211866 25328 0x7f30940622d0 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.049222582 25328 0x7f30940624f0 INFO h264parse gsth264parse.c:1736:gst_h264_parse_update_src_caps: resolution changed 1920x1080
0:00:00.049196893 25328 0x7f3094062450 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.049274663 25328 0x7f3094062590 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “capsfilter”
0:00:00.049284196 25328 0x7f3094062450 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad4> pad has no peer
0:00:00.049248015 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad1> pad has no peer
0:00:00.049322203 25328 0x7f3094062450 INFO typefind gsttypefindelement.c:180:gst_type_find_element_have_type: found caps video/x-h264, stream-format=(string)byte-stream, probability=50
0:00:00.049176265 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter0:src and decodepad0:proxypad12
0:00:00.049345781 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter0:src and decodepad0:proxypad12, successful
0:00:00.049322453 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, framerate=(fraction)0/1, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)4.2
0:00:00.049381298 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad1> pad has no peer
0:00:00.049389957 25328 0x7f30940624f0 INFO basetransform gstbasetransform.c:1367:gst_base_transform_setcaps: reuse caps
0:00:00.049395058 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, framerate=(fraction)0/1, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)4.2
0:00:00.049408485 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter1:src(0x7f30700b3da0) and decodepad1:proxypad13(0x7f308809aed0)
0:00:00.049417285 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter1:src and decodepad1:proxypad13
0:00:00.049425300 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter1:src and decodepad1:proxypad13
0:00:00.049431060 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter1:src and decodepad1:proxypad13, successful
0:00:00.049436452 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049467965 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter1:src(0x7f30700b3da0) and decodepad1:proxypad13(0x7f308809aed0)
0:00:00.049477215 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter1:src and decodepad1:proxypad13
0:00:00.049487490 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter1:src and decodepad1:proxypad13
0:00:00.049493520 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter1:src and decodepad1:proxypad13, successful
0:00:00.049499013 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049508493 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter1:src(0x7f30700b3da0) and decodepad1:proxypad13(0x7f308809aed0)
0:00:00.049515672 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter1:src and decodepad1:proxypad13
0:00:00.049522996 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter1:src and decodepad1:proxypad13
0:00:00.049528178 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter1:src and decodepad1:proxypad13, successful
0:00:00.049533163 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049542781 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter1:src(0x7f30700b3da0) and decodepad1:proxypad13(0x7f308809aed0)
0:00:00.049550126 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter1:src and decodepad1:proxypad13
0:00:00.049557200 25328 0x7f30940624f0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “nvdec_h264”
0:00:00.049569776 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstVideoDecoder@0x4126f1a0 adding pad ‘sink’
0:00:00.049578309 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstVideoDecoder@0x4126f1a0 adding pad ‘src’
0:00:00.049592625 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter1:src and nvcuvidh264dec1:sink
0:00:00.049599143 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter1:src and nvcuvidh264dec1:sink, successful
0:00:00.049604381 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049613352 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.049618340 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.049635521 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:nvcuvidh264dec1:src pad has no peer
0:00:00.049652871 25328 0x7f30940624f0 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad nvcuvidh264dec1:src
0:00:00.049662103 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link nvcuvidh264dec1:src and decodepad1:proxypad13
0:00:00.049668075 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked nvcuvidh264dec1:src and decodepad1:proxypad13, successful
0:00:00.049673251 25328 0x7f30940624f0 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049677631 25328 0x7f30940624f0 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:nvcuvidh264dec1:src Received event on flushing pad. Discarding
0:00:00.049687298 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.049692374 25328 0x7f30940624f0 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.049712154 25328 0x7f30940624f0 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad1> pad has no peer
0:00:00.049780197 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.049787998 25328 0x7f3094062630 INFO GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:h264parse0:src Received event on flushing pad. Discarding
0:00:00.049887649 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to PAUSED
0:00:00.049896334 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.049927579 25328 0x7f3094062630 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad0> pad has no peer
0:00:00.049957004 25328 0x7f3094062630 INFO typefind gsttypefindelement.c:180:gst_type_find_element_have_type: found caps video/x-h264, stream-format=(string)byte-stream, probability=50
0:00:00.049979116 25328 0x7f3094062630 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad0> pad has no peer
0:00:00.050000414 25328 0x7f3094062630 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:00.050064757 25328 0x7f3094062630 INFO h264parse gsth264parse.c:1736:gst_h264_parse_update_src_caps: resolution changed 1920x1080
0:00:00.050086288 25328 0x7f3094062630 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad0> pad has no peer
0:00:00.050105488 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, framerate=(fraction)0/1, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)4.2
0:00:00.050132471 25328 0x7f3094062630 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:<’’:decodepad0> pad has no peer
0:00:00.050140428 25328 0x7f3094062630 INFO basetransform gstbasetransform.c:1367:gst_base_transform_setcaps: reuse caps
0:00:00.050145403 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:679:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, framerate=(fraction)0/1, parsed=(boolean)true, alignment=(string)au, profile=(string)main, level=(string)4.2
0:00:00.050157517 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter0:src(0x7f30700b34a0) and decodepad0:proxypad12(0x7f308809a590)
0:00:00.050166551 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter0:src and decodepad0:proxypad12
0:00:00.050174734 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter0:src and decodepad0:proxypad12
0:00:00.050180892 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter0:src and decodepad0:proxypad12, successful
0:00:00.050186425 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.050219874 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter0:src(0x7f30700b34a0) and decodepad0:proxypad12(0x7f308809a590)
0:00:00.050229275 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter0:src and decodepad0:proxypad12
0:00:00.050236672 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter0:src and decodepad0:proxypad12
0:00:00.050242032 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter0:src and decodepad0:proxypad12, successful
0:00:00.050247289 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.050256101 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter0:src(0x7f30700b34a0) and decodepad0:proxypad12(0x7f308809a590)
0:00:00.050263297 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter0:src and decodepad0:proxypad12
0:00:00.050270489 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter0:src and decodepad0:proxypad12
0:00:00.050275837 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter0:src and decodepad0:proxypad12, successful
0:00:00.050281123 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.050290557 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2071:gst_pad_unlink: unlinking capsfilter0:src(0x7f30700b34a0) and decodepad0:proxypad12(0x7f308809a590)
0:00:00.050297950 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstpad.c:2125:gst_pad_unlink: unlinked capsfilter0:src and decodepad0:proxypad12
0:00:00.050304919 25328 0x7f3094062630 INFO GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element “nvdec_h264”
0:00:00.050317532 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstVideoDecoder@0x7f3050074330 adding pad ‘sink’
0:00:00.050326252 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:GstVideoDecoder@0x7f3050074330 adding pad ‘src’
0:00:00.050342743 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter0:src and nvcuvidh264dec2:sink
0:00:00.050351135 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter0:src and nvcuvidh264dec2:sink, successful
0:00:00.050356499 25328 0x7f3094062630 INFO GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.050365567 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2372:gst_element_continue_state: completed state change to READY
0:00:00.050370753 25328 0x7f3094062630 INFO GST_STATES gstelement.c:2277:_priv_gst_element_state_changed: notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.050386718 25328 0x7f3094062630 INFO GST_PADS gstpad.c:4098:gst_pad_peer_query:nvcuvidh264dec2:src pad has no peer
0:00:00.050404189 25328 0x7f3094062630 INFO GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad nvcuvidh264dec2:src
0:00:00.050413384 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link nvcuvidh264dec2:src and decodepad0:proxypad12
0:00:00.050419526 25328 0x7f3094062630 INFO GST_PADS gstpad.c:2521:gst_pad_link

my pipeline code:

//
// Created by vapd on 19-3-19.
//

#include "vapd_pipeline_1.h"
#include <gst/gst.h>
#include <glib.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#include <string>

#include "gstnvdsmeta.h"
#include "gstnvstreammeta.h"
#include "gst-nvmessage.h"
#include "nvbuffer.h"
#include <opencv2/opencv.hpp>
#include "logger.h"

/* Muxer batch formation timeout, for e.g. 40 millisec. Should ideally be set
 * based on the fastest source's framerate. */
#define MUXER_BATCH_TIMEOUT_USEC 10000

/* NVIDIA Decoder source pad memory feature. This feature signifies that source
 * pads having this capability will push GstBuffers containing cuda buffers. */
#define GST_CAPS_FEATURES_NVMM "memory:NVMM"

#define NVGSTDS_LINK_ELEMENT(elem1, elem2) \
    do { \
      if (!gst_element_link (elem1,elem2)) { \
        GstCaps *src_caps, *sink_caps; \
        src_caps = gst_pad_query_caps ((GstPad *) (elem1)->srcpads->data, NULL); \
        sink_caps = gst_pad_query_caps ((GstPad *) (elem2)->sinkpads->data, NULL); \
        LOG_ERROR(logger,fmtString("Failed to link '%s' (%s) and '%s' (%s)\n", \
            GST_ELEMENT_NAME (elem1), \
            gst_caps_to_string (src_caps), \
            GST_ELEMENT_NAME (elem2), \
            gst_caps_to_string (sink_caps))); \
      } \
    } while (0)

#define FPS_PRINT_INTERVAL 300

static gboolean bus_call (GstBus * bus, GstMessage * msg, gpointer data)
{
  VapdPipeline *vapdPipeline = (VapdPipeline *) data;
  switch (GST_MESSAGE_TYPE (msg)) {
    case GST_MESSAGE_EOS:
      LOG_INFO(logger,"End of stream\n");
      g_main_loop_quit (vapdPipeline->loop);
      break;
    case GST_MESSAGE_WARNING:
    {
      gchar *debug;
      GError *error;
      gst_message_parse_warning (msg, &error, &debug);
      LOG_ERROR(logger,fmtString("WARNING from element %s: %s\n",
          GST_OBJECT_NAME (msg->src), error->message));
      g_free (debug);
      LOG_ERROR(logger,fmtString("Warning: %s\n", error->message));
      g_error_free (error);
      break;
    }
    case GST_MESSAGE_ERROR:
    {
      gchar *debug;
      GError *error;
      gst_message_parse_error (msg, &error, &debug);
      LOG_ERROR(logger,fmtString("ERROR from element {}: {}\n",
          GST_OBJECT_NAME (msg->src), error->message));
      if (debug)
        LOG_ERROR(logger,"VapdPipeline["<< vapdPipeline->pipeline_index << "]Error details: "<< debug << "\n");
      g_free (debug);
      g_error_free (error);
      g_main_loop_quit (vapdPipeline->loop);
      break;
    }
    case GST_MESSAGE_ELEMENT:
    {
      if (gst_nvmessage_is_stream_eos (msg)) {
        guint stream_id;
        if (gst_nvmessage_parse_stream_eos (msg, &stream_id)) {
          LOG_ERROR(logger,fmtString("Got EOS from stream {}\n", stream_id));
        }
      }
      break;
    }
    default:
      break;
  }
  return TRUE;
}

static void cb_newpad (GstElement * decodebin, GstPad * decoder_src_pad, gpointer data)
{
  GstCaps *caps = gst_pad_query_caps (decoder_src_pad, NULL);
  const GstStructure *str = gst_caps_get_structure (caps, 0);
  const gchar *name = gst_structure_get_name (str);
  GstElement *source_bin = (GstElement *) data;
  GstCapsFeatures *features = gst_caps_get_features (caps, 0);

  /* Need to check if the pad created by the decodebin is for video and not
   * audio. */
  if (!strncmp (name, "video", 5)) {
    /* Link the decodebin pad only if decodebin has picked nvidia
     * decoder plugin nvdec_*. We do this by checking if the pad caps contain
     * NVMM memory features. */
    if (gst_caps_features_contains (features, GST_CAPS_FEATURES_NVMM)) {
      /* Get the source bin ghost pad */
      GstPad *bin_ghost_pad = gst_element_get_static_pad (source_bin, "src");
      if (!gst_ghost_pad_set_target (GST_GHOST_PAD (bin_ghost_pad),
              decoder_src_pad)) {
        LOG_ERROR(logger,"Failed to link decoder src pad to source bin ghost pad\n");
      }
      gst_object_unref (bin_ghost_pad);
    } else {
      LOG_ERROR(logger,"Error: Decodebin did not pick nvidia decoder plugin.\n");
    }
  }
}

static GstPadProbeReturn decode_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * probe_info,
                                                        gpointer u_data) {

    GstBuffer *gstbuf = (GstBuffer *)probe_info->data;
    GstNvStreamMeta *streammeta = NULL;
    streammeta = gst_buffer_get_nvstream_meta (gstbuf);
    VapdPipeline *dpsPipeline = (VapdPipeline *)u_data;
    int i = 0;
    int channelIndex;
	for(auto pipeline_channel : dpsPipeline->pipelineInfo.pipeline_channel)
	{
		if(i == *streammeta->stream_id)
		{
		    channelIndex = pipeline_channel.first;
		}
		i++;
	}
    printf("ret:[%d][%d],channel:%d\n",dpsPipeline->pipeline_index,*streammeta->stream_id,channelIndex);

    return GST_PAD_PROBE_OK;
}

VapdPipeline::VapdPipeline(PipelineInfo pipelineInfo1,int pipeIndex,int gpu_id)
{
	pipelineInfo = pipelineInfo1;
	pipeline_index = pipeIndex;
	pipeline_gpu_id = gpu_id;
}

GstElement *VapdPipeline::create_element_into_pipeline(std::string element_name,int index)
{
	gchar name[20] = { };
	g_snprintf (name, 20, "vapd-%s-%02d", element_name.c_str(),index);
	GstElement *element = gst_element_factory_make(element_name.c_str(),name);
	if (!element) {
    LOG_ERROR (logger,"One element could not be created. Exiting.\n");
    return nullptr;
    }
    gst_bin_add(GST_BIN (pipeline), element);
	return element;
}

int VapdPipeline::init()
{
  gchar name[20] = { };
	/* Standard GStreamer initialization */
  loop = g_main_loop_new (nullptr, FALSE);

  /* Create gstreamer elements */
  /* Create Pipeline element that will form a connection of other elements */
  g_snprintf (name, 20, "vapd-pipeline-%02d", pipeline_index);
  pipeline = gst_pipeline_new (name);

  /* Create nvstreammux instance to form batches from one or more sources. */
  streammux = create_element_into_pipeline ("nvstreammux", pipeline_index);
  streamdemux = create_element_into_pipeline ("nvstreamdemux", pipeline_index);
  nvvidconv = create_element_into_pipeline ("nvvidconv", pipeline_index);

  //g_object_set (G_OBJECT (nvvidconv), "gpu-id",pipeline_gpu_id,nullptr);
  //g_object_set (G_OBJECT (nvvidconv), "qos",true,nullptr);
  link_streammux();

  /* we add a message handler */
  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
  bus_watch_id = gst_bus_add_watch (bus, bus_call, this);
  // todo deletePipeline gst_object_unref (bus);

  g_object_set (G_OBJECT (streammux), "width", pipelineInfo.video_width, "height",
      pipelineInfo.video_height, "batch-size", pipelineInfo.pipeline_channel.size()*2,
      "batched-push-timeout", MUXER_BATCH_TIMEOUT_USEC,nullptr);//"gpu-id",pipeline_gpu_id

  filter1 = gst_element_factory_make ("capsfilter", "filter1");
  filter2 = gst_element_factory_make ("capsfilter", "filter2");

  caps1 = gst_caps_from_string ("video/x-raw(memory:NVMM), format=NV12");
  g_object_set (G_OBJECT (filter1), "caps", caps1, nullptr);
  gst_caps_unref (caps1);
  caps2 = gst_caps_from_string ("video/x-raw(memory:NVMM), format=RGBA");
  g_object_set (G_OBJECT (filter2), "caps", caps2, nullptr);
  gst_caps_unref (caps2);


  /* Set up the pipeline */
  /* we add all elements into the pipeline */
  gst_bin_add_many (GST_BIN (pipeline),filter1, filter2, nullptr);

  link_streamdemux();

  /* we link the elements together
   * nvstreammux -> nvinfer -> nvtiler -> nvvidconv -> nvosd -> video-renderer */
  if (!gst_element_link_many (streammux,filter1, nvvidconv, filter2,streamdemux,
          NULL)) {
    LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Elements could not be linked. Exiting.\n");
    return -1;
  }

  return 1;
}

gboolean
link_element_to_demux_src_pad (GstElement *demux, GstElement *elem, guint index)
{
  gboolean ret = FALSE;
  GstPad *demux_src_pad = NULL;
  GstPad *sink_pad = NULL;
  gchar pad_name[16];

  g_snprintf (pad_name, 16, "src_%u", index);
  pad_name[15] = '

//
// Created by vapd on 19-3-19.
//

#include “vapd_pipeline_1.h”
#include <gst/gst.h>
#include <glib.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#include

#include “gstnvdsmeta.h”
#include “gstnvstreammeta.h”
#include “gst-nvmessage.h”
#include “nvbuffer.h”
#include <opencv2/opencv.hpp>
#include “logger.h”

/* Muxer batch formation timeout, for e.g. 40 millisec. Should ideally be set

  • based on the fastest source’s framerate. */
    #define MUXER_BATCH_TIMEOUT_USEC 10000

/* NVIDIA Decoder source pad memory feature. This feature signifies that source

  • pads having this capability will push GstBuffers containing cuda buffers. */
    #define GST_CAPS_FEATURES_NVMM “memory:NVMM”

#define NVGSTDS_LINK_ELEMENT(elem1, elem2)
do {
if (!gst_element_link (elem1,elem2)) {
GstCaps *src_caps, *sink_caps;
src_caps = gst_pad_query_caps ((GstPad *) (elem1)->srcpads->data, NULL);
sink_caps = gst_pad_query_caps ((GstPad *) (elem2)->sinkpads->data, NULL);
LOG_ERROR(logger,fmtString(“Failed to link ‘%s’ (%s) and ‘%s’ (%s)\n”,
GST_ELEMENT_NAME (elem1),
gst_caps_to_string (src_caps),
GST_ELEMENT_NAME (elem2),
gst_caps_to_string (sink_caps)));
}
} while (0)

#define FPS_PRINT_INTERVAL 300

static gboolean bus_call (GstBus * bus, GstMessage * msg, gpointer data)
{
VapdPipeline *vapdPipeline = (VapdPipeline *) data;
switch (GST_MESSAGE_TYPE (msg)) {
case GST_MESSAGE_EOS:
LOG_INFO(logger,“End of stream\n”);
g_main_loop_quit (vapdPipeline->loop);
break;
case GST_MESSAGE_WARNING:
{
gchar *debug;
GError *error;
gst_message_parse_warning (msg, &error, &debug);
LOG_ERROR(logger,fmtString(“WARNING from element %s: %s\n”,
GST_OBJECT_NAME (msg->src), error->message));
g_free (debug);
LOG_ERROR(logger,fmtString(“Warning: %s\n”, error->message));
g_error_free (error);
break;
}
case GST_MESSAGE_ERROR:
{
gchar *debug;
GError *error;
gst_message_parse_error (msg, &error, &debug);
LOG_ERROR(logger,fmtString(“ERROR from element {}: {}\n”,
GST_OBJECT_NAME (msg->src), error->message));
if (debug)
LOG_ERROR(logger,“VapdPipeline[”<< vapdPipeline->pipeline_index << "]Error details: "<< debug << “\n”);
g_free (debug);
g_error_free (error);
g_main_loop_quit (vapdPipeline->loop);
break;
}
case GST_MESSAGE_ELEMENT:
{
if (gst_nvmessage_is_stream_eos (msg)) {
guint stream_id;
if (gst_nvmessage_parse_stream_eos (msg, &stream_id)) {
LOG_ERROR(logger,fmtString(“Got EOS from stream {}\n”, stream_id));
}
}
break;
}
default:
break;
}
return TRUE;
}

static void cb_newpad (GstElement * decodebin, GstPad * decoder_src_pad, gpointer data)
{
GstCaps *caps = gst_pad_query_caps (decoder_src_pad, NULL);
const GstStructure *str = gst_caps_get_structure (caps, 0);
const gchar *name = gst_structure_get_name (str);
GstElement *source_bin = (GstElement *) data;
GstCapsFeatures *features = gst_caps_get_features (caps, 0);

/* Need to check if the pad created by the decodebin is for video and not

  • audio. /
    if (!strncmp (name, “video”, 5)) {
    /
    Link the decodebin pad only if decodebin has picked nvidia
    • decoder plugin nvdec_*. We do this by checking if the pad caps contain
    • NVMM memory features. /
      if (gst_caps_features_contains (features, GST_CAPS_FEATURES_NVMM)) {
      /
      Get the source bin ghost pad */
      GstPad *bin_ghost_pad = gst_element_get_static_pad (source_bin, “src”);
      if (!gst_ghost_pad_set_target (GST_GHOST_PAD (bin_ghost_pad),
      decoder_src_pad)) {
      LOG_ERROR(logger,“Failed to link decoder src pad to source bin ghost pad\n”);
      }
      gst_object_unref (bin_ghost_pad);
      } else {
      LOG_ERROR(logger,“Error: Decodebin did not pick nvidia decoder plugin.\n”);
      }
      }
      }

static GstPadProbeReturn decode_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * probe_info,
gpointer u_data) {

GstBuffer *gstbuf = (GstBuffer *)probe_info->data;
GstNvStreamMeta *streammeta = NULL;
streammeta = gst_buffer_get_nvstream_meta (gstbuf);
VapdPipeline *dpsPipeline = (VapdPipeline *)u_data;
int i = 0;
int channelIndex;
for(auto pipeline_channel : dpsPipeline->pipelineInfo.pipeline_channel)
{
	if(i == *streammeta->stream_id)
	{
	    channelIndex = pipeline_channel.first;
	}
	i++;
}
printf("ret:[%d][%d],channel:%d\n",dpsPipeline->pipeline_index,*streammeta->stream_id,channelIndex);

return GST_PAD_PROBE_OK;

}

VapdPipeline::VapdPipeline(PipelineInfo pipelineInfo1,int pipeIndex,int gpu_id)
{
pipelineInfo = pipelineInfo1;
pipeline_index = pipeIndex;
pipeline_gpu_id = gpu_id;
}

GstElement *VapdPipeline::create_element_into_pipeline(std::string element_name,int index)
{
gchar name[20] = { };
g_snprintf (name, 20, “vapd-%s-%02d”, element_name.c_str(),index);
GstElement *element = gst_element_factory_make(element_name.c_str(),name);
if (!element) {
LOG_ERROR (logger,“One element could not be created. Exiting.\n”);
return nullptr;
}
gst_bin_add(GST_BIN (pipeline), element);
return element;
}

int VapdPipeline::init()
{
gchar name[20] = { };
/* Standard GStreamer initialization */
loop = g_main_loop_new (nullptr, FALSE);

/* Create gstreamer elements /
/
Create Pipeline element that will form a connection of other elements */
g_snprintf (name, 20, “vapd-pipeline-%02d”, pipeline_index);
pipeline = gst_pipeline_new (name);

/* Create nvstreammux instance to form batches from one or more sources. */
streammux = create_element_into_pipeline (“nvstreammux”, pipeline_index);
streamdemux = create_element_into_pipeline (“nvstreamdemux”, pipeline_index);
nvvidconv = create_element_into_pipeline (“nvvidconv”, pipeline_index);

//g_object_set (G_OBJECT (nvvidconv), “gpu-id”,pipeline_gpu_id,nullptr);
//g_object_set (G_OBJECT (nvvidconv), “qos”,true,nullptr);
link_streammux();

/* we add a message handler */
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
bus_watch_id = gst_bus_add_watch (bus, bus_call, this);
// todo deletePipeline gst_object_unref (bus);

g_object_set (G_OBJECT (streammux), “width”, pipelineInfo.video_width, “height”,
pipelineInfo.video_height, “batch-size”, pipelineInfo.pipeline_channel.size()*2,
“batched-push-timeout”, MUXER_BATCH_TIMEOUT_USEC,nullptr);//“gpu-id”,pipeline_gpu_id

filter1 = gst_element_factory_make (“capsfilter”, “filter1”);
filter2 = gst_element_factory_make (“capsfilter”, “filter2”);

caps1 = gst_caps_from_string (“video/x-raw(memory:NVMM), format=NV12”);
g_object_set (G_OBJECT (filter1), “caps”, caps1, nullptr);
gst_caps_unref (caps1);
caps2 = gst_caps_from_string (“video/x-raw(memory:NVMM), format=RGBA”);
g_object_set (G_OBJECT (filter2), “caps”, caps2, nullptr);
gst_caps_unref (caps2);

/* Set up the pipeline /
/
we add all elements into the pipeline */
gst_bin_add_many (GST_BIN (pipeline),filter1, filter2, nullptr);

link_streamdemux();

/* we link the elements together

  • nvstreammux -> nvinfer -> nvtiler -> nvvidconv -> nvosd -> video-renderer */
    if (!gst_element_link_many (streammux,filter1, nvvidconv, filter2,streamdemux,
    NULL)) {
    LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]Elements could not be linked. Exiting.\n”);
    return -1;
    }

return 1;
}

gboolean
link_element_to_demux_src_pad (GstElement *demux, GstElement *elem, guint index)
{
gboolean ret = FALSE;
GstPad *demux_src_pad = NULL;
GstPad *sink_pad = NULL;
gchar pad_name[16];

g_snprintf (pad_name, 16, “src_%u”, index);
pad_name[15] = ‘\0’;

demux_src_pad = gst_element_get_request_pad (demux, pad_name);
if (!demux_src_pad) {
LOG_INFO(logger,“Failed to get sink pad from demux\n”);
goto done;
}

sink_pad = gst_element_get_static_pad (elem, “sink”);
if (!sink_pad) {
LOG_INFO(logger,“Failed to get src pad from '”<< GST_ELEMENT_NAME (elem)<<"\n");
goto done;
}

if (gst_pad_link (demux_src_pad, sink_pad) != GST_PAD_LINK_OK) {
LOG_INFO(logger,fmtString(“Failed to link ‘{}’ and ‘{}’\n”, GST_ELEMENT_NAME (demux),
GST_ELEMENT_NAME (elem)));
goto done;
}

ret = TRUE;

done:
if (demux_src_pad) {
gst_object_unref (demux_src_pad);
}
if (sink_pad) {
gst_object_unref (sink_pad);
}
return ret;
}

gboolean link_element_to_streammux_sink_pad (GstElement *streammux, GstElement *elem, gint index)
{
gboolean ret = FALSE;
GstPad *mux_sink_pad = NULL;
GstPad *src_pad = NULL;
gchar pad_name[16];

if (index >= 0) {
g_snprintf (pad_name, 16, “sink_%u”, index);
pad_name[15] = ‘\0’;
} else {
strcpy (pad_name, “sink_%u”);
}

mux_sink_pad = gst_element_get_request_pad (streammux, pad_name);
if (!mux_sink_pad) {
LOG_INFO(logger,“Failed to get sink pad from streammux\n”);
goto done;
}

src_pad = gst_element_get_static_pad (elem, “src”);
if (!src_pad) {
LOG_INFO(logger,“Failed to get src pad from '”<< GST_ELEMENT_NAME (elem)<<"\n");
goto done;
}

if (gst_pad_link (src_pad, mux_sink_pad) != GST_PAD_LINK_OK) {
LOG_INFO(logger,fmtString(“Failed to link ‘{}’ and ‘{}’\n”, GST_ELEMENT_NAME (streammux),
GST_ELEMENT_NAME (elem)));
goto done;
}

ret = TRUE;

done:
if (mux_sink_pad) {
gst_object_unref (mux_sink_pad);
}
if (src_pad) {
gst_object_unref (src_pad);
}
return ret;
}

GstElement *VapdPipeline::create_source_bin_1 (guint index, gchar * uri)
{
GstElement *bin = nullptr,*decodebin= nullptr,*source = nullptr;
gchar bin_name[16] = { };
gchar source_name[16] = { };

g_snprintf (bin_name, 15, “source-bin-%02d”, index);
g_snprintf (source_name, 15, “h264-source-%02d”, index);
/* Create a source GstBin to abstract this bin’s content from the rest of the

  • pipeline */
    bin = gst_bin_new (bin_name);

source = gst_element_factory_make (“appsrc”, source_name);
//g_object_set (G_OBJECT (source), “max-bytes”,0,“format”,4,“is-live”,true,nullptr);

decodebin = gst_element_factory_make(“decodebin”,“decode_bin”);
g_object_set (G_OBJECT (decodebin), “async-handling”,true,nullptr);
source_vector.push_back(source);
int i = 0;
for(auto pipeline_channel : pipelineInfo.pipeline_channel)
{
if(i == index)
{
VapdChannel *channel = pipeline_channel.second;
channel->setAppSourceElement(source_vector[index]);
break;
}
i++;
}

if (!bin || !decodebin || !source_vector[index]) {
LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]One element in source bin could not be created.\n”);
return NULL;
}

g_signal_connect (G_OBJECT (decodebin), “pad-added”,
G_CALLBACK (cb_newpad), bin);

gst_bin_add_many (GST_BIN (bin), source_vector[index],decodebin,NULL);
NVGSTDS_LINK_ELEMENT (source_vector[index], decodebin);

/* We need to create a ghost pad for the source bin which will act as a proxy

  • for the video decoder src pad. The ghost pad will not have a target right
  • now. Once the decode bin creates the video decoder and generates the
  • cb_newpad callback, we will set the ghost pad target to the video decoder
  • src pad. */
    if (!gst_element_add_pad (bin, gst_ghost_pad_new_no_target (“src”,
    GST_PAD_SRC))) {
    g_printerr (“Failed to add ghost pad in source bin\n”);
    return NULL;
    }

return bin;
}

GstElement *VapdPipeline::create_sink_bin (int index)
{
GstElement *bin = nullptr;
gchar bin_name[16] = { };
gchar source_name[16] = { };

g_snprintf (bin_name, 15, “source-bin-%02d”, index);
g_snprintf (source_name, 15, “h264-source-%02d”, index);
/* Create a source GstBin to abstract this bin’s content from the rest of the

  • pipeline */
    bin = gst_bin_new (bin_name);

//GstElement *queue = gst_element_factory_make (“queue”, “queue”);
GstElement *fakesink = gst_element_factory_make (“fakesink”, “fakesink”);

if (!bin || !fakesink) {
LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]One element in source bin could not be created.\n”);
return NULL;
}

gst_bin_add_many (GST_BIN (bin),fakesink,nullptr);
gst_element_link_many(fakesink,nullptr);

GstPad *pad = gst_element_get_static_pad (fakesink, “sink”);
//GstPad *sinkpad = gst_element_get_static_pad (fakesink, “sink”);
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER,
decode_pad_buffer_probe, this, NULL);
GstPad *bin_ghost_pad = gst_ghost_pad_new(“sink”, pad);
gst_pad_set_active (bin_ghost_pad, TRUE);
gst_element_add_pad (bin, bin_ghost_pad);
gst_object_unref (pad);

return bin;

}

GstElement *VapdPipeline::create_sink_queue (int index)
{
gchar fakesink_name[16] = { };
g_snprintf (fakesink_name, 15, “src_%u”, index);
gchar queue_name[16] = { };
g_snprintf (queue_name, 15, “queue_%u”, index);

GstElement *queue = gst_element_factory_make("queue",queue_name);
GstElement *fakesink = gst_element_factory_make("appsink",fakesink_name);
if (!fakesink || !queue) {
  LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streamdemux. Exiting.\n");
  return nullptr;
}
//g_object_set (G_OBJECT (queue), "max-size-buffers",20000000000,nullptr);
//g_object_set (G_OBJECT (fakesink), "async",false,"sync",false, "num-buffers",4096000000,nullptr);
g_object_set (G_OBJECT (fakesink), "async",false,nullptr);
gst_bin_add_many (GST_BIN (pipeline), queue,fakesink, nullptr);

NVGSTDS_LINK_ELEMENT(queue,fakesink);


GstPad *fakesinkpad = gst_element_get_static_pad (fakesink, "sink");
if (!fakesinkpad) {
  LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]fakesinkpad get sink pad failed. Exiting.\n");
  return nullptr;
}
else
{
    gst_pad_add_probe (fakesinkpad, GST_PAD_PROBE_TYPE_BUFFER,
    decode_pad_buffer_probe, this, NULL);
}
gst_object_unref (fakesinkpad);
return queue;

}

int VapdPipeline::link_streammux()
{
unsigned long size = pipelineInfo.pipeline_channel.size();
source_vector.reserve(size);
for (int i = 0; i < size; i++) {
//----------- for streammux ------------------
GstElement *source_bin = create_source_bin_1 (i, nullptr);
if (!source_bin) {
LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]Failed to create source bin. Exiting.\n”);
return -1;
}

gst_bin_add (GST_BIN (pipeline), source_bin);

if(!link_element_to_streammux_sink_pad(streammux,source_bin,i))
{
    LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streammux. Exiting.\n");
    return -1;
}
//---------------------------------------------

}
}

int VapdPipeline::link_streamdemux()
{
unsigned long size = pipelineInfo.pipeline_channel.size();
for (int i = 0; i < size; i++) {
//----------- for streamdemux ------------------
GstElement *sink_queue = create_sink_queue (i);
//GstElement *sink_queue = create_sink_bin(i);

    if(!sink_queue)
    {
        LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to create sink queue. Exiting.\n");
        return -1;
    }

    if(!link_element_to_demux_src_pad(streamdemux,sink_queue,i))
    {
        LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streamdemux. Exiting.\n");
        return -1;
    }

}
}

int VapdPipeline::startPipeline()
{
/* Set the pipeline to “playing” state */
GstStateChangeReturn ret2 = gst_element_set_state (pipeline, GST_STATE_PLAYING);

/* Wait till pipeline encounters an error or EOS */
LOG_INFO(logger,“VapdPipeline[”<< pipeline_index << “]is running…\n”);
g_main_loop_run (loop);

LOG_INFO(logger,“pipeline[”<< pipeline_index << “]Returned, stopping playback,Deleting pipeline\n”);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
g_source_remove (bus_watch_id);
g_main_loop_unref (loop);

return 0;
}

VapdPipeline::~VapdPipeline()
{
destoryPipeline();
delete thread_pipeline;
}

int VapdPipeline::destoryPipeline()
{
/* Out of the main loop, clean up nicely */
LOG_INFO(logger,“pipeline[”<< pipeline_index << “]Returned, stopping playback,Deleting pipeline\n”);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
g_source_remove (bus_watch_id);
g_main_loop_unref (loop);
return 0;
}

';

  demux_src_pad = gst_element_get_request_pad (demux, pad_name);
  if (!demux_src_pad) {
    LOG_INFO(logger,"Failed to get sink pad from demux\n");
    goto done;
  }

  sink_pad = gst_element_get_static_pad (elem, "sink");
  if (!sink_pad) {
    LOG_INFO(logger,"Failed to get src pad from '"<< GST_ELEMENT_NAME (elem)<<"\n");
    goto done;
  }

  if (gst_pad_link (demux_src_pad, sink_pad) != GST_PAD_LINK_OK) {
    LOG_INFO(logger,fmtString("Failed to link '{}' and '{}'\n", GST_ELEMENT_NAME (demux),
        GST_ELEMENT_NAME (elem)));
    goto done;
  }

  ret = TRUE;

done:
  if (demux_src_pad) {
    gst_object_unref (demux_src_pad);
  }
  if (sink_pad) {
    gst_object_unref (sink_pad);
  }
  return ret;
}

gboolean link_element_to_streammux_sink_pad (GstElement *streammux, GstElement *elem, gint index)
{
  gboolean ret = FALSE;
  GstPad *mux_sink_pad = NULL;
  GstPad *src_pad = NULL;
  gchar pad_name[16];

  if (index >= 0) {
    g_snprintf (pad_name, 16, "sink_%u", index);
    pad_name[15] = '

//
// Created by vapd on 19-3-19.
//

#include “vapd_pipeline_1.h”
#include <gst/gst.h>
#include <glib.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#include

#include “gstnvdsmeta.h”
#include “gstnvstreammeta.h”
#include “gst-nvmessage.h”
#include “nvbuffer.h”
#include <opencv2/opencv.hpp>
#include “logger.h”

/* Muxer batch formation timeout, for e.g. 40 millisec. Should ideally be set

  • based on the fastest source’s framerate. */
    #define MUXER_BATCH_TIMEOUT_USEC 10000

/* NVIDIA Decoder source pad memory feature. This feature signifies that source

  • pads having this capability will push GstBuffers containing cuda buffers. */
    #define GST_CAPS_FEATURES_NVMM “memory:NVMM”

#define NVGSTDS_LINK_ELEMENT(elem1, elem2)
do {
if (!gst_element_link (elem1,elem2)) {
GstCaps *src_caps, *sink_caps;
src_caps = gst_pad_query_caps ((GstPad *) (elem1)->srcpads->data, NULL);
sink_caps = gst_pad_query_caps ((GstPad *) (elem2)->sinkpads->data, NULL);
LOG_ERROR(logger,fmtString(“Failed to link ‘%s’ (%s) and ‘%s’ (%s)\n”,
GST_ELEMENT_NAME (elem1),
gst_caps_to_string (src_caps),
GST_ELEMENT_NAME (elem2),
gst_caps_to_string (sink_caps)));
}
} while (0)

#define FPS_PRINT_INTERVAL 300

static gboolean bus_call (GstBus * bus, GstMessage * msg, gpointer data)
{
VapdPipeline *vapdPipeline = (VapdPipeline *) data;
switch (GST_MESSAGE_TYPE (msg)) {
case GST_MESSAGE_EOS:
LOG_INFO(logger,“End of stream\n”);
g_main_loop_quit (vapdPipeline->loop);
break;
case GST_MESSAGE_WARNING:
{
gchar *debug;
GError *error;
gst_message_parse_warning (msg, &error, &debug);
LOG_ERROR(logger,fmtString(“WARNING from element %s: %s\n”,
GST_OBJECT_NAME (msg->src), error->message));
g_free (debug);
LOG_ERROR(logger,fmtString(“Warning: %s\n”, error->message));
g_error_free (error);
break;
}
case GST_MESSAGE_ERROR:
{
gchar *debug;
GError *error;
gst_message_parse_error (msg, &error, &debug);
LOG_ERROR(logger,fmtString(“ERROR from element {}: {}\n”,
GST_OBJECT_NAME (msg->src), error->message));
if (debug)
LOG_ERROR(logger,“VapdPipeline[”<< vapdPipeline->pipeline_index << "]Error details: "<< debug << “\n”);
g_free (debug);
g_error_free (error);
g_main_loop_quit (vapdPipeline->loop);
break;
}
case GST_MESSAGE_ELEMENT:
{
if (gst_nvmessage_is_stream_eos (msg)) {
guint stream_id;
if (gst_nvmessage_parse_stream_eos (msg, &stream_id)) {
LOG_ERROR(logger,fmtString(“Got EOS from stream {}\n”, stream_id));
}
}
break;
}
default:
break;
}
return TRUE;
}

static void cb_newpad (GstElement * decodebin, GstPad * decoder_src_pad, gpointer data)
{
GstCaps *caps = gst_pad_query_caps (decoder_src_pad, NULL);
const GstStructure *str = gst_caps_get_structure (caps, 0);
const gchar *name = gst_structure_get_name (str);
GstElement *source_bin = (GstElement *) data;
GstCapsFeatures *features = gst_caps_get_features (caps, 0);

/* Need to check if the pad created by the decodebin is for video and not

  • audio. /
    if (!strncmp (name, “video”, 5)) {
    /
    Link the decodebin pad only if decodebin has picked nvidia
    • decoder plugin nvdec_*. We do this by checking if the pad caps contain
    • NVMM memory features. /
      if (gst_caps_features_contains (features, GST_CAPS_FEATURES_NVMM)) {
      /
      Get the source bin ghost pad */
      GstPad *bin_ghost_pad = gst_element_get_static_pad (source_bin, “src”);
      if (!gst_ghost_pad_set_target (GST_GHOST_PAD (bin_ghost_pad),
      decoder_src_pad)) {
      LOG_ERROR(logger,“Failed to link decoder src pad to source bin ghost pad\n”);
      }
      gst_object_unref (bin_ghost_pad);
      } else {
      LOG_ERROR(logger,“Error: Decodebin did not pick nvidia decoder plugin.\n”);
      }
      }
      }

static GstPadProbeReturn decode_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * probe_info,
gpointer u_data) {

GstBuffer *gstbuf = (GstBuffer *)probe_info->data;
GstNvStreamMeta *streammeta = NULL;
streammeta = gst_buffer_get_nvstream_meta (gstbuf);
VapdPipeline *dpsPipeline = (VapdPipeline *)u_data;
int i = 0;
int channelIndex;
for(auto pipeline_channel : dpsPipeline->pipelineInfo.pipeline_channel)
{
	if(i == *streammeta->stream_id)
	{
	    channelIndex = pipeline_channel.first;
	}
	i++;
}
printf("ret:[%d][%d],channel:%d\n",dpsPipeline->pipeline_index,*streammeta->stream_id,channelIndex);

return GST_PAD_PROBE_OK;

}

VapdPipeline::VapdPipeline(PipelineInfo pipelineInfo1,int pipeIndex,int gpu_id)
{
pipelineInfo = pipelineInfo1;
pipeline_index = pipeIndex;
pipeline_gpu_id = gpu_id;
}

GstElement *VapdPipeline::create_element_into_pipeline(std::string element_name,int index)
{
gchar name[20] = { };
g_snprintf (name, 20, “vapd-%s-%02d”, element_name.c_str(),index);
GstElement *element = gst_element_factory_make(element_name.c_str(),name);
if (!element) {
LOG_ERROR (logger,“One element could not be created. Exiting.\n”);
return nullptr;
}
gst_bin_add(GST_BIN (pipeline), element);
return element;
}

int VapdPipeline::init()
{
gchar name[20] = { };
/* Standard GStreamer initialization */
loop = g_main_loop_new (nullptr, FALSE);

/* Create gstreamer elements /
/
Create Pipeline element that will form a connection of other elements */
g_snprintf (name, 20, “vapd-pipeline-%02d”, pipeline_index);
pipeline = gst_pipeline_new (name);

/* Create nvstreammux instance to form batches from one or more sources. */
streammux = create_element_into_pipeline (“nvstreammux”, pipeline_index);
streamdemux = create_element_into_pipeline (“nvstreamdemux”, pipeline_index);
nvvidconv = create_element_into_pipeline (“nvvidconv”, pipeline_index);

//g_object_set (G_OBJECT (nvvidconv), “gpu-id”,pipeline_gpu_id,nullptr);
//g_object_set (G_OBJECT (nvvidconv), “qos”,true,nullptr);
link_streammux();

/* we add a message handler */
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
bus_watch_id = gst_bus_add_watch (bus, bus_call, this);
// todo deletePipeline gst_object_unref (bus);

g_object_set (G_OBJECT (streammux), “width”, pipelineInfo.video_width, “height”,
pipelineInfo.video_height, “batch-size”, pipelineInfo.pipeline_channel.size()*2,
“batched-push-timeout”, MUXER_BATCH_TIMEOUT_USEC,nullptr);//“gpu-id”,pipeline_gpu_id

filter1 = gst_element_factory_make (“capsfilter”, “filter1”);
filter2 = gst_element_factory_make (“capsfilter”, “filter2”);

caps1 = gst_caps_from_string (“video/x-raw(memory:NVMM), format=NV12”);
g_object_set (G_OBJECT (filter1), “caps”, caps1, nullptr);
gst_caps_unref (caps1);
caps2 = gst_caps_from_string (“video/x-raw(memory:NVMM), format=RGBA”);
g_object_set (G_OBJECT (filter2), “caps”, caps2, nullptr);
gst_caps_unref (caps2);

/* Set up the pipeline /
/
we add all elements into the pipeline */
gst_bin_add_many (GST_BIN (pipeline),filter1, filter2, nullptr);

link_streamdemux();

/* we link the elements together

  • nvstreammux -> nvinfer -> nvtiler -> nvvidconv -> nvosd -> video-renderer */
    if (!gst_element_link_many (streammux,filter1, nvvidconv, filter2,streamdemux,
    NULL)) {
    LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]Elements could not be linked. Exiting.\n”);
    return -1;
    }

return 1;
}

gboolean
link_element_to_demux_src_pad (GstElement *demux, GstElement *elem, guint index)
{
gboolean ret = FALSE;
GstPad *demux_src_pad = NULL;
GstPad *sink_pad = NULL;
gchar pad_name[16];

g_snprintf (pad_name, 16, “src_%u”, index);
pad_name[15] = ‘\0’;

demux_src_pad = gst_element_get_request_pad (demux, pad_name);
if (!demux_src_pad) {
LOG_INFO(logger,“Failed to get sink pad from demux\n”);
goto done;
}

sink_pad = gst_element_get_static_pad (elem, “sink”);
if (!sink_pad) {
LOG_INFO(logger,“Failed to get src pad from '”<< GST_ELEMENT_NAME (elem)<<"\n");
goto done;
}

if (gst_pad_link (demux_src_pad, sink_pad) != GST_PAD_LINK_OK) {
LOG_INFO(logger,fmtString(“Failed to link ‘{}’ and ‘{}’\n”, GST_ELEMENT_NAME (demux),
GST_ELEMENT_NAME (elem)));
goto done;
}

ret = TRUE;

done:
if (demux_src_pad) {
gst_object_unref (demux_src_pad);
}
if (sink_pad) {
gst_object_unref (sink_pad);
}
return ret;
}

gboolean link_element_to_streammux_sink_pad (GstElement *streammux, GstElement *elem, gint index)
{
gboolean ret = FALSE;
GstPad *mux_sink_pad = NULL;
GstPad *src_pad = NULL;
gchar pad_name[16];

if (index >= 0) {
g_snprintf (pad_name, 16, “sink_%u”, index);
pad_name[15] = ‘\0’;
} else {
strcpy (pad_name, “sink_%u”);
}

mux_sink_pad = gst_element_get_request_pad (streammux, pad_name);
if (!mux_sink_pad) {
LOG_INFO(logger,“Failed to get sink pad from streammux\n”);
goto done;
}

src_pad = gst_element_get_static_pad (elem, “src”);
if (!src_pad) {
LOG_INFO(logger,“Failed to get src pad from '”<< GST_ELEMENT_NAME (elem)<<"\n");
goto done;
}

if (gst_pad_link (src_pad, mux_sink_pad) != GST_PAD_LINK_OK) {
LOG_INFO(logger,fmtString(“Failed to link ‘{}’ and ‘{}’\n”, GST_ELEMENT_NAME (streammux),
GST_ELEMENT_NAME (elem)));
goto done;
}

ret = TRUE;

done:
if (mux_sink_pad) {
gst_object_unref (mux_sink_pad);
}
if (src_pad) {
gst_object_unref (src_pad);
}
return ret;
}

GstElement *VapdPipeline::create_source_bin_1 (guint index, gchar * uri)
{
GstElement *bin = nullptr,*decodebin= nullptr,*source = nullptr;
gchar bin_name[16] = { };
gchar source_name[16] = { };

g_snprintf (bin_name, 15, “source-bin-%02d”, index);
g_snprintf (source_name, 15, “h264-source-%02d”, index);
/* Create a source GstBin to abstract this bin’s content from the rest of the

  • pipeline */
    bin = gst_bin_new (bin_name);

source = gst_element_factory_make (“appsrc”, source_name);
//g_object_set (G_OBJECT (source), “max-bytes”,0,“format”,4,“is-live”,true,nullptr);

decodebin = gst_element_factory_make(“decodebin”,“decode_bin”);
g_object_set (G_OBJECT (decodebin), “async-handling”,true,nullptr);
source_vector.push_back(source);
int i = 0;
for(auto pipeline_channel : pipelineInfo.pipeline_channel)
{
if(i == index)
{
VapdChannel *channel = pipeline_channel.second;
channel->setAppSourceElement(source_vector[index]);
break;
}
i++;
}

if (!bin || !decodebin || !source_vector[index]) {
LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]One element in source bin could not be created.\n”);
return NULL;
}

g_signal_connect (G_OBJECT (decodebin), “pad-added”,
G_CALLBACK (cb_newpad), bin);

gst_bin_add_many (GST_BIN (bin), source_vector[index],decodebin,NULL);
NVGSTDS_LINK_ELEMENT (source_vector[index], decodebin);

/* We need to create a ghost pad for the source bin which will act as a proxy

  • for the video decoder src pad. The ghost pad will not have a target right
  • now. Once the decode bin creates the video decoder and generates the
  • cb_newpad callback, we will set the ghost pad target to the video decoder
  • src pad. */
    if (!gst_element_add_pad (bin, gst_ghost_pad_new_no_target (“src”,
    GST_PAD_SRC))) {
    g_printerr (“Failed to add ghost pad in source bin\n”);
    return NULL;
    }

return bin;
}

GstElement *VapdPipeline::create_sink_bin (int index)
{
GstElement *bin = nullptr;
gchar bin_name[16] = { };
gchar source_name[16] = { };

g_snprintf (bin_name, 15, “source-bin-%02d”, index);
g_snprintf (source_name, 15, “h264-source-%02d”, index);
/* Create a source GstBin to abstract this bin’s content from the rest of the

  • pipeline */
    bin = gst_bin_new (bin_name);

//GstElement *queue = gst_element_factory_make (“queue”, “queue”);
GstElement *fakesink = gst_element_factory_make (“fakesink”, “fakesink”);

if (!bin || !fakesink) {
LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]One element in source bin could not be created.\n”);
return NULL;
}

gst_bin_add_many (GST_BIN (bin),fakesink,nullptr);
gst_element_link_many(fakesink,nullptr);

GstPad *pad = gst_element_get_static_pad (fakesink, “sink”);
//GstPad *sinkpad = gst_element_get_static_pad (fakesink, “sink”);
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER,
decode_pad_buffer_probe, this, NULL);
GstPad *bin_ghost_pad = gst_ghost_pad_new(“sink”, pad);
gst_pad_set_active (bin_ghost_pad, TRUE);
gst_element_add_pad (bin, bin_ghost_pad);
gst_object_unref (pad);

return bin;

}

GstElement *VapdPipeline::create_sink_queue (int index)
{
gchar fakesink_name[16] = { };
g_snprintf (fakesink_name, 15, “src_%u”, index);
gchar queue_name[16] = { };
g_snprintf (queue_name, 15, “queue_%u”, index);

GstElement *queue = gst_element_factory_make("queue",queue_name);
GstElement *fakesink = gst_element_factory_make("appsink",fakesink_name);
if (!fakesink || !queue) {
  LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streamdemux. Exiting.\n");
  return nullptr;
}
//g_object_set (G_OBJECT (queue), "max-size-buffers",20000000000,nullptr);
//g_object_set (G_OBJECT (fakesink), "async",false,"sync",false, "num-buffers",4096000000,nullptr);
g_object_set (G_OBJECT (fakesink), "async",false,nullptr);
gst_bin_add_many (GST_BIN (pipeline), queue,fakesink, nullptr);

NVGSTDS_LINK_ELEMENT(queue,fakesink);


GstPad *fakesinkpad = gst_element_get_static_pad (fakesink, "sink");
if (!fakesinkpad) {
  LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]fakesinkpad get sink pad failed. Exiting.\n");
  return nullptr;
}
else
{
    gst_pad_add_probe (fakesinkpad, GST_PAD_PROBE_TYPE_BUFFER,
    decode_pad_buffer_probe, this, NULL);
}
gst_object_unref (fakesinkpad);
return queue;

}

int VapdPipeline::link_streammux()
{
unsigned long size = pipelineInfo.pipeline_channel.size();
source_vector.reserve(size);
for (int i = 0; i < size; i++) {
//----------- for streammux ------------------
GstElement *source_bin = create_source_bin_1 (i, nullptr);
if (!source_bin) {
LOG_ERROR(logger,“VapdPipeline[”<< pipeline_index << “]Failed to create source bin. Exiting.\n”);
return -1;
}

gst_bin_add (GST_BIN (pipeline), source_bin);

if(!link_element_to_streammux_sink_pad(streammux,source_bin,i))
{
    LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streammux. Exiting.\n");
    return -1;
}
//---------------------------------------------

}
}

int VapdPipeline::link_streamdemux()
{
unsigned long size = pipelineInfo.pipeline_channel.size();
for (int i = 0; i < size; i++) {
//----------- for streamdemux ------------------
GstElement *sink_queue = create_sink_queue (i);
//GstElement *sink_queue = create_sink_bin(i);

    if(!sink_queue)
    {
        LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to create sink queue. Exiting.\n");
        return -1;
    }

    if(!link_element_to_demux_src_pad(streamdemux,sink_queue,i))
    {
        LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streamdemux. Exiting.\n");
        return -1;
    }

}
}

int VapdPipeline::startPipeline()
{
/* Set the pipeline to “playing” state */
GstStateChangeReturn ret2 = gst_element_set_state (pipeline, GST_STATE_PLAYING);

/* Wait till pipeline encounters an error or EOS */
LOG_INFO(logger,“VapdPipeline[”<< pipeline_index << “]is running…\n”);
g_main_loop_run (loop);

LOG_INFO(logger,“pipeline[”<< pipeline_index << “]Returned, stopping playback,Deleting pipeline\n”);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
g_source_remove (bus_watch_id);
g_main_loop_unref (loop);

return 0;
}

VapdPipeline::~VapdPipeline()
{
destoryPipeline();
delete thread_pipeline;
}

int VapdPipeline::destoryPipeline()
{
/* Out of the main loop, clean up nicely */
LOG_INFO(logger,“pipeline[”<< pipeline_index << “]Returned, stopping playback,Deleting pipeline\n”);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
g_source_remove (bus_watch_id);
g_main_loop_unref (loop);
return 0;
}

';
  } else {
    strcpy (pad_name, "sink_%u");
  }

  mux_sink_pad = gst_element_get_request_pad (streammux, pad_name);
  if (!mux_sink_pad) {
    LOG_INFO(logger,"Failed to get sink pad from streammux\n");
    goto done;
  }

  src_pad = gst_element_get_static_pad (elem, "src");
  if (!src_pad) {
    LOG_INFO(logger,"Failed to get src pad from '"<< GST_ELEMENT_NAME (elem)<<"\n");
    goto done;
  }

  if (gst_pad_link (src_pad, mux_sink_pad) != GST_PAD_LINK_OK) {
    LOG_INFO(logger,fmtString("Failed to link '{}' and '{}'\n", GST_ELEMENT_NAME (streammux),
        GST_ELEMENT_NAME (elem)));
    goto done;
  }

  ret = TRUE;

done:
  if (mux_sink_pad) {
    gst_object_unref (mux_sink_pad);
  }
  if (src_pad) {
    gst_object_unref (src_pad);
  }
  return ret;
}

GstElement *VapdPipeline::create_source_bin_1 (guint index, gchar * uri)
{
  GstElement *bin = nullptr,*decodebin= nullptr,*source = nullptr;
  gchar bin_name[16] = { };
  gchar source_name[16] = { };

  g_snprintf (bin_name, 15, "source-bin-%02d", index);
  g_snprintf (source_name, 15, "h264-source-%02d", index);
  /* Create a source GstBin to abstract this bin's content from the rest of the
   * pipeline */
  bin = gst_bin_new (bin_name);

  source = gst_element_factory_make ("appsrc", source_name);
  //g_object_set (G_OBJECT (source), "max-bytes",0,"format",4,"is-live",true,nullptr);

  decodebin = gst_element_factory_make("decodebin","decode_bin");
  g_object_set (G_OBJECT (decodebin), "async-handling",true,nullptr);
  source_vector.push_back(source);
  int i = 0;
  for(auto pipeline_channel : pipelineInfo.pipeline_channel)
  {
    if(i == index)
    {
        VapdChannel *channel = pipeline_channel.second;
		channel->setAppSourceElement(source_vector[index]);
		break;
    }
    i++;
  }

  if (!bin || !decodebin || !source_vector[index]) {
    LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]One element in source bin could not be created.\n");
    return NULL;
  }

  g_signal_connect (G_OBJECT (decodebin), "pad-added",
      G_CALLBACK (cb_newpad), bin);

  gst_bin_add_many (GST_BIN (bin), source_vector[index],decodebin,NULL);
  NVGSTDS_LINK_ELEMENT (source_vector[index], decodebin);

  /* We need to create a ghost pad for the source bin which will act as a proxy
   * for the video decoder src pad. The ghost pad will not have a target right
   * now. Once the decode bin creates the video decoder and generates the
   * cb_newpad callback, we will set the ghost pad target to the video decoder
   * src pad. */
  if (!gst_element_add_pad (bin, gst_ghost_pad_new_no_target ("src",
              GST_PAD_SRC))) {
    g_printerr ("Failed to add ghost pad in source bin\n");
    return NULL;
  }

  return bin;
}

GstElement *VapdPipeline::create_sink_bin (int index)
{
	GstElement *bin = nullptr;
  gchar bin_name[16] = { };
  gchar source_name[16] = { };

  g_snprintf (bin_name, 15, "source-bin-%02d", index);
  g_snprintf (source_name, 15, "h264-source-%02d", index);
  /* Create a source GstBin to abstract this bin's content from the rest of the
   * pipeline */
  bin = gst_bin_new (bin_name);

  //GstElement *queue = gst_element_factory_make ("queue", "queue");
  GstElement *fakesink = gst_element_factory_make ("fakesink", "fakesink");

  if (!bin || !fakesink) {
    LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]One element in source bin could not be created.\n");
    return NULL;
  }

  gst_bin_add_many (GST_BIN (bin),fakesink,nullptr);
  gst_element_link_many(fakesink,nullptr);

  GstPad *pad = gst_element_get_static_pad (fakesink, "sink");
  //GstPad *sinkpad = gst_element_get_static_pad (fakesink, "sink");
  gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER,
        decode_pad_buffer_probe, this, NULL);
  GstPad *bin_ghost_pad = gst_ghost_pad_new("sink", pad);
  gst_pad_set_active (bin_ghost_pad, TRUE);
  gst_element_add_pad (bin, bin_ghost_pad);
  gst_object_unref (pad);

  return bin;

}

GstElement *VapdPipeline::create_sink_queue (int index)
{
	gchar fakesink_name[16] = { };
    g_snprintf (fakesink_name, 15, "src_%u", index);
    gchar queue_name[16] = { };
    g_snprintf (queue_name, 15, "queue_%u", index);

    GstElement *queue = gst_element_factory_make("queue",queue_name);
    GstElement *fakesink = gst_element_factory_make("appsink",fakesink_name);
    if (!fakesink || !queue) {
      LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streamdemux. Exiting.\n");
      return nullptr;
    }
    //g_object_set (G_OBJECT (queue), "max-size-buffers",20000000000,nullptr);
    //g_object_set (G_OBJECT (fakesink), "async",false,"sync",false, "num-buffers",4096000000,nullptr);
    g_object_set (G_OBJECT (fakesink), "async",false,nullptr);
    gst_bin_add_many (GST_BIN (pipeline), queue,fakesink, nullptr);

    NVGSTDS_LINK_ELEMENT(queue,fakesink);


    GstPad *fakesinkpad = gst_element_get_static_pad (fakesink, "sink");
    if (!fakesinkpad) {
      LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]fakesinkpad get sink pad failed. Exiting.\n");
      return nullptr;
    }
    else
    {
        gst_pad_add_probe (fakesinkpad, GST_PAD_PROBE_TYPE_BUFFER,
        decode_pad_buffer_probe, this, NULL);
    }
    gst_object_unref (fakesinkpad);
    return queue;

}

int VapdPipeline::link_streammux()
{
    unsigned long size = pipelineInfo.pipeline_channel.size();
    source_vector.reserve(size);
	for (int i = 0; i < size; i++) {
    //----------- for streammux ------------------
    GstElement *source_bin = create_source_bin_1 (i, nullptr);
    if (!source_bin) {
      LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to create source bin. Exiting.\n");
      return -1;
    }

    gst_bin_add (GST_BIN (pipeline), source_bin);

    if(!link_element_to_streammux_sink_pad(streammux,source_bin,i))
    {
        LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streammux. Exiting.\n");
        return -1;
    }
    //---------------------------------------------

  }
}

int VapdPipeline::link_streamdemux()
{
    unsigned long size = pipelineInfo.pipeline_channel.size();
	for (int i = 0; i < size; i++) {
	    //----------- for streamdemux ------------------
	    GstElement *sink_queue = create_sink_queue (i);
	    //GstElement *sink_queue = create_sink_bin(i);

	    if(!sink_queue)
	    {
	        LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to create sink queue. Exiting.\n");
	        return -1;
	    }

	    if(!link_element_to_demux_src_pad(streamdemux,sink_queue,i))
	    {
	        LOG_ERROR(logger,"VapdPipeline["<< pipeline_index << "]Failed to link streamdemux. Exiting.\n");
	        return -1;
	    }
  }
}

int VapdPipeline::startPipeline()
{
  /* Set the pipeline to "playing" state */
  GstStateChangeReturn ret2 = gst_element_set_state (pipeline, GST_STATE_PLAYING);

  /* Wait till pipeline encounters an error or EOS */
  LOG_INFO(logger,"VapdPipeline["<< pipeline_index << "]is running...\n");
  g_main_loop_run (loop);


  LOG_INFO(logger,"pipeline["<< pipeline_index << "]Returned, stopping playback,Deleting pipeline\n");
  gst_element_set_state (pipeline, GST_STATE_NULL);
  gst_object_unref (GST_OBJECT (pipeline));
  g_source_remove (bus_watch_id);
  g_main_loop_unref (loop);


  return 0;
}

VapdPipeline::~VapdPipeline()
{
	destoryPipeline();
	delete thread_pipeline;
}

int VapdPipeline::destoryPipeline()
{
	/* Out of the main loop, clean up nicely */
  LOG_INFO(logger,"pipeline["<< pipeline_index << "]Returned, stopping playback,Deleting pipeline\n");
  gst_element_set_state (pipeline, GST_STATE_NULL);
  gst_object_unref (GST_OBJECT (pipeline));
  g_source_remove (bus_watch_id);
  g_main_loop_unref (loop);
  return 0;
}

Hi What’s the status of this problem now?