Bug 1374596: P5. Fix MediaDecoder* headers. r?padenot draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 20 Jun 2017 17:34:29 +0200
changeset 598127 1f9f3715f397cb1827b661a510283a2263a5f6b5
parent 598126 3f37c089eb536e90846efabf5b546b292cde4760
child 598128 0e8963fff66e529a5ff70fe73efe4055f68e93a0
push id65143
push userbmo:jyavenard@mozilla.com
push dateWed, 21 Jun 2017 12:29:21 +0000
reviewerspadenot
bugs1374596
milestone56.0a1
Bug 1374596: P5. Fix MediaDecoder* headers. r?padenot MozReview-Commit-ID: AjSjYXXcutJ
dom/media/MediaDecoder.cpp
dom/media/MediaDecoderReader.cpp
dom/media/MediaDecoderReader.h
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -39,16 +39,22 @@
 #endif
 
 using namespace mozilla::dom;
 using namespace mozilla::layers;
 using namespace mozilla::media;
 
 namespace mozilla {
 
+// GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
+// GetTickCount() and conflicts with MediaDecoder::GetCurrentTime implementation.
+#ifdef GetCurrentTime
+#undef GetCurrentTime
+#endif
+
 // avoid redefined macro in unified build
 #undef LOG
 #undef DUMP
 
 LazyLogModule gMediaDecoderLog("MediaDecoder");
 #define LOG(x, ...) \
   MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("Decoder=%p " x, this, ##__VA_ARGS__))
 
--- a/dom/media/MediaDecoderReader.cpp
+++ b/dom/media/MediaDecoderReader.cpp
@@ -9,16 +9,18 @@
 #include "MediaResource.h"
 #include "VideoUtils.h"
 #include "ImageContainer.h"
 #include "MediaPrefs.h"
 
 #include "nsPrintfCString.h"
 #include "mozilla/mozalloc.h"
 #include "mozilla/Mutex.h"
+#include "mozilla/SharedThreadPool.h"
+#include "mozilla/TaskQueue.h"
 #include <stdint.h>
 #include <algorithm>
 
 using namespace mozilla::media;
 
 namespace mozilla {
 
 // Un-comment to enable logging of seek bisections.
--- a/dom/media/MediaDecoderReader.h
+++ b/dom/media/MediaDecoderReader.h
@@ -21,16 +21,17 @@
 #include "Intervals.h"
 #include "TimeUnits.h"
 #include "SeekTarget.h"
 
 namespace mozilla {
 
 class CDMProxy;
 class MediaDecoderReader;
+class TaskQueue;
 
 struct WaitForDataRejectValue
 {
   enum Reason
   {
     SHUTDOWN,
     CANCELED
   };