"client-added" signal issue from tcpserversink with Android SDK gstreamer 1.2

stic at free.fr stic at free.fr
Mon Oct 28 16:32:12 CET 2013


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 ?

Thank you.


More information about the gstreamer-android mailing list