[vlc-commits] dshow: build with mingw-w64

Rafaël Carré git at videolan.org
Mon Feb 27 19:20:46 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Fri Feb  3 14:09:33 2012 -0500| [d6182ce2afb185e667e42fcfaafe2b8695a7ccc8] | committer: Rafaël Carré

dshow: build with mingw-w64

remove now meaningless very old mingw.org workarounds
(cherry picked from commit 56b0211298cd7c8fda123ce171ec728e295ae9ca)

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=d6182ce2afb185e667e42fcfaafe2b8695a7ccc8
---

 configure.ac                     |    2 +-
 modules/access/dshow/access.h    |   19 ------------------
 modules/access/dshow/filter.h    |   21 -------------------
 modules/access/dshow/vlc_dshow.h |   40 +++++++++++++++++++------------------
 4 files changed, 22 insertions(+), 60 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4690563..96cfd28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1851,7 +1851,7 @@ then
       AC_CHECK_HEADERS(dshow.h,
       [ VLC_ADD_PLUGIN([dshow])
         VLC_ADD_CXXFLAGS([dshow],[])
-        VLC_ADD_LIBS([dshow],[-lole32 -loleaut32 -luuid]) ])
+        VLC_ADD_LIBS([dshow],[-lole32 -loleaut32 -luuid -lstrmiids -lksuser])])
     AC_LANG_POP(C++)
   fi
 fi
diff --git a/modules/access/dshow/access.h b/modules/access/dshow/access.h
index f9ef1dc..f1c9f58 100644
--- a/modules/access/dshow/access.h
+++ b/modules/access/dshow/access.h
@@ -27,25 +27,6 @@
  *****************************************************************************/
 using namespace std;
 
-#ifndef _MSC_VER
-#   include <wtypes.h>
-#   include <unknwn.h>
-#   include <ole2.h>
-#   include <limits.h>
-#   ifdef _WINGDI_
-#      undef _WINGDI_
-#   endif
-#   define _WINGDI_ 1
-#   define AM_NOVTABLE
-#   define _OBJBASE_H_
-#   undef _X86_
-#   ifndef _I64_MAX
-#     define _I64_MAX LONG_LONG_MAX
-#   endif
-#   define LONGLONG long long
-#endif
-
-#include "vlc_dshow.h"
 #include <dshow.h>
 
 typedef struct dshow_stream_t dshow_stream_t;
diff --git a/modules/access/dshow/filter.h b/modules/access/dshow/filter.h
index c573a6a..3f04a3c 100644
--- a/modules/access/dshow/filter.h
+++ b/modules/access/dshow/filter.h
@@ -29,27 +29,6 @@
 #include <deque>
 using namespace std;
 
-#ifndef _MSC_VER
-#   include <wtypes.h>
-#   include <unknwn.h>
-#   include <ole2.h>
-#   include <limits.h>
-#   ifdef _WINGDI_
-#      undef _WINGDI_
-#   endif
-#   define _WINGDI_ 1
-#   define AM_NOVTABLE
-#   define _OBJBASE_H_
-#   undef _X86_
-#   ifndef _I64_MAX
-#     define _I64_MAX LONG_LONG_MAX
-#   endif
-#   define LONGLONG long long
-#endif
-
-#include <dshow.h>
-#include "vlc_dshow.h"
-
 typedef struct VLCMediaSample
 {
     IMediaSample *p_sample;
diff --git a/modules/access/dshow/vlc_dshow.h b/modules/access/dshow/vlc_dshow.h
index 05f4209..40402dd 100644
--- a/modules/access/dshow/vlc_dshow.h
+++ b/modules/access/dshow/vlc_dshow.h
@@ -24,29 +24,30 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifndef VLC_DSHOW_H
+#define VLC_DSHOW_H
 
-#ifndef _MSC_VER
-#   include <wtypes.h>
-#   include <unknwn.h>
-#   include <ole2.h>
-#   include <limits.h>
-#   ifdef _WINGDI_
-#      undef _WINGDI_
-#   endif
-#   define _WINGDI_ 1
-#   define AM_NOVTABLE
-#   define _OBJBASE_H_
-#   undef _X86_
-#   ifndef _I64_MAX
-#     define _I64_MAX LONG_LONG_MAX
-#   endif
-#   define LONGLONG long long
+#ifdef __MINGW32__
+# include <_mingw.h>
 #endif
 
-#include <dshow.h>
+#include <wtypes.h>
+#include <unknwn.h>
+#include <ole2.h>
+#include <limits.h>
+#include <strmif.h>
+#include <ksmedia.h>
+#include <ddraw.h>
 
-#ifndef VLC_DSHOW_H
-#define VLC_DSHOW_H
+#ifdef __MINGW64_VERSION_MAJOR
+
+#if __MINGW64_VERSION_MAJOR < 3
+DEFINE_GUID(MEDIASUBTYPE_I420,0x30323449,0x0000,0x0010,0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71);
+#endif
+
+#else /* !__MINGW64_VERSION_MAJOR */
+
+#include <dshow.h>
 
 /*****************************************************************************
  * DirectShow GUIDs.
@@ -374,4 +375,5 @@ DECLARE_INTERFACE_(IAMTVAudio, IUnknown)
     STDMETHOD(UnRegisterNotificationCallBack) (THIS_ IAMTunerNotification*);
 };
 
+#endif /* __MINGW64_VERSION_MAJOR */
 #endif /* VLC_DSHOW_H */



More information about the vlc-commits mailing list