problem with pts in an appsrc

Clarke, Trevor tclarke at ball.com
Sun Apr 26 15:52:21 PDT 2015


I'm having some issues with synchronization. My app contains a number of bins with tcpserversrc elements processing video (prepping and h.264 encoding) which feed into an mpegtsmux and then out to files. The other end of each sub-pipeline is another app on different systems performing live capture into an appsrc, through a gdppay, and then to the tcpclientsink. I'm trying to get all the video streams properly synchronized into the mpeg-ts container and I think I don't quite have the hang of how to setup the clocks, etc. When I start a single video src everything is great but when I start another, one or both of them will hang up and it appears to be because the PTS values aren't lining up. I'd like the mpeg-ts stream (and component streams) to reflect wall clock time since these are live sources. Here's a summary of the relevant bits:

Right after creating the GstPipeline elements in each src and in the muxer process I do:
GstClock* pClock = gst_system_clock_obtain();
g_object_set(pSysCloc, "clock-type", GST_CLOCK_TYPE_REALTIME, NULL));
gst_pipeline_use_clock(pPipeline, pSysClock);
gst_object_unref(pClock);

I have "do-timestamp" set to TRUE in all the appsrc's (alternately, I tried setting it on the tcpserversrc's instead) and I only set the duration and offset (with an increasing frame counter) no each frame buffer. I've also tried setting the PTS to the current gst_clock_get_time(pSysclock). Neither seems to work.

Hopefully someone can help me out with this issue.
----------------------
Trevor R.H. Clarke
Software Engineer, Ball Aerospace
(937)320-7087




This message and any enclosures are intended only for the addressee.  Please 
notify the sender by email if you are not the intended recipient.  If you are 
not the intended recipient, you may not use, copy, disclose, or distribute this 
message or its contents or enclosures to any other person and any such actions 
may be unlawful.  Ball reserves the right to monitor and review all messages 
and enclosures sent to or from this email address.


More information about the gstreamer-devel mailing list