RTSP: how to stream individual YUV frames

Nicolas Dufresne nicolas at ndufresne.ca
Sat Apr 13 13:58:38 UTC 2019


Le sam. 13 avr. 2019 09 h 40, adam255 <shunguang at yahoo.com> a écrit :

> Hello GStreamer-developers,
>
> I am new to this field, and  I have a problem to encode and transmit
> real-time YUV420 images produced  by another thread and stored in device
> (GPU) memory with x264 codec format.
>
> I found an example at
>
> http://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c
> <
> http://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c>
>
> But it transmits a video file with g_main_loop, are there any examples to
> use a for-loop to do the frame-by- frame process?
>

For frame-by-frame processing, ideally you write a filter element and place
it in your pipeline. Other options are pad-probes or appsink.


> BTW, my system is developed by C++, I prefer to wrap this task into a new
> thread: whenever there is a new frame in its input queue, the RTSP encodes
> and transmits it, otherwise it just goes to sleep.
>

GStreamer pipelines already run their own threads. To avoid the mainloop,
you should use the GstBus API with the pipeline bus.


> Thank you,
>
> -adam
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190413/ddc474cd/attachment.html>


More information about the gstreamer-devel mailing list