<p dir="ltr">So,</p>
<p dir="ltr">Assuming you didn't do any mistake, what you have now is buffer in pipeline 2 that are really late. To be able to play those the way you do you'll have to set pipeline 1 latency on your pipeline 2 appsrc. As you have multiple branches in pipeline 1, you'll be to implement do-latency signal, so you submit on appsink early, and render late enough to be on sync whit pipeline 2 sink. Make sure appsrc is set to live mode.</p>
<div class="gmail_quote">Le 16 juin 2016 5:21 PM, "Jake Zhang" <<a href="mailto:zjpseudo@gmail.com">zjpseudo@gmail.com</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Greetings,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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: </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">pipeline1:</div><div style="font-size:12.8px">v4l2src -> tee -> x264enc -> appsink1  </div><div style="font-size:12.8px">             ->  appsink2</div><div style="font-size:12.8px">                 </div><div style="font-size:12.8px">RTSP server pipeline2: </div><div style="font-size:12.8px">appsrc -> omxh264enc -> rtph264pay</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Pipeline 1 have other processing unit and I will need pull buffers from appsink2 and push those buffers into appsrc of RTSP server. </div><div style="font-size:12.8px">My RTSP server part of implementation is very similar to test-appsrc.c of gst-rtsp-server 1.6.4. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">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. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have went through the gstreamer manual and I have some basic understanding about running time/ base time and stream time </div><div style="font-size:12.8px">I have tried below things:</div><div style="font-size:12.8px">1. set the basetime of pipeline2 to be the same as pipeline1</div><div style="font-size:12.8px">2. set the start time of pipeline2 to be GST_CLOCK_TIME_NONE</div><div style="font-size:12.8px">3. make sure the two pipeline is using the same clock. </div><div style="font-size:12.8px">4. I have checked the segment event on the appsrc of pipeline2 and the value is as below, and I have tried generate a new segment to appsrc sink pad but I have a hard time know how to set the right base and start value. </div><div style="font-size:12.8px">//appsrc0:src segment: rate 1 format 3, start: 0:00:00.000000000, stop: 99:99:99.999999999, time: 0:00:00.000000000 base: 0:00:00.000000000</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Why I have to re-stamp the PTS of the buffer?  <br></div><div style="font-size:12.8px">pipeline2 running time = clocktime - basetime of pipeline1, so pipeline2 should be able to process buffers with original PTS, right? </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">How I can  retain the original buffer PTS in pipeline2? I guess segment event is the right direction to go, but like I said I have not figure out how to play with segment to let pipeline2 happy with original PTS. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks in advance for any comments here.</div></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div>