On Thu, 2009-06-25 at 11:07 +0300, Joonas Salo wrote:
> I want to make a plugin which stops the pipeline (and gst-launch) when
> second frame from video stream arrives. The point is to read one
> single frame from webcam. So far i succeeded with the task in a very
> crude way, by using exit() in plugin chain-function. Is there a clean
> way to do this?
The easiest way is not to do a plugin at all, but just set the
num-buffers property on the source element to 1. It will then EOS
automatically after one buffer.
If you do decide to write an element, the most correct way would
probably be to return GST_FLOW_UNEXPECTED from your chain function to
upstream when you don't want any more buffers (which should make it EOS
as well).
Cheers
-Tim
------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel