Bug 1133479 - Fixed media/gmp-clearkey build on mingw. r=cpearce a=lmandel
authorJacek Caban <jacek@codeweavers.com>
Tue, 17 Feb 2015 11:18:04 +0100
changeset 250218 d8e655d11fc5
parent 250217 448ff154c5fd
child 250219 9b9911bc6bd5
push id4521
push usercpearce@mozilla.com
push date2015-03-04 01:22 +0000
treeherdermozilla-beta@8abdbdecd2d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lmandel
bugs1133479
milestone37.0
Bug 1133479 - Fixed media/gmp-clearkey build on mingw. r=cpearce a=lmandel
media/gmp-clearkey/0.1/AnnexB.cpp
media/gmp-clearkey/0.1/VideoDecoder.cpp
media/gmp-clearkey/0.1/WMFAACDecoder.cpp
media/gmp-clearkey/0.1/WMFH264Decoder.cpp
media/gmp-clearkey/0.1/moz.build
--- a/media/gmp-clearkey/0.1/AnnexB.cpp
+++ b/media/gmp-clearkey/0.1/AnnexB.cpp
@@ -33,17 +33,17 @@ ConvertParamSetToAnnexB(std::vector<uint
   }
 }
 
 /* static */ void
 AnnexB::ConvertConfig(const std::vector<uint8_t>& aBuffer,
                       std::vector<uint8_t>& aOutAnnexB)
 {
   // Skip past irrelevant headers
-  auto& it = aBuffer.begin() + 5;
+  auto it = aBuffer.begin() + 5;
 
   if (it >= aBuffer.end()) {
     return;
   }
 
   size_t count = *(it++) & 31;
 
   // Check that we have enough bytes for the Annex B conversion
--- a/media/gmp-clearkey/0.1/VideoDecoder.cpp
+++ b/media/gmp-clearkey/0.1/VideoDecoder.cpp
@@ -257,18 +257,16 @@ VideoDecoder::SampleToVideoFrame(IMFSamp
   uint32_t padding = 0;
   if (height % 16 != 0) {
     padding = 16 - (height % 16);
   }
   int32_t y_size = stride * (height + padding);
   int32_t v_size = stride * (height + padding) / 4;
   int32_t halfStride = (stride + 1) / 2;
   int32_t halfHeight = (height + 1) / 2;
-  int32_t halfWidth = (width + 1) / 2;
-  int32_t totalSize = y_size + 2 * v_size;
 
   GetPlatform()->syncrunonmainthread(WrapTask(aVideoFrame,
                                   &GMPVideoi420Frame::CreateEmptyFrame,
                                   stride, height, stride, halfStride, halfStride));
 
   auto err = aVideoFrame->SetWidth(width);
   ENSURE(GMP_SUCCEEDED(err), E_FAIL);
   err = aVideoFrame->SetHeight(height);
--- a/media/gmp-clearkey/0.1/WMFAACDecoder.cpp
+++ b/media/gmp-clearkey/0.1/WMFAACDecoder.cpp
@@ -257,20 +257,16 @@ WMFAACDecoder::CreateOutputSample(IMFSam
   ENSURE(SUCCEEDED(hr), hr);
 
   CComPtr<IMFMediaBuffer> buffer = nullptr;
   int32_t bufferSize = mOutputStreamInfo.cbSize;
   UINT32 alignment = (mOutputStreamInfo.cbAlignment > 1) ? mOutputStreamInfo.cbAlignment - 1 : 0;
   hr = MFCreateAlignedMemoryBuffer(bufferSize, alignment, &buffer);
   ENSURE(SUCCEEDED(hr), hr);
 
-  DWORD maxLength = 0;
-  DWORD currentLength = 0;
-  BYTE* dst = nullptr;
-
   hr = sample->AddBuffer(buffer);
   ENSURE(SUCCEEDED(hr), hr);
 
   *aOutSample = sample.Detach();
 
   return S_OK;
 }
 
--- a/media/gmp-clearkey/0.1/WMFH264Decoder.cpp
+++ b/media/gmp-clearkey/0.1/WMFH264Decoder.cpp
@@ -228,20 +228,16 @@ WMFH264Decoder::CreateOutputSample(IMFSa
   ENSURE(SUCCEEDED(hr), hr);
 
   CComPtr<IMFMediaBuffer> buffer;
   int32_t bufferSize = mOutputStreamInfo.cbSize;
   UINT32 alignment = (mOutputStreamInfo.cbAlignment > 1) ? mOutputStreamInfo.cbAlignment - 1 : 0;
   hr = MFCreateAlignedMemoryBuffer(bufferSize, alignment, &buffer);
   ENSURE(SUCCEEDED(hr), hr);
 
-  DWORD maxLength = 0;
-  DWORD currentLength = 0;
-  BYTE* dst = nullptr;
-
   hr = sample->AddBuffer(buffer);
   ENSURE(SUCCEEDED(hr), hr);
 
   *aOutSample = sample.Detach();
 
   return S_OK;
 }
 
--- a/media/gmp-clearkey/0.1/moz.build
+++ b/media/gmp-clearkey/0.1/moz.build
@@ -30,16 +30,20 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'WMFAACDecoder.cpp',
         'WMFH264Decoder.cpp',
     ]
 
     SOURCES += [
         'WMFUtils.cpp',
     ]
 
+    OS_LIBS += [
+        'mfuuid',
+    ]
+
     DEFINES['ENABLE_WMF'] = True
 
 
 LOCAL_INCLUDES += [
     '/dom/media/gmp',
 ]
 
 USE_STATIC_LIBS = True