Segment event problem
Deepak Jain
jain1982 at gmail.com
Sun Dec 20 15:36:13 PST 2015
Hi,
I am using GStreamer 1.0.
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).
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.
Now when I remove componets, some packets gets lost which were in decoder
or renderer.
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.
To improve this thing, I have stored frames between two Keyframes
continously.
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.
This results in no data loss, but there is one problem.
The frames move fast for a second or so.
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).
So basically problem is I have not been able to make the clock running time
and buffer running time as equal.
For this, I have to move back the clock running time.
I only have the PTS information of all the frames that I have with me.
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).
Can somebody help me how can I make a correct GstSegment so that I can
solve my problem.
Thanks in advance.
BR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151221/633dfaab/attachment.html>
More information about the gstreamer-devel
mailing list