Get NTP and RTP timestamp using rtspsrc

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Get NTP and RTP timestamp using rtspsrc

pasifus
Hi devs,

I looking for simple way to get NTP and RTP timestamps from RTCP package
using *rtspsrc*.

I listen in gstrtspsrc.c and found that it open second pipe for RTCP using
*rtpsession* so I'm looking for way to get it session using  *rtspsrc*
element (without changes in gstreamer/plugins)

Or may somebody know more simple way?

Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Get NTP and RTP timestamp using rtspsrc

Nicolas Dufresne-5
Le mardi 30 juin 2020 à 13:13 -0500, pasifus a écrit :

> Hi devs,
>
> I looking for simple way to get NTP and RTP timestamps from RTCP package
> using *rtspsrc*.
>
> I listen in gstrtspsrc.c and found that it open second pipe for RTCP using
> *rtpsession* so I'm looking for way to get it session using  *rtspsrc*
> element (without changes in gstreamer/plugins)
>
> Or may somebody know more simple way?

The rtspsrc does not depayload the RTP packets (not package). You can
add your own filter or use a pad probe to inspect these packets. The
GstRTPBuffer API is really handly to map and read the content of an RTP
packet. In this API you'll find gst_rtp_hdrext_get_ntp_*() functions
(assuming you have that header extension)
and gst_rtp_buffer_get_timestamp() to read the RTP timestamp, which is
always present.

>
> Thanks
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Get NTP and RTP timestamp using rtspsrc

pasifus
Nicolas,
Thanks for replay.

To be clear. If you mean for depayload the RTCP package and not RTP package
from *rtspsrc* element?
The API have GstRTPBuffer and GstRTCPBuffer so I'm interesting for get  "NTP
and RTP timestamps from RTCP package".
GstRtphdrext is RTP header extensions so not all RTP source support it. Is
this correct?
gst_rtp_buffer_get_timestamp() - is return absolute host time  (unix
timestamp) or relative?

Is any way (example/link) handle to *rtspsrc* buffer for get all packages
for filter?

Thanks you a lot.





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Get NTP and RTP timestamp using rtspsrc

pasifus
So after research in gstrtspsrc.c I found dirty hack for casting rtspsrc
element and check if udpsrc[1] is exist and use a pad probe to inspect
packets from this element.

Thanks for help



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel