How to synchronize buffer timestamp across two gstreamer pipeline(appsink,appsrc, rtspserver)
Jake Zhang
zjpseudo at gmail.com
Sun Jun 19 14:27:45 UTC 2016
Hi Nicolas, setting offset on appsrc solved my issue. I really appreciate
your input.
On Sat, Jun 18, 2016 at 11:27 AM, Nicolas Dufresne <
nicolas.dufresne at gmail.com> wrote:
> Le jeudi 16 juin 2016 à 17:05 -0400, Jake Zhang a écrit :
> > Greetings,
> >
> > I have been working on this for a while but still have no luck to get
> > this working. My pipeline can be simplified as below:
> >
> > pipeline1:
> > v4l2src -> tee -> x264enc -> appsink1
> > -> appsink2
> >
> > RTSP server pipeline2:
> > appsrc -> omxh264enc -> rtph264pay
> >
> > Pipeline 1 have other processing unit and I will need pull buffers
> > from appsink2 and push those buffers into appsrc of RTSP server.
> > My RTSP server part of implementation is very similar to test-
> > appsrc.c of gst-rtsp-server 1.6.4.
> >
> > The buffer I got from appsink already has their own PTS and to get
> > RTSP pipeline2 running, I have to re-stamp the buffer PTS the exactly
> > same way as test-appsrc.c (set ctx->timestamp=0 and increment based
> > of buffer duration) otherwise, the RTSP server will not get running.
>
> You don't, you can use push_sample(), so the segment is passed. And
> then, on the first buffer, you can compute the running time of this
> buffer (gst_segment_to_running_time()), and set the appsrc pad offset
> to -running_time_first_pts. Careful, that if you add audio, you should
> use the same offset for all stream, otherwise you will break a/v sync.
>
> regards,
> Nicolas
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160619/8d72d30b/attachment.html>
More information about the gstreamer-devel
mailing list