diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-05-24 16:26:24 +0530 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2016-08-16 01:39:00 +1000 |
commit | c1ea8f2dfe94eab87aea3ace7a5994d04089360e (patch) | |
tree | 195924f932ca1da7c66e38cc2f076d0c76db9240 | |
parent | 934d645de327045a3b16079d8ab0b8817891420d (diff) | |
download | gstreamer-plugins-bad-c1ea8f2dfe94eab87aea3ace7a5994d04089360e.tar.gz |
winks: Port to MSVC and pretend to be Windows XP
strcasecmp is not defined on MSVC, so just use the glib wrapper. Also pretend to
be Windows XP explicitly since the API we use was deprecated and removed
(ifdef-ed) from the SDK after this version of Windows. This will be especially
relevant once we stop supporting Windows XP soon:
https://bugzilla.gnome.org/show_bug.cgi?id=756866
-rw-r--r-- | sys/winks/ksdeviceprovider.c | 4 | ||||
-rw-r--r-- | sys/winks/kshelpers.c | 6 | ||||
-rw-r--r-- | sys/winks/kshelpers.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/sys/winks/ksdeviceprovider.c b/sys/winks/ksdeviceprovider.c index 54429ebe6..609794d44 100644 --- a/sys/winks/ksdeviceprovider.c +++ b/sys/winks/ksdeviceprovider.c @@ -355,7 +355,7 @@ msg_window_message_proc (HWND window_handle, UINT message, entry->path); if ((source == NULL) && - (strcasecmp (entry->path, bcdi->dbcc_name) == 0)) + (g_ascii_strcasecmp (entry->path, bcdi->dbcc_name) == 0)) source = new_video_source (entry); ks_device_entry_free (entry); @@ -377,7 +377,7 @@ msg_window_message_proc (HWND window_handle, UINT message, for (item = provider->devices; item; item = item->next) { dev = item->data; - if (strcasecmp (dev->path, bcdi->dbcc_name) == 0) { + if (g_ascii_strcasecmp (dev->path, bcdi->dbcc_name) == 0) { guid_str = gst_device_get_display_name (GST_DEVICE (dev)); GST_INFO_OBJECT (self, "Device matches to %s", guid_str); g_free (guid_str); diff --git a/sys/winks/kshelpers.c b/sys/winks/kshelpers.c index bbb9b066f..3b5ec28a4 100644 --- a/sys/winks/kshelpers.c +++ b/sys/winks/kshelpers.c @@ -19,6 +19,12 @@ #include "kshelpers.h" +/* This plugin is from the era of Windows XP and uses APIs that have been + * deprecated since then. Let's pretend we're Windows XP too so that Windows + * lets us use that deprecated API. */ +#define NTDDI_VERSION NTDDI_WINXP +#define _WIN32_WINNT _WIN32_WINNT_WINXP + #include <ksmedia.h> #include <setupapi.h> #include <gst/gst.h> diff --git a/sys/winks/kshelpers.h b/sys/winks/kshelpers.h index 5181bfcd1..ded8101f5 100644 --- a/sys/winks/kshelpers.h +++ b/sys/winks/kshelpers.h @@ -22,6 +22,7 @@ #include <glib.h> #include <windows.h> +#include <mmsystem.h> #include <ks.h> G_BEGIN_DECLS |