"client-added" signal issue from tcpserversink with Android SDK gstreamer 1.2
Sebastian Dröge
sebastian at centricular.com
Tue Oct 29 09:53:12 CET 2013
On Mo, 2013-10-28 at 16:32 +0100, stic at free.fr wrote:
> Hello,
>
> I migrated a program for Android from gstreamer version 0.1 to 1.2 but I still have an issue for which I cannot find a workaround.
> I am receiving "client-added" signal from a tcpserversink, to get the client ip address, where fd is the file description returned by signal.
> Following code was working fine with gstreamer 0.1, but does not work anymore with gstreamer 1.2, as the printed ip address is 0.0.0.0:
>
> struct sockaddr_in client_address;
> socklen_t client_address_len;
> client_address_len = sizeof client_address;
> gint peer = getpeername(fd, (struct sockaddr*)&client_address, &client_address_len);
> gchar *message = g_strdup_printf("New client added -> %s", inet_ntoa (client_address.sin_addr));
>
> I also tried to use directly a struct sockaddr instead of sockaddr_in but without any success, in that case the printed ip address contains wrong values.
>
> Do you have any idea of why it does not work anymore ?
You get a GSocket* passed in the client-added signal now, not a fd. You
can get the IP address or any other information you want via the GSocket
API.
--
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20131029/7f2a2c48/attachment.pgp>
More information about the gstreamer-android
mailing list