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 573595 - plugins-bad mingw ports
plugins-bad mingw ports
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal normal
: 0.10.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-01 01:57 UTC by LRN
Modified: 2009-03-26 10:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Required by all other patches (1.73 KB, patch)
2009-03-01 01:58 UTC, LRN
committed Details | Review
DCCP plugin port to MinGW (11.44 KB, patch)
2009-03-01 02:01 UTC, LRN
committed Details | Review
Common includes for DCCP plugin (1.39 KB, text/plain)
2009-03-01 02:02 UTC, LRN
  Details
xdgmime plugin mingw port (2.17 KB, patch)
2009-03-01 02:06 UTC, LRN
none Details | Review
fnmatch.h for MinGW (293 bytes, text/plain)
2009-03-01 02:08 UTC, LRN
  Details
acmenc and acmmp3dec plugins mingw port (6.09 KB, patch)
2009-03-01 02:15 UTC, LRN
committed Details | Review

Description LRN 2009-03-01 01:57:34 UTC
A few patches that port some bad plugins to MinGW. See attachments.
Comment 1 LRN 2009-03-01 01:58:11 UTC
Created attachment 129758 [details] [review]
Required by all other patches

Checks for pthread.h
Disables dccp when pthread.h is not available (maybe there are more plugins that depend on pthread?)
Adds -lws2_32 dependency for dccp and xdgmime when winsock2.h is available
Adds -lpthread dependency for dccp when pthread.h is available
Adds two variables - ACMENC_CFLAGS and ACMMP3DEC_CFLAGS
Comment 2 LRN 2009-03-01 02:01:20 UTC
Created attachment 129759 [details] [review]
DCCP plugin port to MinGW

Conditionally includes winsock headers on Win32
Conditionally calls appropriate winsock functions on Win32
Common includes are grouped into separate header gstdccp_common.h (attached separately)

Did not tested.
Comment 3 LRN 2009-03-01 02:02:10 UTC
Created attachment 129760 [details]
Common includes for DCCP plugin
Comment 4 LRN 2009-03-01 02:06:45 UTC
Created attachment 129763 [details] [review]
xdgmime plugin mingw port

Makes use of XDG_LIBS (passes on -lws2_32 when winsock2.h is available and -liberty from commandline)
Includes winsock stuff on Win32
Doesn't warn about MMAP on Win32 (Maybe FIXME is in order? I can't believe that MMAP can't be ported)
Moves one (unused?) variable.

Requires fnmatch.h which is attached separately. Requires libiberty.a (it has fnmatch function defined on MinGW, although there's no header for that function, hence the new fnmatch.h)
Comment 5 LRN 2009-03-01 02:08:29 UTC
Created attachment 129764 [details]
fnmatch.h for MinGW

Actual function is in libiberty.a (so -liberty should be passed via XDG_LIBS)
fnmatch.h should be placed in win32/common, i think.
Comment 6 LRN 2009-03-01 02:15:25 UTC
Created attachment 129766 [details] [review]
acmenc and acmmp3dec plugins mingw port

Makes use of ACM_CFLAGS and ACMMP3DEC_CFALGS. These should be used to pass additional Include directory where msacm.h and mmreg.h could be found, they has to be taken from MS Platform SDK (the ones bundled with MinGW are unuseful). Including the whole SDK seems to be a bad idea (conflicts with MinGW).
Corrects some calls to WinAPI functions to explicitly use widechar-versions (and this way we don't need to do -DUNICODE ! Yay!).
Typecasts some arguments to avoid warnings
Comment 7 Sebastian Dröge (slomo) 2009-03-01 09:19:20 UTC
I'll take a look at the xdgmime patch later, there are also some other things to be changed for portability ;)

If nobody is faster I'll also handle the other patches
Comment 8 Sebastian Dröge (slomo) 2009-03-01 19:20:06 UTC
The xdgmime parts should be done by using GLib stuff now:

commit f957ee0aeb2902710e677b566c1ad36393ed0323
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sun Mar 1 20:18:30 2009 +0100

    xdgmime: Use g_pattern_match_simple() instead of fnmatch() for Win32 compati

commit e571138ef60bbe7a983e1d0a2cf86dabcf8c2e08
Author: LRN <lrn1986@gmail.com>
Date:   Sun Mar 1 20:13:31 2009 +0100

    xdgmime: Fix unused variable compiler warning

commit 8c4584aa565e0298c39c1603bb65dcd4bc678380
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sun Mar 1 20:12:12 2009 +0100

    xdgmime: Don't warn if we have no MMAP support

commit 39850d674eb12de4c181010d37c5d9df655bfd52
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sun Mar 1 20:11:07 2009 +0100

    xdgmime: Use g_ntoh[ls] instead of the non-GLib functions for Win32 compatib

commit b30926428d4dfc9be532d83219f544f1d49cb9dc
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sun Mar 1 20:09:24 2009 +0100

    xdgmime: Use G_BYTE_ORDER instead of relying on LITTLE_ENDIAN to be defined
Comment 9 Sebastian Dröge (slomo) 2009-03-26 10:39:03 UTC
commit 7ff9bdb45659fdfbc434a202c0588c6a271bef0a
Author: Руслан Ижбулатов <lrn1986@gmail.com>
Date:   Thu Mar 26 11:37:28 2009 +0100

    acm: Port to MinGW
    
    Fixes bug #573595.

commit f5b298e3d7687dbd349ff920eaa22d7f958a0653
Author: Руслан Ижбулатов <lrn1986@gmail.com>
Date:   Thu Mar 26 11:33:50 2009 +0100

    xdgmime: Link with winsock library to fix build with MinGW
    
    Partially fixes bug #573595.

commit dafa53077320a7a39c61a89a7cca1d74797fb92f
Author: Руслан Ижбулатов <lrn1986@gmail.com>
Date:   Thu Mar 26 11:32:08 2009 +0100

    dccp: Port DCCP plugin to MinGW
    
    Partially fixes bug #573595.

commit fe9e680169e3e04ca98cebdf41f771310591d329
Author: Руслан Ижбулатов <lrn1986@gmail.com>
Date:   Thu Mar 26 11:23:30 2009 +0100

    dccp: Disable the dccp plugin if no pthread support is available
    
    Partially fixes bug #573595.