<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I use “last-sample” as follows:</div><div class=""><br class=""></div><div class="">GstSample *last = NULL;</div><div class="">g_object_get(my_sink, “last-sample”, &last, NULL);</div><div class=""><br class=""></div><div class="">Then push last sample to “appsrc” with following pipeline.</div><div class=""><br class=""></div><div class="">appsrc ! videoconvert ! capsfilter ! jpegenc ! filesink </div><div class=""><br class=""></div><div class="">You could emit a signal to push sample to “appsrc” as follows:</div><div class=""><br class=""></div><div class="">GstFlowReturn ret;</div><div class="">g_signal_emit_by_name(appsrc, “push-sample”, last, &ret);</div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">--</div><div class="">Yi-Lung (Bruce) Tsai</div><div class=""><a href="mailto:wagamama.tsai@gmail.com" class="">wagamama.tsai@gmail.com</a></div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 25, 2017, at 10:10 AM, caoxi <<a href="mailto:xi.cao@intel.com" class="">xi.cao@intel.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi, do you have any examples? I haven't used last-sample before, thanks!<br class=""><br class=""><br class=""><br class="">--<br class="">View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Still-capture-implementation-in-source-plugin-tp4682674p4682792.html" class="">http://gstreamer-devel.966125.n4.nabble.com/Still-capture-implementation-in-source-plugin-tp4682674p4682792.html</a><br class="">Sent from the GStreamer-devel mailing list archive at <a href="http://nabble.com" class="">Nabble.com</a>.<br class="">_______________________________________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class="">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br class=""></div></div></blockquote></div><br class=""></body></html>