--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -29,19 +29,21 @@
#include "nsContentUtils.h"
#include "nsHostObjectProtocolHandler.h"
#include <algorithm>
#include "nsProxyRelease.h"
#include "nsIContentPolicy.h"
using mozilla::media::TimeUnit;
+#undef LOG
+
mozilla::LazyLogModule gMediaResourceLog("MediaResource");
// Debug logging macro with object pointer and class name.
-#define CMLOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
+#define LOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
("%p " msg, this, ##__VA_ARGS__))
static const uint32_t HTTP_OK_CODE = 200;
static const uint32_t HTTP_PARTIAL_RESPONSE_CODE = 206;
namespace mozilla {
void
@@ -354,18 +356,18 @@ ChannelMediaResource::ParseContentRangeH
if (aRangeTotalText[0] == '*') {
aRangeTotal = -1;
} else {
aRangeTotal = aRangeTotalText.ToInteger64(&rv);
NS_ENSURE_TRUE(aRangeEnd < aRangeTotal, NS_ERROR_ILLEGAL_VALUE);
NS_ENSURE_SUCCESS(rv, rv);
}
- CMLOG("Received bytes [%" PRId64 "] to [%" PRId64 "] of [%" PRId64 "] for decoder[%p]",
- aRangeStart, aRangeEnd, aRangeTotal, mCallback.get());
+ LOG("Received bytes [%" PRId64 "] to [%" PRId64 "] of [%" PRId64 "] for decoder[%p]",
+ aRangeStart, aRangeEnd, aRangeTotal, mCallback.get());
return NS_OK;
}
nsresult
ChannelMediaResource::OnStopRequest(nsIRequest* aRequest, nsresult aStatus)
{
NS_ASSERTION(mChannel.get() == aRequest, "Wrong channel!");
@@ -427,19 +429,19 @@ nsresult
ChannelMediaResource::CopySegmentToCache(nsIPrincipal* aPrincipal,
const char* aFromSegment,
uint32_t aCount,
uint32_t* aWriteCount)
{
mCallback->NotifyDataArrived();
// Keep track of where we're up to.
- CMLOG("CopySegmentToCache at mOffset [%" PRId64 "] add "
- "[%d] bytes for decoder[%p]",
- mOffset, aCount, mCallback.get());
+ LOG("CopySegmentToCache at mOffset [%" PRId64 "] add "
+ "[%d] bytes for decoder[%p]",
+ mOffset, aCount, mCallback.get());
mOffset += aCount;
mCacheStream.NotifyDataReceived(aCount, aFromSegment, aPrincipal);
*aWriteCount = aCount;
return NS_OK;
}
struct CopySegmentClosure {
@@ -902,18 +904,18 @@ ChannelMediaResource::CacheClientNotifyS
mCallback->NotifySuspendedStatusChanged();
}
nsresult
ChannelMediaResource::CacheClientSeek(int64_t aOffset, bool aResume)
{
NS_ASSERTION(NS_IsMainThread(), "Don't call on non-main thread");
- CMLOG("CacheClientSeek requested for aOffset [%" PRId64 "] for decoder [%p]",
- aOffset, mCallback.get());
+ LOG("CacheClientSeek requested for aOffset [%" PRId64 "] for decoder [%p]",
+ aOffset, mCallback.get());
CloseChannel();
mOffset = aOffset;
// Don't report close of the channel because the channel is not closed for
// download ended, but for internal changes in the read position.
mIgnoreClose = true;
@@ -1655,8 +1657,10 @@ MediaResourceIndex::Seek(int32_t aWhence
mOffset = aOffset;
return NS_OK;
}
} // namespace mozilla
+// avoid redefined macro in unified build
+#undef LOG