After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 520671 - GstPoll needs to be ported to Windows
GstPoll needs to be ported to Windows
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal blocker
: 0.10.18
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-06 05:30 UTC by Ole André Vadla Ravnås
Modified: 2008-03-08 11:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Alpha version barely sufficient for 'hello world' with udpsrc (11.00 KB, patch)
2008-03-06 05:39 UTC, Ole André Vadla Ravnås
none Details | Review
First take on GstPoll Windows support (15.68 KB, patch)
2008-03-07 00:03 UTC, Ole André Vadla Ravnås
none Details | Review
gstpoll_win32_support (15.76 KB, patch)
2008-03-07 12:14 UTC, Ole André Vadla Ravnås
none Details | Review
gstpoll_win32_support (16.14 KB, patch)
2008-03-07 12:38 UTC, Ole André Vadla Ravnås
none Details | Review
gstpoll_win32_support (16.07 KB, patch)
2008-03-07 13:01 UTC, Ole André Vadla Ravnås
committed Details | Review

Description Ole André Vadla Ravnås 2008-03-06 05:30:56 UTC
Please describe the problem:
GStreamer core HEAD won't build on Windows because of GstPoll requiring porting.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Ole André Vadla Ravnås 2008-03-06 05:39:57 UTC
Created attachment 106660 [details] [review]
Alpha version barely sufficient for 'hello world' with udpsrc

Proof of concept, mostly just stubs, and limited to sockets only.

Tested with:
gst-launch udpsrc ! fakesink dump=true

and

import socket
s = socket.socket (socket.AF_INET, socket.SOCK_DGRAM)
s.sendto ('hello gst', 0, ('127.0.0.1', 4951))

Needless to say: Do not merge :)
Comment 2 Ole André Vadla Ravnås 2008-03-07 00:03:09 UTC
Created attachment 106726 [details] [review]
First take on GstPoll Windows support

Feature complete except being limited to sockets only.

Please review and test. Looking forward to getting check up running here so I can run through the GstPoll unittests.
Comment 3 Ole André Vadla Ravnås 2008-03-07 12:14:46 UTC
Created attachment 106769 [details] [review]
gstpoll_win32_support

Like the first patch, but always choose Windows poll mode on Windows.
Comment 4 Ole André Vadla Ravnås 2008-03-07 12:38:24 UTC
Created attachment 106775 [details] [review]
gstpoll_win32_support

Like the previous patch but remember to clear any previously stored result for non-signaled events.
Comment 5 Wim Taymans 2008-03-07 12:39:41 UTC
I'm going to remove the GstPollMode from the API (still used internally) because the user of this API is never going to choose a mode himself, moreover, it could be possible to select a mode that is not supported. 

We should just select a mode internally that is supported and has best performance, whithout the user doing anything.

This change will however change the API and requires us to update the users of the API and testsuite.
Comment 6 Ole André Vadla Ravnås 2008-03-07 13:01:35 UTC
Created attachment 106777 [details] [review]
gstpoll_win32_support

Like the previous but one tiny change:
Removed the io.h include on Windows, it's no longer needed.
Comment 7 Wim Taymans 2008-03-07 15:39:24 UTC
        Patch by: Ole André Vadla Ravnås
            <ole dot andre dot ravnas at tandberg dot com>

        * docs/gst/gstreamer-sections.txt:
        * gst/gstpoll.c: (find_index), (gst_poll_free_winsock_event),
        (gst_poll_update_winsock_event_mask), (gst_poll_new),
        (gst_poll_free), (gst_poll_fd_init), (gst_poll_add_fd_unlocked),
        (gst_poll_remove_fd), (gst_poll_fd_ctl_write),
        (gst_poll_fd_ctl_read_unlocked), (gst_poll_fd_has_closed),
        (gst_poll_fd_has_error), (gst_poll_fd_can_read_unlocked),
        (gst_poll_fd_can_write), (gst_poll_wait),
        (gst_poll_set_controllable), (gst_poll_restart),
        (gst_poll_set_flushing):
        * gst/gstpoll.h:
        * libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_new):
        * libs/gst/net/gstnettimeprovider.c: (gst_net_time_provider_start),
        (gst_net_time_provider_new):
        * plugins/elements/gstfdsink.c: (gst_fd_sink_start):
        * plugins/elements/gstfdsrc.c: (gst_fd_src_start):
        * tests/benchmarks/gstpollstress.c: (main):
        * tests/check/gst/gstpoll.c: (GST_START_TEST), (gst_poll_suite):
        Remove GstPollMode from the API, it does not make sense to let the
        application control this.
        Add support for Win32.
        Fix the testsuite. Fixes #520671.
Comment 8 Damien Lespiau 2008-03-08 11:34:10 UTC
Adding me to the CC. list as I have done some very similar work (I use udpsrc with gstpoll on my windows box) and I'm interested in follow-ups.

see bug #515312 if you want more details but using WFMO is probably the way to go.