Pause and resume live video with latest frames without affecting the sink

Antonio Ospite ao2 at ao2.it
Wed Aug 22 14:02:05 UTC 2018


On Wed, 22 Aug 2018 07:12:10 -0500 (CDT)
vk_gst <venkateshkuppan26 at gmail.com> wrote:

> Corrected pseudo code: 
> 
> 
> while True:
>    # apply gltransformation always - control reaches here when imagefreeze
> is inserted, however no effect on displayed video., without imagefreeze, the
> effects work.
> 
>    # if user_input == 1
>       # set drop-probability=1 for element identity to pause the video
>       # insert imagefreeze in pipeline

Shouldn't you set drop-probability=1 _after_ adding imagefreeze to let
it get at least one buffer to duplicate?

>    #if user_input == 2
>       # set drop-probability=0 for element identity to replay the video
>      # delete imagefreeze from pipeline 
> 
> 

Not sure if you have to decouple the pipeline, I've no direct
experience with that.

However from my intuitions this could solve two problems:

1. you won't stall the pipeline

2. you'd let imagefreeze still be able to get the last buffer when
you "pause" upstream.

For example, compare this pipeline:

gst-launch-1.0 videotestsrc ! \
               identity drop-probability=1 ! \
               imagefreeze ! \
               videoconvert ! rotate angle=10 ! videoconvert ! \
               fpsdisplaysink

With this pipeline:

gst-launch-1.0 videotestsrc ! \
               identity drop-probability=1 ! \
               intervideosink intervideosrc ! \
               imagefreeze ! \
               videoconvert ! rotate angle=10 ! videoconvert ! \
               fpsdisplaysink

The second one progresses (even though with drop-probability=1 set
from the beginning the last buffer is not passed to imagefreeze), while
the first one stalls.

If this works maybe you could even just pause the "src pipeline" in the
normal way without the identity hack.

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?


More information about the gstreamer-devel mailing list