<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi,<br><br></div>I am using GStreamer 1.0.<br><br></div>My GST pipeline is like that whenever their is multi-tasking between two video playing applications, I have to remove hardware components from my pipeline(mostly decoder and renderer).<br><br></div>When my application comes on foreground, I again recreate those components, sync the state of pipeline with older elements and then put the pipeline on play state.<br><br></div>Now when I remove componets, some packets gets lost which were in decoder or renderer.<br></div>When I come in foreground, my application do not send I frame because to him, it was just a pause condition. So my application just starts giving next packet, so my I frame is bit late, so it looks like video has paused before starting.<br><br></div>To improve this thing, I have stored frames between two Keyframes continously.<br><br></div>So that if my hardware components are destroyed and I again re-create them, I check what was the last keyframe that was pushed, and I again starts sending frames from last keyframe.<br><br></div>This results in no data loss, but there is one problem.<br></div>The frames move fast for a second or so.<br><br></div>This may be because clock running time is ahead of the buffer running time.(Because the time of buffer which I am sending has already elapsed, and I am sending it again).<br><br></div>So basically problem is I have not been able to make the clock running time and buffer running time as equal.<br><br></div>For this, I have to move back the clock running time.<br><br></div>I only have the PTS information of all the frames that I have with me.<br><br></div>Segment events can help solve this problem. But I am not able to make correct segment event so that this problem of video frames moving fast(possibly being dropped since clock running time is ahead).<br><br></div>Can somebody help me how can I make a correct GstSegment so that I can solve my problem.<br><br></div>Thanks in advance.<br><br></div>BR<br></div>