Bug 1204776: P4. Have VPX/Opus/Vorbis decoder use PlatformDecoderModule log. r=cpearce
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 15 Sep 2015 15:36:22 +1000
changeset 295328 e8eb8b46b68d2a0b04d704602a0c4cf96fd78af8
parent 295327 e3595c625039fd9a1f048459582974a8265a2b2c
child 295329 cab4a53058bde6f60238412251543688e133ef7b
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1204776
milestone43.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 1204776: P4. Have VPX/Opus/Vorbis decoder use PlatformDecoderModule log. r=cpearce
dom/media/platforms/agnostic/OpusDecoder.cpp
dom/media/platforms/agnostic/VPXDecoder.cpp
dom/media/platforms/agnostic/VorbisDecoder.cpp
--- a/dom/media/platforms/agnostic/OpusDecoder.cpp
+++ b/dom/media/platforms/agnostic/OpusDecoder.cpp
@@ -7,23 +7,22 @@
 #include "OpusDecoder.h"
 #include "TimeUnits.h"
 #include "VorbisUtils.h"
 #include "mozilla/Endian.h"
 
 #include <stdint.h>
 #include <inttypes.h>  // For PRId64
 
-#define OPUS_DEBUG(arg, ...) MOZ_LOG(gMediaDecoderLog, mozilla::LogLevel::Debug, \
+extern PRLogModuleInfo* GetPDMLog();
+#define OPUS_DEBUG(arg, ...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, \
     ("OpusDataDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
-extern PRLogModuleInfo* gMediaDecoderLog;
-
 OpusDataDecoder::OpusDataDecoder(const AudioInfo& aConfig,
                                  FlushableTaskQueue* aTaskQueue,
                                  MediaDataDecoderCallback* aCallback)
   : mInfo(aConfig)
   , mTaskQueue(aTaskQueue)
   , mCallback(aCallback)
   , mOpusDecoder(nullptr)
   , mSkip(0)
--- a/dom/media/platforms/agnostic/VPXDecoder.cpp
+++ b/dom/media/platforms/agnostic/VPXDecoder.cpp
@@ -8,25 +8,24 @@
 #include "gfx2DGlue.h"
 #include "nsError.h"
 #include "TimeUnits.h"
 #include "mozilla/PodOperations.h"
 
 #include <algorithm>
 
 #undef LOG
-#define LOG(arg, ...) MOZ_LOG(gMediaDecoderLog, mozilla::LogLevel::Debug, ("VPXDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+extern PRLogModuleInfo* GetPDMLog();
+#define LOG(arg, ...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, ("VPXDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 using namespace gfx;
 using namespace layers;
 
-extern PRLogModuleInfo* gMediaDecoderLog;
-
 VPXDecoder::VPXDecoder(const VideoInfo& aConfig,
                        ImageContainer* aImageContainer,
                        FlushableTaskQueue* aTaskQueue,
                        MediaDataDecoderCallback* aCallback)
   : mImageContainer(aImageContainer)
   , mTaskQueue(aTaskQueue)
   , mCallback(aCallback)
   , mInfo(aConfig)
--- a/dom/media/platforms/agnostic/VorbisDecoder.cpp
+++ b/dom/media/platforms/agnostic/VorbisDecoder.cpp
@@ -7,22 +7,21 @@
 #include "VorbisDecoder.h"
 #include "VorbisUtils.h"
 #include "XiphExtradata.h"
 
 #include "mozilla/PodOperations.h"
 #include "nsAutoPtr.h"
 
 #undef LOG
-#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
+extern PRLogModuleInfo* GetPDMLog();
+#define LOG(type, msg) MOZ_LOG(GetPDMLog(), type, msg)
 
 namespace mozilla {
 
-extern PRLogModuleInfo* gMediaDecoderLog;
-
 ogg_packet InitVorbisPacket(const unsigned char* aData, size_t aLength,
                          bool aBOS, bool aEOS,
                          int64_t aGranulepos, int64_t aPacketNo)
 {
   ogg_packet packet;
   packet.packet = const_cast<unsigned char*>(aData);
   packet.bytes = aLength;
   packet.b_o_s = aBOS;