How to decode rtsp stream with gstreamer-1.0 on GTX1060,Ubuntu16.04?

Hello,everyone:
I decoded rtsp stream from IP camera with gstreamer-1.0,but meet some errors.
System environments:Ubuntu16.04、GTX1060、gstreamer-1.8.3、cuda-9.2
First,I just the below code:

sudo rm -rf ~/.cache/gstreamer-1.0/registry.x86_64.bin

Second,

gst-launch-1.0 --gst-debug=4 -v rtspsrc location="rtsp://admin:admin12345@192.168.0.64:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 protocols=tcp latency=0" ! rtph264depay ! h264parse ! nvdec_h264 ! nvinfer ! 'video/x-raw(memory:NVMM),format=(string)NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=(string)RGBA,width=(int)1920, height=(int)1080,fFramerate=30/1' ! nvosd ! nveglglessink

Some errors happened.

gst-launch-1.0 --gst-debug=4 -v rtspsrc location="rtsp://admin:admin12345@192.168.0.64:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 protocols=tcp latency=0" ! rtph264depay ! h264parse ! nvdec_h264 ! nvinfer ! 'video/x-raw(memory:NVMM),format=(string)NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=(string)RGBA,width=(int)1920, height=(int)1080,fFramerate=30/1' ! nvosd ! nveglglessink
0:00:00.000685338  5324       0xe06920 INFO                GST_INIT gstmessage.c:119:_priv_gst_message_initialize: init messages
0:00:00.001825178  5324       0xe06920 INFO                GST_INIT gstcontext.c:83:_priv_gst_context_initialize: init contexts
0:00:00.002440383  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:316:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.002689963  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:224:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.002719723  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:226:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.002756663  5324       0xe06920 INFO            GST_REGISTRY gstregistry.c:1723:ensure_current_registry: reading registry cache: /home/chen/.cache/gstreamer-1.0/registry.x86_64.bin
0:00:00.032927861  5324       0xe06920 INFO            GST_REGISTRY gstregistrybinary.c:619:priv_gst_registry_binary_read_cache: loaded /home/chen/.cache/gstreamer-1.0/registry.x86_64.bin in 0.030134 seconds
0:00:00.033015917  5324       0xe06920 INFO            GST_REGISTRY gstregistry.c:1579:scan_and_update_registry: Validating plugins from registry cache: /home/chen/.cache/gstreamer-1.0/registry.x86_64.bin
0:00:00.033346053  5324       0xe06920 INFO            GST_REGISTRY gstregistry.c:1329:gst_registry_scan_path_level:<registry0> cached info for /usr/local/lib/libnccl.so is stale
0:00:00.113268402  5324       0xe06920 WARN            GST_REGISTRY gstregistry.c:461:gst_registry_add_plugin:<registry0> Not replacing plugin because new one (/usr/local/lib/python2.7/dist-packages/torch/lib/libnccl.so) is blacklisted but for a different location than existing one (/usr/local/lib/libnccl.so)
0:00:00.113624594  5324       0xe06920 INFO            GST_REGISTRY gstregistry.c:1690:scan_and_update_registry: Registry cache changed. Writing new registry cache
0:00:00.113633854  5324       0xe06920 INFO            GST_REGISTRY gstregistrybinary.c:368:priv_gst_registry_binary_write_cache: Building binary registry cache image
0:00:00.124605798  5324       0xe06920 INFO            GST_REGISTRY gstregistrybinary.c:400:priv_gst_registry_binary_write_cache: Writing binary registry cache
0:00:00.197305991  5324       0xe06920 INFO            GST_REGISTRY gstregistrybinary.c:261:gst_registry_binary_cache_finish: Wrote binary registry cache
0:00:00.197367035  5324       0xe06920 INFO            GST_REGISTRY gstregistry.c:1699:scan_and_update_registry: Registry cache written successfully
0:00:00.197371684  5324       0xe06920 INFO            GST_REGISTRY gstregistry.c:1758:ensure_current_registry: registry reading and updating done, result = 1
0:00:00.197377778  5324       0xe06920 INFO                GST_INIT gst.c:724:init_post: GLib runtime version: 2.48.2
0:00:00.197384155  5324       0xe06920 INFO                GST_INIT gst.c:726:init_post: GLib headers version: 2.48.2
0:00:00.197388450  5324       0xe06920 INFO                GST_INIT gst.c:727:init_post: initialized GStreamer successfully
0:00:00.197449577  5324       0xe06920 INFO            GST_PIPELINE gstparse.c:323:gst_parse_launch_full: parsing pipeline description 'rtspsrc location=rtsp://admin:admin12345@192.168.0.64:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1\ protocols=tcp\ latency=0 ! rtph264depay ! h264parse ! nvdec_h264 ! nvinfer ! video/x-raw(memory:NVMM),format=(string)NV12 ! nvvidconv ! video/x-raw(memory:NVMM),format=(string)RGBA,width=(int)1920,\ height=(int)1080,fFramerate=30/1 ! nvosd ! nveglglessink '
0:00:00.198618158  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtsp.so" loaded
0:00:00.198632219  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "rtspsrc"
0:00:00.199666744  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrmdemux.so" loaded
0:00:00.199681934  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "rtspreal"
0:00:00.199969530  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstasf.so" loaded
0:00:00.199982168  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "rtspwms"
0:00:00.200493539  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtp.so" loaded
0:00:00.200507581  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "rtph264depay"
0:00:00.200568599  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstRTPBaseDepayload@0x12360a0> adding pad 'sink'
0:00:00.200581731  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstRTPBaseDepayload@0x12360a0> adding pad 'src'
0:00:00.200898279  5324       0xe06920 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.200910597  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "h264parse"
0:00:00.200967595  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseParse@0x123d260> adding pad 'sink'
0:00:00.200980318  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseParse@0x123d260> adding pad 'src'
0:00:00.200994919  5324       0xe06920 INFO               baseparse gstbaseparse.c:3942:gst_base_parse_set_pts_interpolation:<GstH264Parse@0x123d260> PTS interpolation: no
0:00:00.204536061  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvideocodecs.so" loaded
0:00:00.204550932  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "nvdec_h264"
0:00:00.204632393  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstVideoDecoder@0x110eba0> adding pad 'sink'
0:00:00.204647458  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstVideoDecoder@0x110eba0> adding pad 'src'
0:00:00.262797858  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvinfer.so" loaded
0:00:00.262813657  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "nvinfer"
0:00:00.262927032  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x146a640> adding pad 'sink'
0:00:00.262937675  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x146a640> adding pad 'src'
0:00:00.262945597  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad (null):sink
0:00:00.263198944  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvvidconv.so" loaded
0:00:00.263206243  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "nvvidconv"
0:00:00.263249400  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x147bbe0> adding pad 'sink'
0:00:00.263257700  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x147bbe0> adding pad 'src'
0:00:00.263549666  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnvosd.so" loaded
0:00:00.263557243  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "nvosd"
0:00:00.263600257  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x147ecd0> adding pad 'sink'
0:00:00.263608766  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x147ecd0> adding pad 'src'
0:00:00.264340263  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnveglglessink.so" loaded
0:00:00.264348791  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "nveglglessink"
0:00:00.264431610  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseSink@0x14c6f00> adding pad 'sink'
0:00:00.264457190  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "pipeline"
0:00:00.264501453  5324       0xe06920 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstRTSPSrc named rtspsrc0 to some pad of GstRtpH264Depay named rtph264depay0 (0/0) with caps "(NULL)"
0:00:00.264511835  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element rtspsrc0:(any) to element rtph264depay0:(any)
0:00:00.264525553  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:904:gst_element_get_static_pad: no such pad 'stream_%u' in element "rtspsrc0"
0:00:00.264531176  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1124:gst_element_get_compatible_pad:<rtspsrc0> Could not find a compatible pad to link to rtph264depay0:sink
0:00:00.264535343  5324       0xe06920 INFO                 default gstutils.c:1962:gst_element_link_pads_filtered: Could not link pads: rtspsrc0:(null) - rtph264depay0:(null)
0:00:00.264542873  5324       0xe06920 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstRtpH264Depay named rtph264depay0 to some pad of GstH264Parse named h264parse0 (0/0) with caps "(NULL)"
0:00:00.264550502  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element rtph264depay0:(any) to element h264parse0:(any)
0:00:00.264556130  5324       0xe06920 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link rtph264depay0:src and h264parse0:sink
0:00:00.264563888  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<h264parse0:src> pad has no peer
0:00:00.264569876  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: rtph264depay0 and h264parse0 in same bin, no need for ghost pads
0:00:00.264577289  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link rtph264depay0:src and h264parse0:sink
0:00:00.264584083  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<h264parse0:src> pad has no peer
0:00:00.264588611  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked rtph264depay0:src and h264parse0:sink, successful
0:00:00.264593664  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.264597846  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<rtph264depay0:src> Received event on flushing pad. Discarding
0:00:00.264603880  5324       0xe06920 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstH264Parse named h264parse0 to some pad of GstNvcuvidH264Dec named nvcuvidh264dec0 (0/0) with caps "(NULL)"
0:00:00.264610532  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element h264parse0:(any) to element nvcuvidh264dec0:(any)
0:00:00.264615793  5324       0xe06920 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link h264parse0:src and nvcuvidh264dec0:sink
0:00:00.264622422  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvcuvidh264dec0:src> pad has no peer
0:00:00.264638891  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: h264parse0 and nvcuvidh264dec0 in same bin, no need for ghost pads
0:00:00.264645495  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link h264parse0:src and nvcuvidh264dec0:sink
0:00:00.264652091  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvcuvidh264dec0:src> pad has no peer
0:00:00.264661591  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked h264parse0:src and nvcuvidh264dec0:sink, successful
0:00:00.264666628  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.264670651  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<h264parse0:src> Received event on flushing pad. Discarding
0:00:00.264676664  5324       0xe06920 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstNvcuvidH264Dec named nvcuvidh264dec0 to some pad of GstNvInfer named nvinfer0 (0/0) with caps "(NULL)"
0:00:00.264686179  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element nvcuvidh264dec0:(any) to element nvinfer0:(any)
0:00:00.264693115  5324       0xe06920 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link nvcuvidh264dec0:src and nvinfer0:sink
0:00:00.264702977  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvinfer0:src> pad has no peer
0:00:00.264717205  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: nvcuvidh264dec0 and nvinfer0 in same bin, no need for ghost pads
0:00:00.264723970  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link nvcuvidh264dec0:src and nvinfer0:sink
0:00:00.264730886  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvinfer0:src> pad has no peer
0:00:00.264738874  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked nvcuvidh264dec0:src and nvinfer0:sink, successful
0:00:00.264744020  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.264747833  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<nvcuvidh264dec0:src> Received event on flushing pad. Discarding
0:00:00.264753180  5324       0xe06920 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstNvInfer named nvinfer0 to some pad of Gstnvvidconv named nvvidconv0 (0/0) with caps "video/x-raw(memory:NVMM), format=(string)NV12"
0:00:00.264960335  5324       0xe06920 INFO      GST_PLUGIN_LOADING gstplugin.c:842:_priv_gst_plugin_load_file_for_registry: plugin "/usr/local/lib/gstreamer-1.0/libgstcoreelements.so" loaded
0:00:00.264967252  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "capsfilter"
0:00:00.264997633  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x14d02b0> adding pad 'sink'
0:00:00.265006128  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x14d02b0> adding pad 'src'
0:00:00.265012818  5324       0xe06920 INFO              GST_STATES gstbin.c:1915:gst_bin_get_state_func:<pipeline0> getting state
0:00:00.265022081  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to NULL
0:00:00.265029053  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.265036465  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element nvinfer0:(any) to element capsfilter0:sink
0:00:00.265042261  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:sink
0:00:00.265046409  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: nvinfer0 and capsfilter0 in same bin, no need for ghost pads
0:00:00.265052786  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link nvinfer0:src and capsfilter0:sink
0:00:00.265067586  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<capsfilter0:src> pad has no peer
0:00:00.265073402  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked nvinfer0:src and capsfilter0:sink, successful
0:00:00.265078356  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.265082135  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<nvinfer0:src> Received event on flushing pad. Discarding
0:00:00.265087846  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element capsfilter0:src to element nvvidconv0:(any)
0:00:00.265092909  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter0:src
0:00:00.265097386  5324       0xe06920 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link capsfilter0:src and nvvidconv0:sink
0:00:00.265110344  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvvidconv0:src> pad has no peer
0:00:00.265141118  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: capsfilter0 and nvvidconv0 in same bin, no need for ghost pads
0:00:00.265147727  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter0:src and nvvidconv0:sink
0:00:00.265161311  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvvidconv0:src> pad has no peer
0:00:00.265184696  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter0:src and nvvidconv0:sink, successful
0:00:00.265189591  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.265193226  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<capsfilter0:src> Received event on flushing pad. Discarding
0:00:00.265198706  5324       0xe06920 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of Gstnvvidconv named nvvidconv0 to some pad of GstNvOsd named nvosd0 (0/0) with caps "video/x-raw(memory:NVMM), format=(string)RGBA, width=(int)1920, height=(int)1080, fFramerate=(fraction)30/1"
0:00:00.265211060  5324       0xe06920 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:364:gst_element_factory_create: creating element "capsfilter"
0:00:00.265220278  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x14d05e0> adding pad 'sink'
0:00:00.265227427  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:659:gst_element_add_pad:<GstBaseTransform@0x14d05e0> adding pad 'src'
0:00:00.265233684  5324       0xe06920 INFO              GST_STATES gstbin.c:1915:gst_bin_get_state_func:<pipeline0> getting state
0:00:00.265241017  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter1> completed state change to NULL
0:00:00.265246281  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.265250711  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element nvvidconv0:(any) to element capsfilter1:sink
0:00:00.265255616  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter1:sink
0:00:00.265259822  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: nvvidconv0 and capsfilter1 in same bin, no need for ghost pads
0:00:00.265265261  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link nvvidconv0:src and capsfilter1:sink
0:00:00.265291086  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<capsfilter1:src> pad has no peer
0:00:00.265298367  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked nvvidconv0:src and capsfilter1:sink, successful
0:00:00.265303200  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.265306707  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<nvvidconv0:src> Received event on flushing pad. Discarding
0:00:00.265311695  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element capsfilter1:src to element nvosd0:(any)
0:00:00.265316458  5324       0xe06920 INFO        GST_ELEMENT_PADS gstelement.c:907:gst_element_get_static_pad: found pad capsfilter1:src
0:00:00.265320826  5324       0xe06920 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link capsfilter1:src and nvosd0:sink
0:00:00.265346840  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvosd0:src> pad has no peer
0:00:00.265354936  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: capsfilter1 and nvosd0 in same bin, no need for ghost pads
0:00:00.265360303  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link capsfilter1:src and nvosd0:sink
0:00:00.265384969  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<nvosd0:src> pad has no peer
0:00:00.265392634  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked capsfilter1:src and nvosd0:sink, successful
0:00:00.265397238  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.265401069  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<capsfilter1:src> Received event on flushing pad. Discarding
0:00:00.265406294  5324       0xe06920 INFO            GST_PIPELINE grammar.y:596:gst_parse_perform_link: linking some pad of GstNvOsd named nvosd0 to some pad of GstEglGlesSink named eglglessink0 (0/0) with caps "(NULL)"
0:00:00.265412680  5324       0xe06920 INFO        GST_ELEMENT_PADS gstutils.c:1573:gst_element_link_pads_full: trying to link element nvosd0:(any) to element eglglessink0:(any)
0:00:00.265417589  5324       0xe06920 INFO                GST_PADS gstutils.c:932:gst_pad_check_link: trying to link nvosd0:src and eglglessink0:sink
0:00:00.265461238  5324       0xe06920 INFO                GST_PADS gstutils.c:1446:prepare_link_maybe_ghosting: nvosd0 and eglglessink0 in same bin, no need for ghost pads
0:00:00.265467610  5324       0xe06920 INFO                GST_PADS gstpad.c:2315:gst_pad_link_prepare: trying to link nvosd0:src and eglglessink0:sink
0:00:00.265507485  5324       0xe06920 INFO                GST_PADS gstpad.c:2521:gst_pad_link_full: linked nvosd0:src and eglglessink0:sink, successful
0:00:00.265512790  5324       0xe06920 INFO               GST_EVENT gstevent.c:1382:gst_event_new_reconfigure: creating reconfigure event
0:00:00.265516368  5324       0xe06920 INFO               GST_EVENT gstpad.c:5634:gst_pad_send_event_unchecked:<nvosd0:src> Received event on flushing pad. Discarding
Setting pipeline to PAUSED ...
0:00:00.265544866  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<eglglessink0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269371923  5324       0xe06920 INFO             egladaption ext/eglgles/gstegladaptation_egl.c:175:gst_egl_adaptation_init_display:<eglglessink0> System reports supported EGL version v1.4
0:00:00.269469067  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<eglglessink0> completed state change to READY
0:00:00.269475809  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<eglglessink0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269486472  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'eglglessink0' changed state to 2(READY) successfully
0:00:00.269496090  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvosd0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269502414  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvosd0> completed state change to READY
0:00:00.269506168  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvosd0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269511822  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvosd0' changed state to 2(READY) successfully
0:00:00.269517360  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter1> current NULL pending VOID_PENDING, desired next READY
0:00:00.269522190  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter1> completed state change to READY
0:00:00.269525825  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter1> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269531060  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter1' changed state to 2(READY) successfully
0:00:00.269536269  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvidconv0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269541194  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvidconv0> completed state change to READY
0:00:00.269544700  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvidconv0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269549730  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvidconv0' changed state to 2(READY) successfully
0:00:00.269555076  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269559678  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to READY
0:00:00.269563122  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269569207  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 2(READY) successfully
0:00:00.269574972  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvinfer0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269580757  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvinfer0> completed state change to READY
0:00:00.269583877  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvinfer0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269589148  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvinfer0' changed state to 2(READY) successfully
0:00:00.269594727  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvcuvidh264dec0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269600011  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvcuvidh264dec0> completed state change to READY
0:00:00.269603613  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvcuvidh264dec0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269608247  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvcuvidh264dec0' changed state to 2(READY) successfully
0:00:00.269613741  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<h264parse0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269618798  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<h264parse0> completed state change to READY
0:00:00.269622301  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<h264parse0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269626956  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'h264parse0' changed state to 2(READY) successfully
0:00:00.269632091  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<rtph264depay0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269636954  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<rtph264depay0> completed state change to READY
0:00:00.269640532  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<rtph264depay0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269645536  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'rtph264depay0' changed state to 2(READY) successfully
0:00:00.269651129  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<rtspsrc0> current NULL pending VOID_PENDING, desired next READY
0:00:00.269663841  5324       0xe06920 INFO                    task gsttask.c:451:gst_task_set_lock: setting stream lock 0x11c55a8 on task 0x14f9050
0:00:00.269674521  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<rtspsrc0> completed state change to READY
0:00:00.269678831  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<rtspsrc0> notifying about state-changed NULL to READY (VOID_PENDING pending)
0:00:00.269684774  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'rtspsrc0' changed state to 2(READY) successfully
0:00:00.269690709  5324       0xe06920 INFO              GST_STATES gstelement.c:2347:gst_element_continue_state:<pipeline0> committing state from NULL to READY, pending PAUSED, next PAUSED
0:00:00.269695480  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<pipeline0> notifying about state-changed NULL to READY (PAUSED pending)
0:00:00.269711830  5324       0xe06920 INFO              GST_STATES gstelement.c:2354:gst_element_continue_state:<pipeline0> continue state change READY to PAUSED, final PAUSED
0:00:00.269721738  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<eglglessink0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.269770787  5324       0xe06920 INFO              GST_STATES gstbin.c:2770:gst_bin_change_state_func:<pipeline0> child 'eglglessink0' is changing state asynchronously to PAUSED
0:00:00.269778759  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvosd0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.362344999  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvosd0> completed state change to PAUSED
0:00:00.362360415  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvosd0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.362372988  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvosd0' changed state to 3(PAUSED) successfully
0:00:00.362383200  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter1> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.362391471  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter1> completed state change to PAUSED
0:00:00.362395775  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter1> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.362404056  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter1' changed state to 3(PAUSED) successfully
0:00:00.362410069  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvvidconv0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.362440860  5324       0xe06920 INFO                GST_PADS gstpad.c:4098:gst_pad_peer_query:<rtph264depay0:sink> pad has no peer
0:00:00.362512347  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<nvvidconv0> completed state change to PAUSED
0:00:00.362518988  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<nvvidconv0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.362525594  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'nvvidconv0' changed state to 3(PAUSED) successfully
0:00:00.362531387  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<capsfilter0> current READY pending VOID_PENDING, desired next PAUSED
0:00:00.362537134  5324       0xe06920 INFO              GST_STATES gstelement.c:2372:gst_element_continue_state:<capsfilter0> completed state change to PAUSED
0:00:00.362540533  5324       0xe06920 INFO              GST_STATES gstelement.c:2277:_priv_gst_element_state_changed:<capsfilter0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:00.362549407  5324       0xe06920 INFO              GST_STATES gstbin.c:2764:gst_bin_change_state_func:<pipeline0> child 'capsfilter0' changed state to 3(PAUSED) successfully
0:00:00.362556327  5324       0xe06920 INFO              GST_STATES gstbin.c:2316:gst_bin_element_set_state:<nvinfer0> current READY pending VOID_PENDING, desired next PAUSED
>>> Generating new GIE model cache
Using FP32 data type.
could not open file

