RTSP: how to stream individual YUV frames

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RTSP: how to stream individual YUV frames

adam255
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?

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.

Thank you,

-adam




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: RTSP: how to stream individual YUV frames

Nicolas Dufresne-5


Le sam. 13 avr. 2019 09 h 40, adam255 <[hidden email]> 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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel