Compositor + valve issues

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compositor + valve issues

mariannasb
Hi,

I have the following pipeline:

v4l2src ! tee name=t1 ! queue ! valve drop=1 ! videocrop ! tee name=t2 ! queue ! compositor name=comp ! ... ! udpsink t2. ! queue ! ... ! comp.

I open the valve and set it to PLAYING: all works fine.
Then I close the valve (and dont change the pipeline state, I want to keep it playing): but the compositor keeps using the last 2 received buffers to output to the udpsink.

Is that a bug?
Reply | Threaded
Open this post in threaded view
|

Re: Compositor + valve issues

Nicolas Dufresne-3
Le vendredi 12 février 2016 à 06:18 -0800, mariannasb a écrit :

> v4l2src ! tee name=t1 ! queue ! valve drop=1 ! videocrop ! tee
> name=t2 !
> queue ! compositor name=comp ! ... ! udpsink t2. ! queue ! ... !
> comp.
>
> I open the valve and set it to PLAYING: all works fine.
> Then I close the valve (and dont change the pipeline state, I want to
> keep
> it playing): but the compositor keeps using the last 2 received
> buffers to
> output to the udpsink.
>
> Is that a bug?
No, compositor in live will use a timeout to produce frame. Apparently
it mixes with the last received frame of each pads. Seems the easiest
thing to do, as the mixer can handle mixing multiple video streams that
run at different framerate. If is expected that the frames from the
slowest stream may be used multiple time in the rendering.

What did you expect for you use case ? Could we improve this element to
cover your use case ?

cheers,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compositor + valve issues

mariannasb
> > v4l2src ! tee name=t1 ! queue ! valve drop=1 ! videocrop ! tee
> > name=t2 !
> > queue ! compositor name=comp ! ... ! udpsink t2. ! queue ! ... !
> > comp.
> >
> > I open the valve and set it to PLAYING: all works fine.
> > Then I close the valve (and dont change the pipeline state, I want to
> > keep
> > it playing): but the compositor keeps using the last 2 received
> > buffers to
> > output to the udpsink.
> >
> > Is that a bug?
> No, compositor in live will use a timeout to produce frame. Apparently
> it mixes with the last received frame of each pads. Seems the easiest
> thing to do, as the mixer can handle mixing multiple video streams that
> run at different framerate. If is expected that the frames from the
> slowest stream may be used multiple time in the rendering.

> What did you expect for you use case ? Could we improve this element to
> cover your use case ?

I don't really need to mix different framerates, so what I would like is to only use each input frame once, and dont output anything if there are no new frames coming in.

I'm actually not really using the compositor itself, I have tried to make my own component by copying it and modifying it slightly: I want to mix 2 frames, the buffer from one and the metadata from the other (they both originate from the same source, I have done some image processing on the second one in order to generate some metadata which I want to be able to append back into the "original" frame).

I have also posted this message (http://gstreamer-devel.966125.n4.nabble.com/How-to-write-a-simple-mux-element-td4675816.html#a4675835) because I wasn't sure if using the "compositor" was the right way to achieve what I wanted...