How to slove this problem? Thanks for you in advance!

Hi,

  1. Do you have an option of trying to decode the bitstream using the samples released in video codec SDK without bringing the gstreamer in to picture?
  2. In the log it seems there is no issue in cuvidxxx related functions. Please point to specific failures related to cuvidxxx exposed in Video Codec SDK?

Thanks,
Ryan Park

Hi,rypark
I directly decode rtsp stream using below code.

gst-launch-1.0 rtspsrc location="rtsp://admin:admin12345@192.168.0.64:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 protocols=tcp latency=0" ! rtph264depay ! h264parse ! nvdec_h264 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=(string)NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=(string)RGBA,width=(int)1920, height=(int)1080,fFramerate=30/1' ! nvosd ! nveglglessink

Worked well!

Then, I changed this file deepstream_test1_app.c in Deepstream2.0(/xx/DeepStream_Release/sources/apps/deepstream-test1/deepstream_test1_app.c), and test Deepstream samples with this code.

The below code is deepstream_test1_app.c.

/*
 * Copyright (c) 2018 NVIDIA Corporation.  All rights reserved.
 *
 * NVIDIA Corporation and its licensors retain all intellectual property
 * and proprietary rights in and to this software, related documentation
 * and any modifications thereto.  Any use, reproduction, disclosure or
 * distribution of this software and related documentation without an express
 * license agreement from NVIDIA Corporation is strictly prohibited.
 *
 */

