Why is the flag `GST_PAD_FLAG_EOS` set for element `v4l2src`, when the pipeline is modified dynamically?

Antonio Ospite ao2 at ao2.it
Tue Sep 4 15:39:58 UTC 2018


On Fri, 31 Aug 2018 08:11:37 -0500 (CDT)
vk_gst <venkateshkuppan26 at gmail.com> wrote:

> Hello Antonio,
> 
> Amazing debugging!!
> I would never have figured that out. 
> 
> 1. With the hack, the whole thing works now. But there is a visible delay in
> the transition from ' freeze - unfreeeze ' . The transition from ' live
> video -> freeze ' is quick and you do not notice any rough transition.   
> The application I am trying to build is intended to be more quick responsive
> in terms of (freeze-unfreeze)transition, since the camera data(source) will
> be received on a lossy  communication medium. Assuming that the camera
> operates at 30 fps, and if 3-4 frames are lost, then the time difference in
> the arrival of data might be in the range of < 150-200 ms. So I should be
> atleast targetting the switching transitions close to 150-200 ms.  Any views
> on improving this ? 
>

I looks like that flushing is enough to make the data flow again in the
case of live sources like v4l2, i.e.:

  self.pipeline.send_event(Gst.Event.new_flush_start())
  self.pipeline.send_event(Gst.Event.new_flush_stop(False))

However this does not seem to be enough for filesrc and a *seeking*
flush is needed, see the attachment here, the new XXX sections replaced
the old ones.

> 2. Not sure what you mean exactly by decoupling the pipeline. Is it
> something like using a 'tee' or a  'output-selector'. I have this idea of
> trying out the whole thing using a 'output-selector', where the
> pipeline(minimal representation for simplicity) is as follows : 
> 
>                                               | -> glimagesink
> src -> q -> output-selector ->|
>                                               | -> imagefreeze ->
> gltransformation -> glimagesink
> 
> And appropriate output switching is done, based on the user input.  
> However, I think, I would see the same behaviour with the EOS event on sink,
> once the imagefreeze is added. 
>

Let me know how this works out.

> 
> Looking forward to hearing your suggestions.
> 

I attached the example with decoupled pipelines in the old thread, it
seems the most elegant to me:
http://gstreamer-devel.966125.n4.nabble.com/Pause-and-resume-live-video-with-latest-frames-without-affecting-the-sink-td4688070i20.html#a4688288

Ciao,
   Antonio

-- 
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-dynamic-pipeline-imagefreeze.py
Type: text/x-python
Size: 6315 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180904/a5925549/attachment.py>


More information about the gstreamer-devel mailing list