UDP and custom GSockets
debruyn
debruynels1 at gmail.com
Wed Apr 20 06:09:53 UTC 2016
Good day,
So I have been sitting with an issue for a while. The system I am developing
uses UDP elements (UDPSink and UDPSrc) to send an rtsp stream over a
network. Now the issue is I only have ONE port that I can use on the UDPSrc
side(Client side). I have multiple UDPSinks, from differant hosts. I need to
differentiate between the incoming pipes that are set up by the hosts.
Multicasting the addreses does work but it is not a valid solution as the
client will be on a webserver somewhere in the world. As multicast address
will most likely then be dropped on route to the client web server.
So I want to implement my own sockets on the UDP elements, as i think this
is the only solution. on the hosts I have set up my UDPSinks as follows
(Using C++ 11):
GSocket * socketUDP = g_socket_new(G_SOCKET_FAMILY_IPV4,
G_SOCKET_TYPE_DATAGRAM, G_SOCKET_PROTOCOL_UDP, NULL);
g_object_set (G_OBJECT (gstSink), "socket", socketUDP, NULL);
/*Set the sink elements' properties*/
g_object_set(gstSink,"host",moProfileInstance->getMediaLocation(),"port",moProfileInstance->getHostPort(miCamNumber),
"bind-address",moProfileInstance->getSrcIP(miCamNumber),"bind-port",moProfileInstance->getSrcPort(miCamNumber),
NULL);
Now how can I access that same socket on the client side with UDPSrc, The
idea is that i want to use the Source IP and Source Port addresses of the
incoming connection. Please any help would be much appreciated
regards,
debruyn
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/UDP-and-custom-GSockets-tp4677008.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list