#include <gst/gst.h>
#include <glib.h>

#include "gstnvdsmeta.h"

#define MAX_DISPLAY_LEN 64

#define PGIE_CLASS_ID_VEHICLE 0
#define PGIE_CLASS_ID_PERSON 2

gint frame_number = 0;
gchar pgie_classes_str[4][32] = { "Vehicle", "TwoWheeler", "Person",
  "Roadsign"
};

/* osd_sink_pad_buffer_probe  will extract metadata received on OSD sink pad
 * and update params for drawing rectangle, object information etc. */

static GstPadProbeReturn
osd_sink_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
    gpointer u_data)
{

  GstMeta *gst_meta = NULL;
  NvDsMeta *nvdsmeta = NULL;
  gpointer state = NULL;
  static GQuark _nvdsmeta_quark = 0;
  GstBuffer *buf = (GstBuffer *) info->data;
  NvDsFrameMeta *frame_meta = NULL;
  guint num_rects = 0, rect_index = 0, l_index = 0;
  NvDsObjectParams *obj_meta = NULL;
  guint i = 0;
  NvOSD_TextParams *txt_params = NULL;
  guint vehicle_count = 0;
  guint person_count = 0;

  if (!_nvdsmeta_quark)
    _nvdsmeta_quark = g_quark_from_static_string (NVDS_META_STRING);

  while ((gst_meta = gst_buffer_iterate_meta (buf, &state))) {
    if (gst_meta_api_type_has_tag (gst_meta->info->api, _nvdsmeta_quark)) {

      nvdsmeta = (NvDsMeta *) gst_meta;

      /* We are interested only in intercepting Meta of type
       * "NVDS_META_FRAME_INFO" as they are from our infer elements. */
      if (nvdsmeta->meta_type == NVDS_META_FRAME_INFO) {
        frame_meta = (NvDsFrameMeta *) nvdsmeta->meta_data;
        if (frame_meta == NULL) {
          g_print ("NvDS Meta contained NULL meta \n");
          return GST_PAD_PROBE_OK;
        }

        /* We reset the num_strings here as we plan to iterate through the
         *  the detected objects and form our own strings.
         *  The pipeline generated strings shall be discarded.
         */
        frame_meta->num_strings = 0;

        num_rects = frame_meta->num_rects;

        /* This means we have num_rects in frame_meta->obj_params,
         * now lets iterate through them */

        for (rect_index = 0; rect_index < num_rects; rect_index++) {
          /* Now using above information we need to form a text that should
           * be displayed on top of the bounding box, so lets form it here. */

          obj_meta = (NvDsObjectParams *) & frame_meta->obj_params[rect_index];

          txt_params = &(obj_meta->text_params);
          if (txt_params->display_text)
            g_free (txt_params->display_text);

          txt_params->display_text = g_malloc0 (MAX_DISPLAY_LEN);

          g_snprintf (txt_params->display_text, MAX_DISPLAY_LEN, "%s ",
              pgie_classes_str[obj_meta->class_id]);

          if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE)
            vehicle_count++;
          if (obj_meta->class_id == PGIE_CLASS_ID_PERSON)
            person_count++;

          /* Now set the offsets where the string should appear */
          txt_params->x_offset = obj_meta->rect_params.left;
          txt_params->y_offset = obj_meta->rect_params.top - 25;

          /* Font , font-color and font-size */
          txt_params->font_params.font_name = "Arial";
          txt_params->font_params.font_size = 10;
          txt_params->font_params.font_color.red = 1.0;
          txt_params->font_params.font_color.green = 1.0;
          txt_params->font_params.font_color.blue = 1.0;
          txt_params->font_params.font_color.alpha = 1.0;

          /* Text background color */
          txt_params->set_bg_clr = 1;
          txt_params->text_bg_clr.red = 0.0;
          txt_params->text_bg_clr.green = 0.0;
          txt_params->text_bg_clr.blue = 0.0;
          txt_params->text_bg_clr.alpha = 1.0;

          frame_meta->num_strings++;
        }
      }
    }
  }
  g_print ("Frame Number = %d Number of objects = %d "
      "Vehicle Count = %d Person Count = %d\n",
      frame_number, num_rects, vehicle_count, person_count);
  frame_number++;

  return GST_PAD_PROBE_OK;
}

static gboolean
bus_call (GstBus * bus, GstMessage * msg, gpointer data)
{
  GMainLoop *loop = (GMainLoop *) data;
  switch (GST_MESSAGE_TYPE (msg)) {
    case GST_MESSAGE_EOS:
      g_print ("End of stream\n");
      g_main_loop_quit (loop);
      break;
    case GST_MESSAGE_ERROR:{
      gchar *debug;
      GError *error;
      gst_message_parse_error (msg, &error, &debug);
      g_printerr ("ERROR from element %s: %s\n",
          GST_OBJECT_NAME (msg->src), error->message);
      g_free (debug);
      g_printerr ("Error: %s\n", error->message);
      g_error_free (error);
      g_main_loop_quit (loop);
      break;
    }
    default:
      break;
  }
  return TRUE;
}

int
main (int argc, char *argv[])
{
  GMainLoop *loop = NULL;
  GstElement *pipeline = NULL, *source = NULL,*h264depay = NULL, *h264parser =
      NULL,*decoder = NULL, *sink = NULL, *pgie = NULL, *nvvidconv1 =
      NULL, *nvvidconv2 = NULL, *nvosd = NULL, *filter1 = NULL, *filter2 = NULL;
  GstBus *bus = NULL;
  guint bus_watch_id;
  GstCaps *caps1 = NULL, *caps2 = NULL;
  gulong osd_probe_id = 0;
  GstPad *osd_sink_pad = NULL;

  /* Check input arguments */
  if (argc != 2) {
    g_printerr ("Usage: %s <rtsp stream>\n", argv[0]);
    return -1;
  }

  /* Standard GStreamer initialization */
  gst_init (&argc, &argv);
  loop = g_main_loop_new (NULL, FALSE);

  /* Create gstreamer elements */
  /* Create Pipeline element that will form a connection of other elements */
  pipeline = gst_pipeline_new ("dstest1-pipeline");

  /* Source element for reading from rtsp stream */
  source = gst_element_factory_make ("rtspsrc", "rtsp-stream");

  /* Since the data format in the rtsp stream is elementary h264 stream,
   * we need a h264depay*/
  h264depay = gst_element_factory_make ("rtph264depay", "h264-depay");

  /* we need a h264parser */
  h264parser = gst_element_factory_make ("h264parse", "h264-parser");

  /* Use nvdec_h264 for hardware accelerated decode on GPU */
  decoder = gst_element_factory_make ("nvdec_h264", "nvh264-decoder");

  /* Use nvinfer to run inferencing on decoder's output,
   * behaviour of inferencing is set through config file */
  pgie = gst_element_factory_make ("nvinfer", "primary-nvinference-engine");

  /* Use convertor to convert from NV12 to RGBA as required by nvosd */
  nvvidconv1 = gst_element_factory_make ("nvvidconv", "nvvideo-converter");

  nvvidconv2 = gst_element_factory_make ("nvvidconv", "nvvideo-converter");

  /* Create OSD to draw on the converted RGBA buffer */
  nvosd = gst_element_factory_make ("nvosd", "nv-onscreendisplay");

  /* Finally render the osd output */
  sink = gst_element_factory_make ("nveglglessink", "nvvideo-renderer");

  /* caps filter for nvvidconv to convert NV12 to RGBA as nvosd expects input
   * in RGBA format */
  filter1 = gst_element_factory_make ("capsfilter", "filter1");
  filter2 = gst_element_factory_make ("capsfilter", "filter2");
  if (!pipeline || !source || !h264depay || !h264parser || !decoder || !pgie
      || !filter1 || !nvvidconv2 || !filter2 || !nvosd || !sink) {
    g_printerr ("One element could not be created. Exiting.\n");
    return -1;
  }

  /* we set the input filename to the source element */
  g_object_set (G_OBJECT (source), "location", argv[1], NULL);

  /* Set all the necessary properties of the nvinfer element,
   * the necessary ones are : */
  printf("start!\n");
  g_object_set (G_OBJECT (pgie),
      "config-file-path", "dstest1_pgie_config.txt", NULL);

  /* we set the osd properties here */
  g_object_set (G_OBJECT (nvosd), "font-size", 15, NULL);

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

  /* Set up the pipeline */
  /* we add all elements into the pipeline */
  gst_bin_add_many (GST_BIN (pipeline),
      source,h264depay, h264parser, decoder, pgie, nvvidconv1,
      filter1, nvvidconv2, filter2, nvosd, sink, NULL);
  //gst_bin_add_many (GST_BIN (pipeline),
  //    source,h264depay, h264parser, decoder, pgie,
  //    filter1, nvvidconv2, filter2, nvosd, sink, NULL);
  caps1 = gst_caps_from_string ("video/x-raw(memory:NVMM), format=(string)NV12");
  g_object_set (G_OBJECT (filter1), "caps", caps1, NULL);
  gst_caps_unref (caps1);
  caps2 = gst_caps_from_string ("video/x-raw, format=(string)RGBA,width=(int)1920,height=(int)1080,fFramerate=30/1");
  g_object_set (G_OBJECT (filter2), "caps", caps2, NULL);
  gst_caps_unref (caps2);

  /* we link the elements together */
  /* rtsp-stream -> h264-depay -> h264-parser -> nvh264-decoder ->
   * nvinfer -> nvvidconv1 -> filter1 -> nvvidconv2 -> filter2 -> nvosd -> video-renderer */
  gst_element_link_many (source,h264depay, h264parser, decoder, pgie, nvvidconv1, filter1,
      nvvidconv2, filter2, nvosd, sink, NULL);
  //gst_element_link_many (source,h264depay, h264parser, decoder, pgie, filter1,
  //    nvvidconv2, filter2, nvosd, sink, NULL);

  /* Lets add probe to get informed of the meta data generated, we add probe to
   * the sink pad of the osd element, since by that time, the buffer would have
   * had got all the metadata. */
  osd_sink_pad = gst_element_get_static_pad (nvosd, "sink");
  if (!osd_sink_pad)
    g_print ("Unable to get sink pad\n");
  else
    osd_probe_id = gst_pad_add_probe (osd_sink_pad, GST_PAD_PROBE_TYPE_BUFFER,
        osd_sink_pad_buffer_probe, NULL, NULL);

  /* Set the pipeline to "playing" state */
  g_print ("Now playing: %s\n", argv[1]);
  gst_element_set_state (pipeline, GST_STATE_PLAYING);

  /* Wait till pipeline encounters an error or EOS */
  g_print ("Running...\n");
  g_main_loop_run (loop);

  /* Out of the main loop, clean up nicely */
  g_print ("Returned, stopping playback\n");
  gst_element_set_state (pipeline, GST_STATE_NULL);
  g_print ("Deleting pipeline\n");
  gst_object_unref (GST_OBJECT (pipeline));
  g_source_remove (bus_watch_id);
  g_main_loop_unref (loop);
  return 0;


}

