How to make v4l2src reload buffer in PAUSED state
nicolas at ndufresne.ca
Fri Aug 14 20:16:58 UTC 2020
Le vendredi 14 août 2020 à 18:14 +0000, David Walter a écrit :
> Thanks Nicolas.
> I was trying to send the flush_start and flush_stop using the following but wasn’t having luck getting new images from v4l2src (num-buffers=1)
> gst_element_send_event(GST_ELEMENT(pipeline), gst_new_event_flush_start());
> gst_element_send_event(GST_ELEMENT(pipeline), gst_new_event_flush_stop(false));
> Is this correct? Am I supposed to send this event to the pipeline object or the v4l2src object?
Perhaps the num-buffers counter is not reset on flush-start/stop, you
would have to check the code in GstBaseSrc.
> > To follow your design, you'd simply need to send two events into the
> > pipeline, flush-start followed by flush-stop event. You'll have to bump
> > multifilesink index each time othewise the index is also reset by the
> > flush (and file will
> > Now, why this is not idea is because while streaming, cameras run
> > algorithm to improve image quality. Meaning that the very first image
> > is not always in the best possible shape of what you camera can do.
> > What applications open do, is build a pipeline with a "view finder" / a
> > live preview of the image. And then can capture images on demand using
> > "last-sample" property and gst_video_convert_sample() API. Or, for more
> > advance usage, mais use a tee and other sinks, notably appsink.
> > Nicolas
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
More information about the gstreamer-devel