[gstreamer-bugs] [Bug 515312] [RFC] Make networking elements work on windows

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Feb 11 15:23:03 PST 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=515312

  GStreamer | gstreamer (core) | Ver: HEAD CVS




------- Comment #5 from Damien Lespiau  2008-02-11 23:23 UTC -------
Unfortunately, this code (bug #505417) won't work as is on Windows :

- select() only works on socket descriptors, so if you give, say, a pipe
descriptor to select(), it will exit with SOCKET_ERROR as return value and
WSAGetLastError() will give WSAENOTSOCK.

- What can be done without too much work: emulate socketpair() on windows by
creating 2 sockets on the loopback device, but still, gst_poll_add_fd() will
only work with sockets (as long as select will remain the heart of gst_poll on
windows).

- Option #2: try to get WaitForMultipleObjects() to work, but I never saw any
serious piece of code using it without resorting to launching a bunch of
threads waiting for a class of descriptors and I'm probably the wrong guy to
try this as my windows programming skills are not that high.

- Still, some of the above patch is needed:
* define socklen_t for windows
* inet_aton(), socketpair() replacement
* handle WSAStartup()/WSACleanup()
* #define WINVER 0x0501 to use getaddrinfo() and freeaddrinfo()
* wrappers around functions are still needed to provided BSD-like behaviour to
networking code (eg. open() returns INVALID_SOCKET on error), setting errno as
needed.

So what do you think ? should I try to get bug #505417 code to work on windows
while providing a thin layer to make the remaining networking code work too ?
Is it ok if the first GstPoll code on windows only works on sockets ?


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=515312.




More information about the Gstreamer-bugs mailing list