<div dir="ltr"><div><div class="im">> On Sa, 2013-10-26 at 23:49 -0200, Adrian Pardini wrote:<br>>
> On 25 October 2013 06:44, Andrei Melnikov <<a href="mailto:andy.melnikov@gmail.com">andy.melnikov@gmail.com</a>> wrote:<br>>
> > I load the pipeline using gst_parse_launch(), set it to PLAYING and seek by<br>>
> > passing the pipeline bin to gst_element_seek_simple(). The code works fine<br>>
> > with simple pipelines playing a file, but the pipeline above refuses to<br>>
> > seek. It sort of seeks, but with glitches and gst_element_seek_simple()<br>>
> > returns FALSE.<br>>
><br>>
> Hi Andrei, after a while trying to achieve the same I've resorted to<br>>
> have a main pipeline for the live sources and a second one for the<br>>
> file content linking both with a pair of interaudio and intervideo<br>>
> sink and src's.<br>>
</div>> basically you want to seek on the file<br>>
based pipeline while letting the live pipeline continue running, right?<br><br></div><div>Correct.<br></div><div><br>>
So you should only send a seek to the file based part of the pipeline.<br></div><div>
<br>> You would need to adapt<br>>
the segment event coming from the file based pipeline into videomixer to<br>>
make sure that the buffers after the seek would have a running time that<br>>
is just a continuation of the previous buffers.<br><br></div><div>How do I do that? gst_event_new_new_segment() and gst_pad_push_event()? There is not much documentation.<br><br></div><div>Do I need to get current running time and arrange a seek at some point in the future?<br>
<br>What if I want to disable the recorded stream or to switch to another file? <br></div><div><br></div><div>
> By using the inter elements you make the file based pipeline a live<br>> stream too, which solves all these problems for you. It is not the<br>> optimal solution though and has some downsides, but if it works fine for<br>
> you just keep it ;)<br><br>Unlike Adrian I don't have any existing code so I'd like to go the right way (tm).<br><br><br><br><br>
<span class=""><font color="#888888"><br></font></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 27 October 2013 21:51, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sa, 2013-10-26 at 23:49 -0200, Adrian Pardini wrote:<br>
> On 25 October 2013 06:44, Andrei Melnikov <<a href="mailto:andy.melnikov@gmail.com">andy.melnikov@gmail.com</a>> wrote:<br>
> > I load the pipeline using gst_parse_launch(), set it to PLAYING and seek by<br>
> > passing the pipeline bin to gst_element_seek_simple(). The code works fine<br>
> > with simple pipelines playing a file, but the pipeline above refuses to<br>
> > seek. It sort of seeks, but with glitches and gst_element_seek_simple()<br>
> > returns FALSE.<br>
><br>
> Hi Andrei, after a while trying to achieve the same I've resorted to<br>
> have a main pipeline for the live sources and a second one for the<br>
> file content linking both with a pair of interaudio and intervideo<br>
> sink and src's.<br>
><br>
> Hope that helps but I'd also like to hear the opinion of more<br>
> knowledgeable people.<br>
<br>
</div>I think that's a valid approach for this. The main question here is how<br>
you want everything to behave, basically you want to seek on the file<br>
based pipeline while letting the live pipeline continue running, right?<br>
So you should only send a seek to the file based part of the pipeline.<br>
<br>
As videomixer mixes both streams according to their running times, you<br>
need to make sure that those still align after the seek. A flushing seek<br>
would ensure that the running time of the file based pipeline would<br>
start again at 0, which is not what you want. You would need to adapt<br>
the segment event coming from the file based pipeline into videomixer to<br>
make sure that the buffers after the seek would have a running time that<br>
is just a continuation of the previous buffers.<br>
<br>
<br>
By using the inter elements you make the file based pipeline a live<br>
stream too, which solves all these problems for you. It is not the<br>
optimal solution though and has some downsides, but if it works fine for<br>
you just keep it ;)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge <<a href="mailto:sebastian@centricular.com">sebastian@centricular.com</a>><br>
Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br>
Expertise, Straight from the Source<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Andrei
</div>