Bug 823921 - Fixed content/media/wmf compilation on mingw r=khuey
authorJacek Caban <jacek@codeweavers.com>
Wed, 02 Jan 2013 18:26:08 +0100
changeset 126430 21d5fbda37b8ab018fa9aca9fe1b4c10446a0ba5
parent 126429 d7e3e0d3118fc85647ef5b0383c8effed813c07f
child 126431 0ce29ce2ea7ccfa33053eee3ff0a76bfa303542a
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs823921
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 823921 - Fixed content/media/wmf compilation on mingw r=khuey
content/media/MediaDecoder.h
content/media/wmf/WMF.h
toolkit/library/Makefile.in
--- a/content/media/MediaDecoder.h
+++ b/content/media/MediaDecoder.h
@@ -223,16 +223,22 @@ static const uint32_t FRAMEBUFFER_LENGTH
 // has to be within the following range.
 static const uint32_t FRAMEBUFFER_LENGTH_MIN = 512;
 static const uint32_t FRAMEBUFFER_LENGTH_MAX = 16384;
 
 static inline bool IsCurrentThread(nsIThread* aThread) {
   return NS_GetCurrentThread() == aThread;
 }
 
+// GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
+// GetTickCount() and conflicts with MediaDecoder::GetCurrentTime implementation.
+#ifdef GetCurrentTime
+#undef GetCurrentTime
+#endif
+
 class MediaDecoder : public nsIObserver,
                      public AbstractMediaDecoder
 {
 public:
   typedef mozilla::layers::Image Image;
   class DecodedStreamMainThreadListener;
 
   NS_DECL_ISUPPORTS
--- a/content/media/wmf/WMF.h
+++ b/content/media/wmf/WMF.h
@@ -24,18 +24,16 @@ which makes Windows Media Foundation una
 #include <mfidl.h>
 #include <mfreadwrite.h>
 #include <mfobjects.h>
 #include <stdio.h>
 #include <mferror.h>
 #include <propvarutil.h>
 #include <wmcodecdsp.h>
 
-#pragma comment(lib,"uuid.lib")
-#pragma comment(lib,"mfuuid.lib")
 
 namespace mozilla {
 namespace wmf {
 
 // Loads/Unloads all the DLLs in which the WMF functions are located.
 // The DLLs must be loaded before any of the WMF functions below will work.
 // All the function definitions below are wrappers which locate the
 // corresponding WMF function in the appropriate DLL (hence why LoadDLL()
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -455,16 +455,20 @@ OS_LIBS += \
   -lsensorservice \
   -ldbus \
   -lstagefright \
   -lstagefright_omx \
   -lbinder \
   $(NULL)
 endif
 
+ifdef MOZ_WMF
+OS_LIBS += $(call EXPAND_LIBNAME,mfuuid)
+endif
+
 EXTRA_DEPS += \
   $(topsrcdir)/intl/unicharutil/util/objs.mk \
   $(topsrcdir)/rdf/util/src/objs.mk \
   $(NULL)
 
 CPPSRCS += \
   $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
   $(RDF_UTIL_SRC_LCPPSRCS) \