how to use an already open and bound socket for gst_rstp_server

Philippe De Muyter phdm at macq.eu
Mon May 28 07:14:46 UTC 2018


On Sat, May 26, 2018 at 10:05:37AM -0400, Nicolas Dufresne wrote:
> Le samedi 26 mai 2018 à 10:13 +0200, Philippe De Muyter a écrit :
> > On Fri, May 25, 2018 at 06:36:31PM -0400, Nicolas Dufresne wrote:
> > > Le ven. 25 mai 2018 15:27, Philippe De Muyter <phdm at macq.eu> a
> > > écrit :
> > > 
> > > > Hi,
> > > > 
> > > > I would like to start a gst_rtsp_server on a already open and
> > > > bound socket,
> > > > known only by its file descriptor.
> > > > 
> > > > Any info on how to achieve that would be greatly appreciated
> > > > 
> > > 
> > > See gst_rtsp_server_transfer_connection() for this.
> > > 
> > > https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-rtsp-
> > > server/html/GstRTSPServer.html#gst-rtsp-server-transfer-connection
> > > 
> > > 
> > 
> > I had already found that, but it does not match my needs.  My socket
> > would
> > only be open and bound, but without any incoming connection, just
> > after
> > 
> > 	fd = socket(...);
> > 	bind(fd, ...);
> 
> I see, then you could use a GSocketListener on the side, or implement a
> method the server library. Note that listening on a server socket has
> nothing RTSP specific.

Would it be OK to add a 'gst_rtsp_server_set_fd' function and modify the
behaviour of 'gst_rtsp_server_create_socket' to use 'g_socket_new_from_fd'
instead of 'g_socket_new' + 'g_socket_bind' if 'gst_rtsp_server_set_fd'
has been called before ?

Philippe


More information about the gstreamer-devel mailing list