Issue with Getting NTP Timestamp in Deepstream

[Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) T4
• DeepStream Version Deepstream 5.1

https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_NTP_Timestamp.html

I was following the steps in this posting for how to get NTP timestamps when attached to an RTSP source, but I am having some issues with the step involving modifying the deepstream_source_bin.c file. The documentation says to call configure_source_for_ntp_sync() function and pass the GstElement pointer into it, and I can see that in the deepstream_source_bin.c file, this method is only called in the create_rtsp_src_bin() function. Should I only modify this function by adding a GstElement parameter as another method parameter to pass into configure_source_for_ntp_sync(), or should I be calling configure_source_for_ntp_sync() in a different method? I am a little bit lost here, thank you!

Hi @olnuckolls , When you create the src_elem (rtsp src or uridecodebin src), just call the configure_source_for_ntp_sync( src_elem ).

This is in the same deepstream_source_bin.c file, right? Because as far as I can tell, it is already called.

I think I understand now, am I correct in changing

bin->src_elem = gst_element_factory_make (“rtspsrc”, elem_name);

to

bin->src_elem = configure_source_for_ntp_sync(gst_element_factory_make (“rtspsrc”, elem_name));

at the start of the create_rtsp_src_bin() method?

=====>This is in the same deepstream_source_bin.c file, right? Because as far as I can tell, it is already called.
Yeah, it is already called. So the rstp src stream should have NTP timestamp without any change. If you want to write a new plugin with rtsp soure, you can refer it.
=====>at the start of the create_rtsp_src_bin() method?
No, you can’t change the code as that. You can see the definition of the function in nvdsgstutils.h file. The return type is void.

void configure_source_for_ntp_sync (GstElement *src_elem);

So what steps would I have to take to write a new plugin with rtsp source? Thank you for all the help!

About how to write a new plugin, you can refer the following link:
https://gstreamer.freedesktop.org/documentation/plugin-development/basics/boiler.html?gi-language=c

There is no update from you for a period, assuming this is not an issue anymore.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.