Bug 1199518: [webm] P1. Have WebMDemuxer use its own logger. r=kinetik
authorJean-Yves Avenard <jyavenard@mozilla.com>
Sat, 12 Sep 2015 20:51:05 +1000
changeset 296473 1794ed0461559432d6685eab79bf41f6351e46d6
parent 296472 78b76b57de21c0e91732217de2db85728465f137
child 296474 f72d4bfd281163432af96b0444d89b36e17c47b3
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskinetik
bugs1199518
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 1199518: [webm] P1. Have WebMDemuxer use its own logger. r=kinetik
dom/media/webm/WebMDemuxer.cpp
--- a/dom/media/webm/WebMDemuxer.cpp
+++ b/dom/media/webm/WebMDemuxer.cpp
@@ -20,23 +20,23 @@
 
 #include <algorithm>
 #include <stdint.h>
 
 #define VPX_DONT_DEFINE_STDINT_TYPES
 #include "vpx/vp8dx.h"
 #include "vpx/vpx_decoder.h"
 
-#define WEBM_DEBUG(arg, ...) MOZ_LOG(gMediaDecoderLog, mozilla::LogLevel::Debug, ("WebMDemuxer(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#define WEBM_DEBUG(arg, ...) MOZ_LOG(gWebMDemuxerLog, mozilla::LogLevel::Debug, ("WebMDemuxer(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 
 namespace mozilla {
 
 using namespace gfx;
 
-extern PRLogModuleInfo* gMediaDecoderLog;
+PRLogModuleInfo* gWebMDemuxerLog = nullptr;
 extern PRLogModuleInfo* gNesteggLog;
 
 // Functions for reading and seeking using WebMDemuxer required for
 // nestegg_io. The 'user data' passed to these functions is the
 // demuxer.
 static int webmdemux_read(void* aBuffer, size_t aLength, void* aUserData)
 {
   MOZ_ASSERT(aUserData);
@@ -137,16 +137,19 @@ WebMDemuxer::WebMDemuxer(MediaResource* 
   , mHasAudio(false)
   , mNeedReIndex(true)
   , mLastWebMBlockOffset(-1)
   , mIsMediaSource(aIsMediaSource)
 {
   if (!gNesteggLog) {
     gNesteggLog = PR_NewLogModule("Nestegg");
   }
+  if (!gWebMDemuxerLog) {
+    gWebMDemuxerLog = PR_NewLogModule("WebMDemuxer");
+  }
 }
 
 WebMDemuxer::~WebMDemuxer()
 {
   Reset();
   Cleanup();
 }