<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 13 avr. 2019 09 h 40, adam255 <<a href="mailto:shunguang@yahoo.com">shunguang@yahoo.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello GStreamer-developers,<br>
<br>
I am new to this field, and  I have a problem to encode and transmit<br>
real-time YUV420 images produced  by another thread and stored in device<br>
(GPU) memory with x264 codec format. <br>
<br>
I found an example at<br>
<a href="http://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c" rel="noreferrer noreferrer" target="_blank">http://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c</a><br>
<<a href="http://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c" rel="noreferrer noreferrer" target="_blank">http://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c</a>>  <br>
But it transmits a video file with g_main_loop, are there any examples to<br>
use a for-loop to do the frame-by- frame process? <br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">For frame-by-frame processing, ideally you write a filter element and place it in your pipeline. Other options are pad-probes or appsink.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
BTW, my system is developed by C++, I prefer to wrap this task into a new<br>
thread: whenever there is a new frame in its input queue, the RTSP encodes<br>
and transmits it, otherwise it just goes to sleep.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">GStreamer pipelines already run their own threads. To avoid the mainloop, you should use the GstBus API with the pipeline bus.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you,<br>
<br>
-adam<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>