I make and run it.

./deepstream-test1-app "rtsp://admin:sdses12345@192.168.0.54:554/Stre
aming/Channels/101?transportmode=unicast&profile=Profile_1 protocols=tcp latency=0"

some errors happened.

./deepstream-test1-app "rtsp://admin:sdses12345@192.168.0.54:554/Stre
aming/Channels/101?transportmode=unicast&profile=Profile_1 protocols=tcp latency=0"
start!

(deepstream-test1-app:18873): GStreamer-WARNING **: Name 'nvvideo-converter' is not unique in bin 'dstest1-pipeline', not adding
Now playing: rtsp://admin:sdses12345@192.168.0.54:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1 protocols=tcp latency=0
>>> Generating new GIE model cache
Current device doesn't support FP16, back to FP32

 ***** Storing Cache File as /home/chen/projects/DeepStream_Release/samples/models/Primary_Detector/resnet10.caffemodel_b1_fp32.cache batchsize = 1 *****

Running...
ERROR from element udpsrc0: Internal data flow error.
Error: Internal data flow error.
Returned, stopping playback
Segmentation fault (core dumped)

How to solve this problem? Thanks for you in advance!

https://blog.csdn.net/quantum7/article/details/82151637
this code can work with one camera.
But, when I use two camera, it dumped…