Seeking a pipeline with live streams
Andrei Melnikov
andy.melnikov at gmail.com
Fri Dec 6 20:57:35 PST 2013
On 29 October 2013 10:48, Sebastian Dröge <sebastian at centricular.com> wrote:
> (I'm going to answer this for 1.0 now, things are different in 0.10)
>
> For the simple case where you just seek on the non-live part of the
> pipeline you could either
> 1) add a pad probe on the srcpad before the videomixer sinkpad and
> intercept the SEGMENT event and adjust segment.base or
> 2) set the "offset" property on the pad
>
> This should be set to the running time of that stream before the seek,
> basically to the time to which the first buffer after the seek should be
> synchronized to (which is approximately the same as the running time of
> the live stream at that time).
>
How do I modify the segment? I add a probe with gst_pad_add_probe and
then I can get an Event * by using gst_pad_probe_info_get_event ().
But then documentation for gst_event_parse_segment () says I shouldn't
modify the segment in place. Am I supposed to somehow stop the old
event from propagation and push a new event using gst_pad_push_event?
What is the difference between gst_pad_set_event_function_full () and
pad probes with GST_PAD_PROBE_TYPE_EVENT_BOTH flag set?
The "offset" approach is simpler but doesn't work.
Currently I call gst_element_seek_simple () with Segment and KeyUnit
flags on avdec element in non-live part and call gst_pad_set_offset()
to change offset.
I also query position on avdec element and position seems never going
to 0 after the seek so I suppose I do something wrong. Should I
disconnect the non-live part before seeking it?
--
Andrei
More information about the gstreamer-devel
mailing list