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

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Feb 18 06:40:06 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 #7 from Damien Lespiau  2008-02-18 14:40 UTC -------
Well, I managed to get the time to merge the patch above with GstPoll. The
result looks promising, I got udpsrc working like a charm.

So :

C:\test-gstpoll\bin>gst-launch-0.10.exe -v
--gst-plugin-path=c:\test-gstpoll\lib\gstreamer-0.10 --gst-debug-no-color 
udpsrc uri="udp://239.1.2.3:1234" ! flutsdemux ! ffdec_mpeg2video ! queue !
ffmpegcolorspace ! directdrawsink sync=0
works as intended.


Changes :



gstreamer



* merged bug #505417 and bug #515312. in short #515312 defines a layer to be
make various Unix and POSIX calls have the expected behaviour on widows while
#505417 abstracts a waiting loop.

gstpoll (bug #505417)



* include gst/windows/gstwindows.h in gstpoll.h:

        - wraps close(), socketpair() for windows builds

        - struct pollfd & POLL* defines

        - on Windows, current code will use select() to wait. On windows
select() only works with socket descriptors.
This has the side effect to make the gstpoll patch depend on #515312


*  FD_SETSIZE is defined to 64 in my mingw headers, and windows socket
descriptors are allocated with numbers above FD_SETSIZE. So the check pfd->fd <
FD_SIZE is not valid on windows. */





gstwindows (bug #515312)


* add support for gstpoll (struct pollfd, POLL* defines)

* fix send -> gst_win_net_send macro

* enable building gstreamer/libs/gst/net on windows



gst-plugins-base


* merge of gst/sdp

* gst/tcp: bug #515312 still needs work to make this stuff compile, so I still
didn't enable it for win32. obviously It's not a regression as this code never
worked on windows



gst-plugins-good


* merged udpsrc.c udpsrc.h


Open questions & known issues:




* (gstpoll.c) should we add an AC_CHECK_HEADERS for sys/poll.h ?

* (windows/gstwin-common.h) I need to define WINVER to 0x0501 to have
getaddrinfo() and freeaddrinfo() as

those functions are only defined from WinXP and above. We probably should code
replacement to be able

to compile GStreamer for windows 2000

* I spread the code over 8 files, would you prefer having a couple of file ie.
gstsysdeps-win.[ch] instead ?


Overview

$ diffstat gstreamer-winsocks-gstpoll-v1.patch

 configure.ac                      |   19

 docs/gst/gstreamer-docs.sgml      |    2

 docs/gst/gstreamer-sections.txt   |   29 +

 gst/Makefile.am                   |   15

 gst/gst.h                         |    1

 gst/gst_private.h                 |    4

 gst/gstinfo.c                     |    8

 gst/gstpoll.c                     | 1009
++++++++++++++++++++++++++++++++++++++

 gst/gstpoll.h                     |   97 +++

 gst/windows/Makefile.am           |   22

 gst/windows/gstwin-common.h       |  126 ++++

 gst/windows/gstwin-fd.c           |  166 ++++++

 gst/windows/gstwin-fd.h           |   48 +

 gst/windows/gstwin-libcmisc.c     |   55 ++

 gst/windows/gstwin-libcmisc.h     |   35 +

 gst/windows/gstwin-networking.c   |  594 ++++++++++++++++++++++

 gst/windows/gstwin-networking.h   |  118 ++++

 gst/windows/gstwindows.h          |   31 +

 libs/gst/Makefile.am              |    4

 libs/gst/net/Makefile.am          |    2

 libs/gst/net/gstnetclientclock.c  |  163 +-----

 libs/gst/net/gstnetclientclock.h  |   11

 libs/gst/net/gstnettimeprovider.c |  142 +----

 libs/gst/net/gstnettimeprovider.h |   12

 plugins/elements/gstfdsink.c      |  108 +---

 plugins/elements/gstfdsink.h      |    2

 plugins/elements/gstfdsrc.c       |   99 +--

 plugins/elements/gstfdsrc.h       |    2

 tests/check/Makefile.am           |    1

 tests/check/gst/gstpoll.c         |  369 +++++++++++++

 30 files changed, 2925 insertions(+), 369 deletions(-)





$ diffstat gst-base-winsocks-gstpoll-v1.patch

 gst-libs/gst/riff/riff-read.c         |   10

 gst-libs/gst/rtsp/gstrtspconnection.c |  377 ++++++------------------

 gst-libs/gst/rtsp/gstrtspconnection.h |    6

 gst-libs/gst/sdp/gstsdpmessage.c      |    2

 gst/tcp/Makefile.am                   |    8

 gst/tcp/fdsetstress.c                 |  179 -----------

 gst/tcp/gstfdset.c                    |  532
----------------------------------

 gst/tcp/gstfdset.h                    |   68 ----

 gst/tcp/gstmultifdsink.c              |  124 +------

 gst/tcp/gstmultifdsink.h              |   11

 gst/tcp/gsttcp.c                      |   66 +---

 gst/tcp/gsttcp.h                      |   10

 gst/tcp/gsttcpclientsink.c            |   21 -

 gst/tcp/gsttcpclientsink.h            |    2

 gst/tcp/gsttcpclientsrc.c             |   63 +---

 gst/tcp/gsttcpclientsrc.h             |    4

 gst/tcp/gsttcpserversink.c            |   20 -

 gst/tcp/gsttcpserversink.h            |    2

 gst/tcp/gsttcpserversrc.c             |  136 +++-----

 gst/tcp/gsttcpserversrc.h             |    6

 20 files changed, 269 insertions(+), 1378 deletions(-)



$ diffstat gst-good-winsocks-gstpoll-v1.patch

 Makefile.am       |    4 -

 gstdynudpsink.c   |   10 +-

 gstdynudpsink.h   |   17 ++++

 gstmultiudpsink.c |   17 +++-

 gstmultiudpsink.h |   16 ++++

 gstudp.c          |    5 -

 gstudpnetutils.c  |   62 ----------------

 gstudpnetutils.h  |   77 ---------------------

 gstudpsink.h      |    1

 gstudpsrc.c       |  198
++++++++++++++----------------------------------------

 gstudpsrc.h       |   40 ++++++----

 11 files changed, 127 insertions(+), 320 deletions(-)


-- 
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