mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG-- extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
This commit is contained in:
parent
8f0e450b12
commit
3cbe348cdd
@ -25,7 +25,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
PRLogModuleInfo* gAudioStreamLog = nullptr;
|
||||
LazyLogModule gAudioStreamLog("AudioStream");
|
||||
// For simple logs
|
||||
#define LOG(x) MOZ_LOG(gAudioStreamLog, mozilla::LogLevel::Debug, x)
|
||||
|
||||
|
@ -40,7 +40,7 @@ uint32_t sPreferredSampleRate;
|
||||
|
||||
} // namespace
|
||||
|
||||
extern PRLogModuleInfo* gAudioStreamLog;
|
||||
extern LazyLogModule gAudioStreamLog;
|
||||
|
||||
static const uint32_t CUBEB_NORMAL_LATENCY_MS = 100;
|
||||
|
||||
@ -126,7 +126,6 @@ bool CubebLatencyPrefSet()
|
||||
|
||||
void InitLibrary()
|
||||
{
|
||||
gAudioStreamLog = PR_NewLogModule("AudioStream");
|
||||
PrefChanged(PREF_VOLUME_SCALE, nullptr);
|
||||
Preferences::RegisterCallback(PrefChanged, PREF_VOLUME_SCALE);
|
||||
PrefChanged(PREF_CUBEB_LATENCY, nullptr);
|
||||
|
@ -27,13 +27,13 @@
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
static PRLogModuleInfo* gMediaStreamLog;
|
||||
#define LOG(type, msg) MOZ_LOG(gMediaStreamLog, type, msg)
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::layers;
|
||||
|
||||
static LazyLogModule gMediaStreamLog("MediaStream");
|
||||
#define LOG(type, msg) MOZ_LOG(gMediaStreamLog, type, msg)
|
||||
|
||||
const TrackID TRACK_VIDEO_PRIMARY = 1;
|
||||
|
||||
|
||||
@ -318,10 +318,6 @@ DOMMediaStream::DOMMediaStream()
|
||||
nsCOMPtr<nsIUUIDGenerator> uuidgen =
|
||||
do_GetService("@mozilla.org/uuid-generator;1", &rv);
|
||||
|
||||
if (!gMediaStreamLog) {
|
||||
gMediaStreamLog = PR_NewLogModule("MediaStream");
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv) && uuidgen) {
|
||||
nsID uuid;
|
||||
memset(&uuid, 0, sizeof(uuid));
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
extern mozilla::LazyLogModule gMediaStreamGraphLog;
|
||||
#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
|
||||
|
||||
// We don't use NSPR log here because we want this interleaved with adb logcat
|
||||
|
@ -37,17 +37,13 @@ const char* LatencyLogIndex2Strings[] = {
|
||||
|
||||
static StaticRefPtr<AsyncLatencyLogger> gAsyncLogger;
|
||||
|
||||
PRLogModuleInfo*
|
||||
LogModule*
|
||||
GetLatencyLog()
|
||||
{
|
||||
static PRLogModuleInfo* sLog;
|
||||
if (!sLog) {
|
||||
sLog = PR_NewLogModule("MediaLatency");
|
||||
}
|
||||
static LazyLogModule sLog("MediaLatency");
|
||||
return sLog;
|
||||
}
|
||||
|
||||
|
||||
class LogEvent : public nsRunnable
|
||||
{
|
||||
public:
|
||||
@ -111,6 +107,8 @@ void LogLatency(uint32_t aIndex, uint64_t aID, int64_t aValue)
|
||||
void AsyncLatencyLogger::InitializeStatics()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Main thread only");
|
||||
|
||||
//Make sure that the underlying logger is allocated.
|
||||
GetLatencyLog();
|
||||
gAsyncLogger = new AsyncLatencyLogger();
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
class AsyncLatencyLogger;
|
||||
|
||||
PRLogModuleInfo* GetLatencyLog();
|
||||
mozilla::LogModule* GetLatencyLog();
|
||||
|
||||
// This class is a singleton. It is refcounted.
|
||||
class AsyncLatencyLogger : public nsIObserver
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "prenv.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gMP3DemuxerLog;
|
||||
mozilla::LazyLogModule gMP3DemuxerLog("MP3Demuxer");
|
||||
#define MP3LOG(msg, ...) \
|
||||
MOZ_LOG(gMP3DemuxerLog, LogLevel::Debug, ("MP3Demuxer " msg, ##__VA_ARGS__))
|
||||
#define MP3LOGV(msg, ...) \
|
||||
@ -112,12 +112,6 @@ MP3TrackDemuxer::MP3TrackDemuxer(MediaResource* aSource)
|
||||
, mChannels(0)
|
||||
{
|
||||
Reset();
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMP3DemuxerLog) {
|
||||
gMP3DemuxerLog = PR_NewLogModule("MP3Demuxer");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* gMediaCacheLog;
|
||||
LazyLogModule gMediaCacheLog("MediaCache");
|
||||
#define CACHE_LOG(type, msg) MOZ_LOG(gMediaCacheLog, type, msg)
|
||||
|
||||
// Readahead blocks for non-seekable streams will be limited to this
|
||||
@ -580,10 +580,6 @@ MediaCache::Init()
|
||||
rv = mFileCache->Open(fileDesc);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
if (!gMediaCacheLog) {
|
||||
gMediaCacheLog = PR_NewLogModule("MediaCache");
|
||||
}
|
||||
|
||||
MediaCacheFlusher::Init();
|
||||
|
||||
return NS_OK;
|
||||
|
@ -46,7 +46,7 @@ static const uint64_t ESTIMATED_DURATION_FUZZ_FACTOR_USECS = USECS_PER_S / 2;
|
||||
// avoid redefined macro in unified build
|
||||
#undef DECODER_LOG
|
||||
|
||||
PRLogModuleInfo* gMediaDecoderLog;
|
||||
LazyLogModule gMediaDecoderLog("MediaDecoder");
|
||||
#define DECODER_LOG(x, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("Decoder=%p " x, this, ##__VA_ARGS__))
|
||||
|
||||
@ -113,21 +113,14 @@ public:
|
||||
StaticRefPtr<MediaMemoryTracker> MediaMemoryTracker::sUniqueInstance;
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
PRLogModuleInfo* gMediaTimerLog;
|
||||
PRLogModuleInfo* gMediaSampleLog;
|
||||
LazyLogModule gMediaTimerLog("MediaTimer");
|
||||
LazyLogModule gMediaSampleLog("MediaSample");
|
||||
#endif
|
||||
|
||||
void
|
||||
MediaDecoder::InitStatics()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
// Log modules.
|
||||
gMediaDecoderLog = PR_NewLogModule("MediaDecoder");
|
||||
gMediaTimerLog = PR_NewLogModule("MediaTimer");
|
||||
gMediaSampleLog = PR_NewLogModule("MediaSample");
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(MediaMemoryTracker, nsIMemoryReporter)
|
||||
|
@ -22,7 +22,7 @@ namespace mozilla {
|
||||
// Un-comment to enable logging of seek bisections.
|
||||
//#define SEEK_LOGGING
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define DECODER_LOG(x, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("Decoder=%p " x, mDecoder, ##__VA_ARGS__))
|
||||
|
||||
|
@ -107,8 +107,8 @@ class AudioSegment;
|
||||
class DecodedStream;
|
||||
class TaskQueue;
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern PRLogModuleInfo* gMediaSampleLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaSampleLog;
|
||||
|
||||
/*
|
||||
The state machine class. This manages the decoding and seeking in the
|
||||
|
@ -28,15 +28,10 @@ using mozilla::layers::Image;
|
||||
using mozilla::layers::LayerManager;
|
||||
using mozilla::layers::LayersBackend;
|
||||
|
||||
PRLogModuleInfo* GetFormatDecoderLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("MediaFormatReader");
|
||||
}
|
||||
return log;
|
||||
}
|
||||
#define LOG(arg, ...) MOZ_LOG(GetFormatDecoderLog(), mozilla::LogLevel::Debug, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define LOGV(arg, ...) MOZ_LOG(GetFormatDecoderLog(), mozilla::LogLevel::Verbose, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
static mozilla::LazyLogModule sFormatDecoderLog("MediaFormatReader");
|
||||
|
||||
#define LOG(arg, ...) MOZ_LOG(sFormatDecoderLog, mozilla::LogLevel::Debug, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define LOGV(arg, ...) MOZ_LOG(sFormatDecoderLog, mozilla::LogLevel::Verbose, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -104,12 +104,10 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
PRLogModuleInfo*
|
||||
LogModule*
|
||||
GetMediaManagerLog()
|
||||
{
|
||||
static PRLogModuleInfo *sLog;
|
||||
if (!sLog)
|
||||
sLog = PR_NewLogModule("MediaManager");
|
||||
static LazyLogModule sLog("MediaManager");
|
||||
return sLog;
|
||||
}
|
||||
#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Debug, msg)
|
||||
|
@ -51,7 +51,7 @@ struct MediaTrackConstraints;
|
||||
struct MediaTrackConstraintSet;
|
||||
} // namespace dom
|
||||
|
||||
extern PRLogModuleInfo* GetMediaManagerLog();
|
||||
extern LogModule* GetMediaManagerLog();
|
||||
#define MM_LOG(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Debug, msg)
|
||||
|
||||
class MediaDevice : public nsIMediaDevice
|
||||
|
@ -31,7 +31,7 @@
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
PRLogModuleInfo* gMediaRecorderLog;
|
||||
mozilla::LazyLogModule gMediaRecorderLog("MediaRecorder");
|
||||
#define LOG(type, msg) MOZ_LOG(gMediaRecorderLog, type, msg)
|
||||
|
||||
namespace mozilla {
|
||||
@ -776,9 +776,7 @@ MediaRecorder::MediaRecorder(DOMMediaStream& aSourceMediaStream,
|
||||
MOZ_ASSERT(aOwnerWindow);
|
||||
MOZ_ASSERT(aOwnerWindow->IsInnerWindow());
|
||||
mDOMStream = &aSourceMediaStream;
|
||||
if (!gMediaRecorderLog) {
|
||||
gMediaRecorderLog = PR_NewLogModule("MediaRecorder");
|
||||
}
|
||||
|
||||
RegisterActivityObserver();
|
||||
}
|
||||
|
||||
@ -809,9 +807,7 @@ MediaRecorder::MediaRecorder(AudioNode& aSrcAudioNode,
|
||||
}
|
||||
}
|
||||
mAudioNode = &aSrcAudioNode;
|
||||
if (!gMediaRecorderLog) {
|
||||
gMediaRecorderLog = PR_NewLogModule("MediaRecorder");
|
||||
}
|
||||
|
||||
RegisterActivityObserver();
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
using mozilla::media::TimeUnit;
|
||||
|
||||
PRLogModuleInfo* gMediaResourceLog;
|
||||
mozilla::LazyLogModule gMediaResourceLog("MediaResource");
|
||||
#define RESOURCE_LOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
@ -79,9 +79,6 @@ ChannelMediaResource::ChannelMediaResource(MediaResourceCallback* aCallback,
|
||||
mIsTransportSeekable(true),
|
||||
mSuspendAgent(mChannel)
|
||||
{
|
||||
if (!gMediaResourceLog) {
|
||||
gMediaResourceLog = PR_NewLogModule("MediaResource");
|
||||
}
|
||||
}
|
||||
|
||||
ChannelMediaResource::~ChannelMediaResource()
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
|
||||
NS_IMPL_ISUPPORTS(MediaShutdownManager, nsIObserver)
|
||||
|
@ -39,7 +39,7 @@ using namespace mozilla::gfx;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
LazyLogModule gMediaStreamGraphLog("MediaStreamGraph");
|
||||
#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
|
||||
|
||||
// #define ENABLE_LIFECYCLE_LOG
|
||||
@ -2639,10 +2639,6 @@ MediaStreamGraphImpl::MediaStreamGraphImpl(GraphDriverType aDriverRequested,
|
||||
#endif
|
||||
, mAudioChannel(aChannel)
|
||||
{
|
||||
if (!gMediaStreamGraphLog) {
|
||||
gMediaStreamGraphLog = PR_NewLogModule("MediaStreamGraph");
|
||||
}
|
||||
|
||||
if (mRealtime) {
|
||||
if (aDriverRequested == AUDIO_THREAD_DRIVER) {
|
||||
AudioCallbackDriver* driver = new AudioCallbackDriver(this);
|
||||
|
@ -35,7 +35,7 @@ class nsAutoRefTraits<SpeexResamplerState> : public nsPointerRefTraits<SpeexResa
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
extern LazyLogModule gMediaStreamGraphLog;
|
||||
|
||||
namespace dom {
|
||||
enum class AudioContextOperation;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaTimerLog;
|
||||
extern LazyLogModule gMediaTimerLog;
|
||||
|
||||
#define TIMER_LOG(x, ...) \
|
||||
MOZ_ASSERT(gMediaTimerLog); \
|
||||
|
@ -21,7 +21,7 @@
|
||||
using namespace mozilla::net;
|
||||
using namespace mozilla::media;
|
||||
|
||||
PRLogModuleInfo* gRtspMediaResourceLog;
|
||||
mozilla::LazyLogModule gRtspMediaResourceLog("RtspMediaResource");
|
||||
#define RTSP_LOG(msg, ...) MOZ_LOG(gRtspMediaResourceLog, mozilla::LogLevel::Debug, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
@ -505,9 +505,6 @@ RtspMediaResource::RtspMediaResource(MediaResourceCallback* aCallback,
|
||||
MOZ_ASSERT(mMediaStreamController);
|
||||
mListener = new Listener(this);
|
||||
mMediaStreamController->AsyncOpen(mListener);
|
||||
if (!gRtspMediaResourceLog) {
|
||||
gRtspMediaResourceLog = PR_NewLogModule("RtspMediaResource");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
extern LazyLogModule gMediaStreamGraphLog;
|
||||
#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -42,15 +42,12 @@ namespace mozilla {
|
||||
#undef STREAM_LOG
|
||||
#endif
|
||||
|
||||
PRLogModuleInfo* gTrackUnionStreamLog;
|
||||
LazyLogModule gTrackUnionStreamLog("TrackUnionStream");
|
||||
#define STREAM_LOG(type, msg) MOZ_LOG(gTrackUnionStreamLog, type, msg)
|
||||
|
||||
TrackUnionStream::TrackUnionStream(DOMMediaStream* aWrapper) :
|
||||
ProcessedMediaStream(aWrapper), mNextAvailableTrackID(1)
|
||||
{
|
||||
if (!gTrackUnionStreamLog) {
|
||||
gTrackUnionStreamLog = PR_NewLogModule("TrackUnionStream");
|
||||
}
|
||||
}
|
||||
|
||||
void TrackUnionStream::RemoveInput(MediaInputPort* aPort)
|
||||
|
@ -28,16 +28,13 @@ NS_INTERFACE_MAP_END
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(WebVTTListener)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(WebVTTListener)
|
||||
|
||||
PRLogModuleInfo* gTextTrackLog;
|
||||
LazyLogModule gTextTrackLog("TextTrack");
|
||||
# define VTT_LOG(...) MOZ_LOG(gTextTrackLog, LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
WebVTTListener::WebVTTListener(HTMLTrackElement* aElement)
|
||||
: mElement(aElement)
|
||||
{
|
||||
MOZ_ASSERT(mElement, "Must pass an element to the callback");
|
||||
if (!gTextTrackLog) {
|
||||
gTextTrackLog = PR_NewLogModule("TextTrack");
|
||||
}
|
||||
VTT_LOG("WebVTTListener created.");
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ using namespace mozilla::media;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define LOGE(...) MOZ_LOG(gMediaDecoderLog, mozilla::LogLevel::Error, (__VA_ARGS__))
|
||||
#define LOGW(...) MOZ_LOG(gMediaDecoderLog, mozilla::LogLevel::Warning, (__VA_ARGS__))
|
||||
#define LOGD(...) MOZ_LOG(gMediaDecoderLog, mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
@ -23,7 +23,7 @@ using namespace mozilla::media;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
extern LogModule* GetDirectShowLog();
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
AudioSinkFilter::AudioSinkFilter(const wchar_t* aObjectName, HRESULT* aOutResult)
|
||||
|
@ -15,7 +15,7 @@ using namespace mozilla::media;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
extern LogModule* GetDirectShowLog();
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
AudioSinkInputPin::AudioSinkInputPin(wchar_t* aObjectName,
|
||||
|
@ -18,13 +18,9 @@ using namespace mozilla::media;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
||||
PRLogModuleInfo*
|
||||
LogModule*
|
||||
GetDirectShowLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("DirectShowDecoder");
|
||||
}
|
||||
static LazyLogModule log("DirectShowDecoder");
|
||||
return log;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ using namespace mozilla::media;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
extern LogModule* GetDirectShowLog();
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
SampleSink::SampleSink()
|
||||
|
@ -20,7 +20,7 @@ namespace mozilla {
|
||||
//#define DEBUG_SOURCE_TRACE 1
|
||||
|
||||
#if defined (DEBUG_SOURCE_TRACE)
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
extern LogModule* GetDirectShowLog();
|
||||
#define DIRECTSHOW_LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#else
|
||||
#define DIRECTSHOW_LOG(...)
|
||||
|
@ -8,19 +8,13 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetEMELog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("EME");
|
||||
}
|
||||
LogModule* GetEMELog() {
|
||||
static LazyLogModule log("EME");
|
||||
return log;
|
||||
}
|
||||
|
||||
PRLogModuleInfo* GetEMEVerboseLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("EMEV");
|
||||
}
|
||||
LogModule* GetEMEVerboseLog() {
|
||||
static LazyLogModule log("EMEV");
|
||||
return log;
|
||||
}
|
||||
|
||||
|
@ -13,13 +13,13 @@
|
||||
namespace mozilla {
|
||||
|
||||
#ifndef EME_LOG
|
||||
PRLogModuleInfo* GetEMELog();
|
||||
LogModule* GetEMELog();
|
||||
#define EME_LOG(...) MOZ_LOG(GetEMELog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define EME_LOG_ENABLED() MOZ_LOG_TEST(GetEMELog(), mozilla::LogLevel::Debug)
|
||||
#endif
|
||||
|
||||
#ifndef EME_VERBOSE_LOG
|
||||
PRLogModuleInfo* GetEMEVerboseLog();
|
||||
LogModule* GetEMEVerboseLog();
|
||||
#define EME_VERBOSE_LOG(...) MOZ_LOG(GetEMEVerboseLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#else
|
||||
#ifndef EME_LOG
|
||||
|
@ -31,7 +31,7 @@
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
PRLogModuleInfo* gMediaEncoderLog;
|
||||
mozilla::LazyLogModule gMediaEncoderLog("MediaEncoder");
|
||||
#define LOG(type, msg) MOZ_LOG(gMediaEncoderLog, type, msg)
|
||||
|
||||
namespace mozilla {
|
||||
@ -79,9 +79,6 @@ MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint32_t aAudioBitrate,
|
||||
uint32_t aVideoBitrate, uint32_t aBitrate,
|
||||
uint8_t aTrackTypes)
|
||||
{
|
||||
if (!gMediaEncoderLog) {
|
||||
gMediaEncoderLog = PR_NewLogModule("MediaEncoder");
|
||||
}
|
||||
PROFILER_LABEL("MediaEncoder", "CreateEncoder",
|
||||
js::ProfileEntry::Category::OTHER);
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* gTrackEncoderLog;
|
||||
LazyLogModule gTrackEncoderLog("TrackEncoder");
|
||||
#define TRACK_LOG(type, msg) MOZ_LOG(gTrackEncoderLog, type, msg)
|
||||
|
||||
static const int DEFAULT_CHANNELS = 1;
|
||||
@ -37,9 +37,6 @@ TrackEncoder::TrackEncoder()
|
||||
, mAudioInitCounter(0)
|
||||
, mVideoInitCounter(0)
|
||||
{
|
||||
if (!gTrackEncoderLog) {
|
||||
gTrackEncoderLog = PR_NewLogModule("TrackEncoder");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* gVP8TrackEncoderLog;
|
||||
LazyLogModule gVP8TrackEncoderLog("VP8TrackEncoder");
|
||||
#define VP8LOG(msg, ...) MOZ_LOG(gVP8TrackEncoderLog, mozilla::LogLevel::Debug, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
@ -37,9 +37,6 @@ VP8TrackEncoder::VP8TrackEncoder()
|
||||
, mVPXImageWrapper(new vpx_image_t())
|
||||
{
|
||||
MOZ_COUNT_CTOR(VP8TrackEncoder);
|
||||
if (!gVP8TrackEncoderLog) {
|
||||
gVP8TrackEncoderLog = PR_NewLogModule("VP8TrackEncoder");
|
||||
}
|
||||
}
|
||||
|
||||
VP8TrackEncoder::~VP8TrackEncoder()
|
||||
|
@ -17,7 +17,7 @@ static const float BASE_QUALITY = 0.4f;
|
||||
namespace mozilla {
|
||||
|
||||
#undef LOG
|
||||
PRLogModuleInfo* gVorbisTrackEncoderLog;
|
||||
LazyLogModule gVorbisTrackEncoderLog("VorbisTrackEncoder");
|
||||
#define VORBISLOG(msg, ...) MOZ_LOG(gVorbisTrackEncoderLog, mozilla::LogLevel::Debug, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
|
||||
@ -25,9 +25,6 @@ VorbisTrackEncoder::VorbisTrackEncoder()
|
||||
: AudioTrackEncoder()
|
||||
{
|
||||
MOZ_COUNT_CTOR(VorbisTrackEncoder);
|
||||
if (!gVorbisTrackEncoderLog) {
|
||||
gVorbisTrackEncoderLog = PR_NewLogModule("VorbisTrackEncoder");
|
||||
}
|
||||
}
|
||||
|
||||
VorbisTrackEncoder::~VorbisTrackEncoder()
|
||||
|
@ -20,11 +20,8 @@
|
||||
#include "mp4_demuxer/AnnexB.h"
|
||||
#include "mp4_demuxer/H264.h"
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("MP4Demuxer");
|
||||
}
|
||||
mozilla::LogModule* GetDemuxerLog() {
|
||||
static mozilla::LazyLogModule log("MP4Demuxer");
|
||||
return log;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
#define LOGV(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Verbose, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
|
@ -43,7 +43,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#undef LOGD
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
#define LOG(level, x, ...) MOZ_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
|
||||
#define LOGD(x, ...) LOG(mozilla::LogLevel::Debug, "GMPChild[pid=%d] " x, (int)base::GetCurrentProcId(), ##__VA_ARGS__)
|
||||
|
||||
|
@ -20,7 +20,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
@ -14,7 +14,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
#define LOGV(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Verbose, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
|
@ -43,7 +43,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#undef LOGD
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
#define LOG(level, x, ...) MOZ_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
|
||||
#define LOGD(x, ...) LOG(mozilla::LogLevel::Debug, "GMPParent[%p|childPid=%d] " x, this, mChildPid, ##__VA_ARGS__)
|
||||
|
||||
|
@ -46,12 +46,10 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
PRLogModuleInfo*
|
||||
LogModule*
|
||||
GetGMPLog()
|
||||
{
|
||||
static PRLogModuleInfo *sLog;
|
||||
if (!sLog)
|
||||
sLog = PR_NewLogModule("GMP");
|
||||
static LazyLogModule sLog("GMP");
|
||||
return sLog;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ template <class> struct already_AddRefed;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
namespace gmp {
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
@ -13,7 +13,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
@ -21,7 +21,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
#define LOGV(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Verbose, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
|
@ -23,7 +23,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
extern LogModule* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define LOG(msg, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("GStreamerFormatHelper " msg, ##__VA_ARGS__))
|
||||
|
||||
|
@ -29,7 +29,7 @@ using namespace media;
|
||||
// Un-comment to enable logging of seek bisections.
|
||||
//#define SEEK_LOGGING
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define LOG(type, msg, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, type, ("GStreamerReader(%p) " msg, this, ##__VA_ARGS__))
|
||||
|
||||
|
@ -18,12 +18,9 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetICLog()
|
||||
LogModule* GetICLog()
|
||||
{
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("ImageCapture");
|
||||
}
|
||||
static LazyLogModule log("ImageCapture");
|
||||
return log;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
#ifndef IC_LOG
|
||||
PRLogModuleInfo* GetICLog();
|
||||
LogModule* GetICLog();
|
||||
#define IC_LOG(...) MOZ_LOG(GetICLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#endif
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define SINK_LOG(msg, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, \
|
||||
("DecodedAudioDataSink=%p " msg, this, ##__VA_ARGS__))
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define VSINK_LOG(msg, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, \
|
||||
("VideoSink=%p " msg, this, ##__VA_ARGS__))
|
||||
|
@ -20,7 +20,7 @@
|
||||
#endif
|
||||
#include "SourceBufferResource.h"
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceSamplesLog();
|
||||
extern mozilla::LogModule* GetMediaSourceSamplesLog();
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
|
@ -36,21 +36,15 @@
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
|
||||
PRLogModuleInfo* GetMediaSourceLog()
|
||||
mozilla::LogModule* GetMediaSourceLog()
|
||||
{
|
||||
static PRLogModuleInfo* sLogModule = nullptr;
|
||||
if (!sLogModule) {
|
||||
sLogModule = PR_NewLogModule("MediaSource");
|
||||
}
|
||||
static mozilla::LazyLogModule sLogModule("MediaSource");
|
||||
return sLogModule;
|
||||
}
|
||||
|
||||
PRLogModuleInfo* GetMediaSourceAPILog()
|
||||
mozilla::LogModule* GetMediaSourceAPILog()
|
||||
{
|
||||
static PRLogModuleInfo* sLogModule = nullptr;
|
||||
if (!sLogModule) {
|
||||
sLogModule = PR_NewLogModule("MediaSource");
|
||||
}
|
||||
static mozilla::LazyLogModule sLogModule("MediaSource");
|
||||
return sLogModule;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "MediaSourceDemuxer.h"
|
||||
#include "SourceBufferList.h"
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern mozilla::LogModule* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern mozilla::LogModule* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("MediaSourceResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetSourceBufferResourceLog();
|
||||
extern mozilla::LogModule* GetSourceBufferResourceLog();
|
||||
|
||||
#define SBR_DEBUG(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), mozilla::LogLevel::Debug, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define SBR_DEBUGV(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), mozilla::LogLevel::Verbose, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
@ -26,8 +26,8 @@
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern PRLogModuleInfo* GetMediaSourceAPILog();
|
||||
extern mozilla::LogModule* GetMediaSourceLog();
|
||||
extern mozilla::LogModule* GetMediaSourceAPILog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
@ -16,8 +16,8 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern PRLogModuleInfo* GetMediaSourceAPILog();
|
||||
extern mozilla::LogModule* GetMediaSourceLog();
|
||||
extern mozilla::LogModule* GetMediaSourceAPILog();
|
||||
|
||||
#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), mozilla::LogLevel::Debug, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
@ -13,12 +13,9 @@
|
||||
#include "mozilla/Logging.h"
|
||||
#include "MediaData.h"
|
||||
|
||||
PRLogModuleInfo* GetSourceBufferResourceLog()
|
||||
mozilla::LogModule* GetSourceBufferResourceLog()
|
||||
{
|
||||
static PRLogModuleInfo* sLogModule = nullptr;
|
||||
if (!sLogModule) {
|
||||
sLogModule = PR_NewLogModule("SourceBufferResource");
|
||||
}
|
||||
static mozilla::LazyLogModule sLogModule("SourceBufferResource");
|
||||
return sLogModule;
|
||||
}
|
||||
|
||||
|
@ -23,17 +23,14 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern mozilla::LogModule* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("TrackBuffersManager(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, ("TrackBuffersManager(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
PRLogModuleInfo* GetMediaSourceSamplesLog()
|
||||
mozilla::LogModule* GetMediaSourceSamplesLog()
|
||||
{
|
||||
static PRLogModuleInfo* sLogModule = nullptr;
|
||||
if (!sLogModule) {
|
||||
sLogModule = PR_NewLogModule("MediaSourceSamples");
|
||||
}
|
||||
static mozilla::LazyLogModule sLogModule("MediaSourceSamples");
|
||||
return sLogModule;
|
||||
}
|
||||
#define SAMPLE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceSamplesLog(), mozilla::LogLevel::Debug, ("TrackBuffersManager(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
|
||||
/** Decoder base class for Ogg-encapsulated streams. */
|
||||
|
@ -37,7 +37,7 @@ namespace mozilla {
|
||||
// Un-comment to enable logging of seek bisections.
|
||||
//#define SEEK_LOGGING
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
#ifdef SEEK_LOGGING
|
||||
#define SEEK_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
|
@ -24,7 +24,7 @@ extern "C" {
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define OPUS_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
|
||||
OpusParser::OpusParser():
|
||||
|
@ -42,7 +42,7 @@ using namespace android;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* gAudioOffloadPlayerLog;
|
||||
LazyLogModule gAudioOffloadPlayerLog("AudioOffloadPlayer");
|
||||
#define AUDIO_OFFLOAD_LOG(type, msg) \
|
||||
MOZ_LOG(gAudioOffloadPlayerLog, type, msg)
|
||||
|
||||
@ -63,10 +63,6 @@ AudioOffloadPlayer::AudioOffloadPlayer(MediaOmxCommonDecoder* aObserver) :
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!gAudioOffloadPlayerLog) {
|
||||
gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
|
||||
}
|
||||
|
||||
CHECK(aObserver);
|
||||
#if ANDROID_VERSION >= 21
|
||||
mSessionId = AudioSystem::newAudioUniqueId();
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gAudioOffloadPlayerLog;
|
||||
extern LazyLogModule gAudioOffloadPlayerLog;
|
||||
#define AUDIO_OFFLOAD_LOG(type, msg) \
|
||||
MOZ_LOG(gAudioOffloadPlayerLog, type, msg)
|
||||
|
||||
@ -37,9 +37,6 @@ AudioOutput::AudioOutput(int aSessionId, int aUid) :
|
||||
mUid(aUid),
|
||||
mSessionId(aSessionId)
|
||||
{
|
||||
if (!gAudioOffloadPlayerLog) {
|
||||
gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
|
||||
}
|
||||
}
|
||||
|
||||
AudioOutput::~AudioOutput()
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
PRLogModuleInfo *gI420ColorConverterHelperLog;
|
||||
mozilla::LazyLogModule gI420ColorConverterHelperLog("I420ColorConverterHelper");
|
||||
#define LOG(msg...) MOZ_LOG(gI420ColorConverterHelperLog, mozilla::LogLevel::Warning, (msg))
|
||||
|
||||
namespace android {
|
||||
@ -19,9 +19,6 @@ I420ColorConverterHelper::I420ColorConverterHelper()
|
||||
: mHandle(nullptr)
|
||||
, mConverter({nullptr, nullptr, nullptr, nullptr, nullptr})
|
||||
{
|
||||
if (!gI420ColorConverterHelperLog) {
|
||||
gI420ColorConverterHelperLog = PR_NewLogModule("I420ColorConverterHelper");
|
||||
}
|
||||
}
|
||||
|
||||
I420ColorConverterHelper::~I420ColorConverterHelper()
|
||||
|
@ -20,7 +20,7 @@ using namespace android;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
|
||||
MediaOmxCommonDecoder::MediaOmxCommonDecoder(MediaDecoderOwner* aOwner)
|
||||
|
@ -23,7 +23,7 @@ using namespace android;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
|
||||
MediaOmxCommonReader::MediaOmxCommonReader(AbstractMediaDecoder *aDecoder)
|
||||
|
@ -28,7 +28,7 @@ using namespace android;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
#define DECODER_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
|
||||
|
||||
class MediaOmxReader::ProcessCachedDataTask : public Task
|
||||
|
@ -37,7 +37,7 @@
|
||||
#define OD_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "OmxDecoder", __VA_ARGS__)
|
||||
|
||||
#undef LOG
|
||||
PRLogModuleInfo *gOmxDecoderLog;
|
||||
mozilla::LazyLogModule gOmxDecoderLog("OmxDecoder");
|
||||
#define LOG(type, msg...) MOZ_LOG(gOmxDecoderLog, type, (msg))
|
||||
|
||||
using namespace MPAPI;
|
||||
@ -102,10 +102,6 @@ static sp<IOMX> GetOMX()
|
||||
|
||||
bool
|
||||
OmxDecoder::Init(sp<MediaExtractor>& extractor) {
|
||||
if (!gOmxDecoderLog) {
|
||||
gOmxDecoderLog = PR_NewLogModule("OmxDecoder");
|
||||
}
|
||||
|
||||
sp<MetaData> meta = extractor->getMetaData();
|
||||
|
||||
ssize_t audioTrackIndex = -1;
|
||||
|
@ -6,10 +6,7 @@
|
||||
|
||||
#include "PlatformDecoderModule.h"
|
||||
|
||||
PRLogModuleInfo* GetPDMLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("PlatformDecoderModule");
|
||||
}
|
||||
mozilla::LogModule* GetPDMLog() {
|
||||
static mozilla::LazyLogModule log("PlatformDecoderModule");
|
||||
return log;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h> // For PRId64
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define OPUS_DEBUG(arg, ...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, \
|
||||
("OpusDataDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#undef LOG
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(arg, ...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, ("VPXDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
#undef LOG
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(type, msg) MOZ_LOG(GetPDMLog(), type, msg)
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "AppleATDecoder.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define FourCC2Str(n) ((char[5]){(char)(n >> 24), (char)(n >> 16), (char)(n >> 8), (char)(n), 0})
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "nsCocoaFeatures.h"
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "MacIOSurfaceImage.h"
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
//#define LOG_MEDIA_SHA1
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "MainThreadUtils.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "VideoUtils.h"
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
//#define LOG_MEDIA_SHA1
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#ifndef __FFmpegLog_h__
|
||||
#define __FFmpegLog_h__
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define FFMPEG_LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
#endif // __FFmpegLog_h__
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <android/log.h>
|
||||
#define GADM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkAudioDecoderManager", __VA_ARGS__)
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
using namespace android;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <utils/AndroidThreads.h>
|
||||
#endif
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
using namespace android;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <android/log.h>
|
||||
#define GVDM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkVideoDecoderManager", __VA_ARGS__)
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
using namespace mozilla::layers;
|
||||
using namespace android;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "WMFUtils.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
extern PRLogModuleInfo* GetPDMLog();
|
||||
extern mozilla::LogModule* GetPDMLog();
|
||||
#define LOG(...) MOZ_LOG(GetPDMLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
|
||||
using mozilla::layers::Image;
|
||||
|
@ -6,11 +6,8 @@
|
||||
|
||||
#include "FuzzingWrapper.h"
|
||||
|
||||
PRLogModuleInfo* GetFuzzingWrapperLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
log = PR_NewLogModule("MediaFuzzingWrapper");
|
||||
}
|
||||
mozilla::LogModule* GetFuzzingWrapperLog() {
|
||||
static mozilla::LazyLogModule log("MediaFuzzingWrapper");
|
||||
return log;
|
||||
}
|
||||
#define DFW_LOGD(arg, ...) MOZ_LOG(GetFuzzingWrapperLog(), mozilla::LogLevel::Debug, ("DecoderFuzzingWrapper(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#undef LOG
|
||||
#undef LOG_ENABLED
|
||||
PRLogModuleInfo *gCamerasChildLog;
|
||||
mozilla::LazyLogModule gCamerasChildLog("CamerasChild");
|
||||
#define LOG(args) MOZ_LOG(gCamerasChildLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gCamerasChildLog, mozilla::LogLevel::Debug)
|
||||
|
||||
@ -56,9 +56,6 @@ public:
|
||||
: mCamerasMutex("CamerasSingleton::mCamerasMutex"),
|
||||
mCameras(nullptr),
|
||||
mCamerasChildThread(nullptr) {
|
||||
if (!gCamerasChildLog) {
|
||||
gCamerasChildLog = PR_NewLogModule("CamerasChild");
|
||||
}
|
||||
LOG(("CamerasSingleton: %p", this));
|
||||
}
|
||||
|
||||
@ -144,10 +141,6 @@ Cameras() {
|
||||
OffTheBooksMutexAutoLock lock(CamerasSingleton::Mutex());
|
||||
if (!CamerasSingleton::Child()) {
|
||||
MOZ_ASSERT(!NS_IsMainThread(), "Should not be on the main Thread");
|
||||
if (!gCamerasChildLog) {
|
||||
gCamerasChildLog = PR_NewLogModule("CamerasChild");
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!CamerasSingleton::Thread());
|
||||
LOG(("No sCameras, setting up IPC Thread"));
|
||||
nsresult rv = NS_NewNamedThread("Cameras IPC",
|
||||
@ -706,10 +699,6 @@ CamerasChild::CamerasChild()
|
||||
mRequestMutex("mozilla::cameras::CamerasChild::mRequestMutex"),
|
||||
mReplyMonitor("mozilla::cameras::CamerasChild::mReplyMonitor")
|
||||
{
|
||||
if (!gCamerasChildLog) {
|
||||
gCamerasChildLog = PR_NewLogModule("CamerasChild");
|
||||
}
|
||||
|
||||
LOG(("CamerasChild: %p", this));
|
||||
|
||||
MOZ_COUNT_CTOR(CamerasChild);
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#undef LOG
|
||||
#undef LOG_ENABLED
|
||||
PRLogModuleInfo *gCamerasParentLog;
|
||||
mozilla::LazyLogModule gCamerasParentLog("CamerasParent");
|
||||
#define LOG(args) MOZ_LOG(gCamerasParentLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gCamerasParentLog, mozilla::LogLevel::Debug)
|
||||
|
||||
@ -852,9 +852,6 @@ CamerasParent::CamerasParent()
|
||||
mDestroyed(false),
|
||||
mWebRTCAlive(true)
|
||||
{
|
||||
if (!gCamerasParentLog) {
|
||||
gCamerasParentLog = PR_NewLogModule("CamerasParent");
|
||||
}
|
||||
LOG(("CamerasParent: %p", this));
|
||||
|
||||
mPBackgroundThread = NS_GetCurrentThread();
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
|
||||
// NSPR_LOG_MODULES=LoadManager:5
|
||||
PRLogModuleInfo *gLoadManagerLog = nullptr;
|
||||
mozilla::LazyLogModule gLoadManagerLog("LoadManager");
|
||||
#undef LOG
|
||||
#undef LOG_ENABLED
|
||||
#define LOG(args) MOZ_LOG(gLoadManagerLog, mozilla::LogLevel::Debug, args)
|
||||
@ -46,8 +46,6 @@ LoadManagerSingleton::LoadManagerSingleton(int aLoadMeasurementInterval,
|
||||
mHighLoadThreshold(aHighLoadThreshold),
|
||||
mLowLoadThreshold(aLowLoadThreshold)
|
||||
{
|
||||
if (!gLoadManagerLog)
|
||||
gLoadManagerLog = PR_NewLogModule("LoadManager");
|
||||
LOG(("LoadManager - Initializing (%dms x %d, %f, %f)",
|
||||
mLoadMeasurementInterval, mAveragingMeasurements,
|
||||
mHighLoadThreshold, mLowLoadThreshold));
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "webrtc/common_types.h"
|
||||
#include "webrtc/video_engine/include/vie_base.h"
|
||||
|
||||
extern PRLogModuleInfo *gLoadManagerLog;
|
||||
extern mozilla::LazyLogModule gLoadManagerLog;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "nsQueryObject.h"
|
||||
|
||||
#undef LOG
|
||||
PRLogModuleInfo *gMediaChildLog;
|
||||
mozilla::LazyLogModule gMediaChildLog("MediaChild");
|
||||
#define LOG(args) MOZ_LOG(gMediaChildLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
namespace mozilla {
|
||||
@ -68,9 +68,6 @@ Child* Child::Get()
|
||||
Child::Child()
|
||||
: mActorDestroyed(false)
|
||||
{
|
||||
if (!gMediaChildLog) {
|
||||
gMediaChildLog = PR_NewLogModule("MediaChild");
|
||||
}
|
||||
LOG(("media::Child: %p", this));
|
||||
MOZ_COUNT_CTOR(Child);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
#undef LOG
|
||||
PRLogModuleInfo *gMediaParentLog;
|
||||
mozilla::LazyLogModule gMediaParentLog("MediaParent");
|
||||
#define LOG(args) MOZ_LOG(gMediaParentLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
// A file in the profile dir is used to persist mOriginKeys used to anonymize
|
||||
@ -511,8 +511,6 @@ Parent<Super>::Parent(bool aSameProcess)
|
||||
, mDestroyed(false)
|
||||
, mSameProcess(aSameProcess)
|
||||
{
|
||||
if (!gMediaParentLog)
|
||||
gMediaParentLog = PR_NewLogModule("MediaParent");
|
||||
LOG(("media::Parent: %p", this));
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
// NSPR_LOG_MODULES=OpenSLESProvider:5
|
||||
#undef LOG
|
||||
#undef LOG_ENABLED
|
||||
PRLogModuleInfo *gOpenSLESProviderLog;
|
||||
mozilla::LazyLogModule gOpenSLESProviderLog("OpenSLESProvider");
|
||||
#define LOG(args) MOZ_LOG(gOpenSLESProviderLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gOpenSLESProviderLog, mozilla::LogLevel::Debug)
|
||||
|
||||
@ -27,8 +27,6 @@ OpenSLESProvider::OpenSLESProvider()
|
||||
mIsRealized(false),
|
||||
mOpenSLESLib(nullptr)
|
||||
{
|
||||
if (!gOpenSLESProviderLog)
|
||||
gOpenSLESProviderLog = PR_NewLogModule("OpenSLESProvider");
|
||||
LOG(("OpenSLESProvider being initialized"));
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ SLresult mozilla_realize_sles_engine(SLObjectItf aObjectm);
|
||||
#ifdef __cplusplus
|
||||
#include "mozilla/Mutex.h"
|
||||
|
||||
extern PRLogModuleInfo *gOpenSLESProviderLog;
|
||||
extern mozilla::LazyLogModule gOpenSLESProviderLog;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user