I wonder if Gstreamer plugin can do still capture while doing preview at the same time? Or even like smart phones to do preview, video recording and snapshot at the same time?
|
Le 16 avr. 2017 10:52 PM, "caoxi" <[hidden email]> a écrit : I wonder if Gstreamer plugin can do still capture while doing preview at the I have written an experiment with that, and it worked. I added a streaming mode property to the pad, in still mode, you have to call a snapshot action signal to get a frame. That also make per frame settings really easy. We also added burst with start-burt and stop-burst action signal.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks, can you help to explain how to trigger the action you mentioned to do snapshot? by calling Gstreamer APIs
|
I have done similar feature before.
My method is to get “last-sample” from videosink and then create another pipeline to save that sample to image file.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi, do you have any examples? I haven't used last-sample before, thanks!
|
In reply to this post by caoxi
Le lundi 17 avril 2017 à 19:36 -0700, caoxi a écrit :
> Thanks, can you help to explain how to trigger the action you > mentioned to do > snapshot? by calling Gstreamer APIs The action signal works like GObject signal, but instead of the object emiting to the outisde, it's outside that emits the signal to the object. You can find multiple examples of that kind of signal in GStreamer code base, here's just one: https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gs t/insertbin/gstinsertbin.c#n145 Calling an API could look like: g_signal_emit_by_name (G_OBJECT (self), "trigger-capture", NULL); regards, Nicolas _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (188 bytes) Download Attachment |
In reply to this post by caoxi
I use “last-sample” as follows: GstSample *last = NULL; g_object_get(my_sink, “last-sample”, &last, NULL); Then push last sample to “appsrc” with following pipeline. appsrc ! videoconvert ! capsfilter ! jpegenc ! filesink You could emit a signal to push sample to “appsrc” as follows: GstFlowReturn ret; g_signal_emit_by_name(appsrc, “push-sample”, last, &ret);
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |