Problem of sync between multiple pipeline and meaning of PTS and DTS

이병헌 byunghun.lee at fainders.ai
Thu Aug 26 09:45:13 UTC 2021


Hi, I’m new on gstreamer now
And my first language is not an English
So if my questions are not good to be understood I would say sorry first..

Anyway now I’m trying to make application that need function of synchronize buffers between multiple pipeline
So I’m trying to sync those buffers by Lockstep method with their timestamp value in those buffers
But there have three problem

This is my pipeline blueprint

rtspsrc ! h265depay ! av_dech265 ! videoscale ! videoconvert ! caps-filter ! queue ! videoscale ! tensor_converter ! tensor_filter ! tensor_sink —— get buffer from sink by callback and put buffers to — > Ring buffer - - \
! rtspsrc ! h265depay ! av_dech265 ! videoscale ! videoconvert ! caps-filter ! queue ! videoscale ! tensor_converter ! tensor_filter ! tensor_sink —— get buffer from sink by callback and put buffers to — > Ring buffer —- - > lockstep sync —> some association logics ...
! rtspsrc ! h265depayl ! av_dech265 ! videoscale ! videoconvert ! caps-filter ! queue ! videoscale ! tensor_converter ! tensor_filter ! tensor_sink —— get buffer from sink by callback and put buffers to — > Ring buffer —/
 
First , PTS is not wall clock time or ntp time
Second, DTS value is always -1
Third, when I check pts values at source element, pts values are always increment. But when I check my ring buffer element, some value of pts are decrease between adjacent buffer, this mean order of input buffer can be shuffled while streaming

So.. my questions are these

1. How to get wall clock PTS value from rtsp packets in gstreamer?
2. Meaning of DTS value -1
3. Is it possible to get different order of buffer from input buffer order at some elements in pipeline? If can, then do I have to sort those buffers with their timestamp with some priority queue rather than ring buffer ?

Sorry for writing that hard to understand 
and I would give more inform if it is not enough to answer

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210826/be5e7580/attachment.htm>


More information about the gstreamer-devel mailing list