зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1163201 - Part 1: Remove instances of #ifdef PR_LOGGING in dom/. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
This commit is contained in:
Родитель
67351b86be
Коммит
34f99e4b4c
|
@ -22,9 +22,7 @@
|
|||
|
||||
NS_IMPL_ISUPPORTS(nsContentPolicy, nsIContentPolicy)
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gConPolLog;
|
||||
#endif
|
||||
|
||||
nsresult
|
||||
NS_NewContentPolicy(nsIContentPolicy **aResult)
|
||||
|
@ -40,11 +38,9 @@ nsContentPolicy::nsContentPolicy()
|
|||
: mPolicies(NS_CONTENTPOLICY_CATEGORY)
|
||||
, mSimplePolicies(NS_SIMPLECONTENTPOLICY_CATEGORY)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (! gConPolLog) {
|
||||
gConPolLog = PR_NewLogModule("nsContentPolicy");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
nsContentPolicy::~nsContentPolicy()
|
||||
|
@ -187,8 +183,6 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
//uses the parameters from ShouldXYZ to produce and log a message
|
||||
//logType must be a literal string constant
|
||||
#define LOG_CHECK(logType) \
|
||||
|
@ -216,12 +210,6 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
|
|||
} \
|
||||
PR_END_MACRO
|
||||
|
||||
#else //!defined(PR_LOGGING)
|
||||
|
||||
#define LOG_CHECK(logType)
|
||||
|
||||
#endif //!defined(PR_LOGGING)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentPolicy::ShouldLoad(uint32_t contentType,
|
||||
nsIURI *contentLocation,
|
||||
|
|
|
@ -56,7 +56,6 @@ class nsIPrincipal;
|
|||
case nsIContentPolicy:: name : \
|
||||
return #name
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
/**
|
||||
* Returns a string corresponding to the name of the response constant, or
|
||||
* "<Unknown Response>" if an unknown response value is given.
|
||||
|
@ -119,8 +118,6 @@ NS_CP_ContentTypeName(uint32_t contentType)
|
|||
}
|
||||
}
|
||||
|
||||
#endif // defined(PR_LOGGING)
|
||||
|
||||
#undef CASE_RETURN
|
||||
|
||||
/* Passes on parameters from its "caller"'s context. */
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
#include "base/basictypes.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetDataChannelLog();
|
||||
#endif
|
||||
#undef LOG
|
||||
#define LOG(args) PR_LOG(GetDataChannelLog(), PR_LOG_DEBUG, args)
|
||||
|
||||
|
|
|
@ -241,10 +241,8 @@ using namespace mozilla::dom;
|
|||
|
||||
typedef nsTArray<Link*> LinkArray;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gDocumentLeakPRLog;
|
||||
static PRLogModuleInfo* gCspPRLog;
|
||||
#endif
|
||||
|
||||
#define NAME_NOT_VALID ((nsSimpleContentList*)1)
|
||||
|
||||
|
@ -1591,7 +1589,6 @@ nsDocument::nsDocument(const char* aContentType)
|
|||
{
|
||||
SetContentTypeInternal(nsDependentCString(aContentType));
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (!gDocumentLeakPRLog)
|
||||
gDocumentLeakPRLog = PR_NewLogModule("DocumentLeak");
|
||||
|
||||
|
@ -1601,7 +1598,6 @@ nsDocument::nsDocument(const char* aContentType)
|
|||
|
||||
if (!gCspPRLog)
|
||||
gCspPRLog = PR_NewLogModule("CSP");
|
||||
#endif
|
||||
|
||||
// Start out mLastStyleSheetSet as null, per spec
|
||||
SetDOMStringToNull(mLastStyleSheetSet);
|
||||
|
@ -1640,11 +1636,9 @@ nsIDocument::~nsIDocument()
|
|||
|
||||
nsDocument::~nsDocument()
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (gDocumentLeakPRLog)
|
||||
PR_LOG(gDocumentLeakPRLog, PR_LOG_DEBUG,
|
||||
("DOCUMENT %p destroyed", this));
|
||||
#endif
|
||||
|
||||
NS_ASSERTION(!mIsShowing, "Destroying a currently-showing document");
|
||||
|
||||
|
@ -2309,13 +2303,11 @@ nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
|
|||
{
|
||||
NS_PRECONDITION(aURI, "Null URI passed to ResetToURI");
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
PR_LogPrint("DOCUMENT %p ResetToURI %s", this, spec.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
mSecurityInfo = nullptr;
|
||||
|
||||
|
@ -2644,7 +2636,6 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
|
|||
nsIStreamListener **aDocListener,
|
||||
bool aReset, nsIContentSink* aSink)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
aChannel->GetURI(getter_AddRefs(uri));
|
||||
|
@ -2653,7 +2644,6 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
|
|||
uri->GetSpec(spec);
|
||||
PR_LogPrint("DOCUMENT %p StartDocumentLoad %s", this, spec.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_ASSERT(NodePrincipal()->GetAppId() != nsIScriptSecurityManager::UNKNOWN_APP_ID,
|
||||
"Document should never have UNKNOWN_APP_ID");
|
||||
|
@ -2780,13 +2770,11 @@ AppendCSPFromHeader(nsIContentSecurityPolicy* csp,
|
|||
const nsSubstring& policy = tokenizer.nextToken();
|
||||
rv = csp->AppendPolicy(policy, aReportOnly);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
#ifdef PR_LOGGING
|
||||
{
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("CSP refined with policy: \"%s\"",
|
||||
NS_ConvertUTF16toUTF8(policy).get()));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -2823,10 +2811,8 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
{
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp;
|
||||
if (!CSPService::sCSPEnabled) {
|
||||
#ifdef PR_LOGGING
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("CSP is disabled, skipping CSP init for document %p", this));
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2878,7 +2864,6 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
!applyLoopCSP &&
|
||||
cspHeaderValue.IsEmpty() &&
|
||||
cspROHeaderValue.IsEmpty()) {
|
||||
#ifdef PR_LOGGING
|
||||
nsCOMPtr<nsIURI> chanURI;
|
||||
aChannel->GetURI(getter_AddRefs(chanURI));
|
||||
nsAutoCString aspec;
|
||||
|
@ -2887,13 +2872,10 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
("no CSP for document, %s, %s",
|
||||
aspec.get(),
|
||||
applyAppDefaultCSP ? "is app" : "not an app"));
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("Document is an app or CSP header specified %p", this));
|
||||
#endif
|
||||
|
||||
nsresult rv;
|
||||
|
||||
|
@ -2912,12 +2894,10 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (csp) {
|
||||
#ifdef PR_LOGGING
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("%s %s %s",
|
||||
"This document is sharing principal with another document.",
|
||||
"Since the document is an app, CSP was already set.",
|
||||
"Skipping attempt to set CSP."));
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -2925,9 +2905,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
csp = do_CreateInstance("@mozilla.org/cspcontext;1", &rv);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
#ifdef PR_LOGGING
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("Failed to create CSP object: %x", rv));
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -2980,10 +2958,8 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
rv = csp->PermitsAncestry(docShell, &safeAncestry);
|
||||
|
||||
if (NS_FAILED(rv) || !safeAncestry) {
|
||||
#ifdef PR_LOGGING
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("CSP doesn't like frame's ancestry, not loading."));
|
||||
#endif
|
||||
// stop! ERROR page!
|
||||
aChannel->Cancel(NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION);
|
||||
}
|
||||
|
@ -3002,13 +2978,11 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
mReferrerPolicySet = true;
|
||||
} else if (mReferrerPolicy != referrerPolicy) {
|
||||
mReferrerPolicy = mozilla::net::RP_No_Referrer;
|
||||
#ifdef PR_LOGGING
|
||||
{
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG, ("%s %s",
|
||||
"CSP wants to set referrer, but nsDocument"
|
||||
"already has it set. No referrers will be sent"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Referrer Policy is set separately for the speculative parser in
|
||||
|
@ -3018,10 +2992,8 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
|||
|
||||
rv = principal->SetCsp(csp);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
#ifdef PR_LOGGING
|
||||
PR_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("Inserted CSP into principal %p", principal));
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -71,8 +71,6 @@ using namespace mozilla;
|
|||
using namespace mozilla::dom;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
// Two types of focus pr logging are available:
|
||||
// 'Focus' for normal focus manager calls
|
||||
// 'FocusNavigation' for tab and document navigation
|
||||
|
@ -94,15 +92,6 @@ PRLogModuleInfo* gFocusNavigationLog;
|
|||
#define LOGCONTENT(format, content) LOGTAG(gFocusLog, format, content)
|
||||
#define LOGCONTENTNAVIGATION(format, content) LOGTAG(gFocusNavigationLog, format, content)
|
||||
|
||||
#else
|
||||
|
||||
#define LOGFOCUS(args)
|
||||
#define LOGFOCUSNAVIGATION(args)
|
||||
#define LOGCONTENT(format, content)
|
||||
#define LOGCONTENTNAVIGATION(format, content)
|
||||
|
||||
#endif
|
||||
|
||||
struct nsDelayedBlurOrFocusEvent
|
||||
{
|
||||
nsDelayedBlurOrFocusEvent(uint32_t aType,
|
||||
|
@ -198,10 +187,8 @@ nsFocusManager::Init()
|
|||
NS_ADDREF(fm);
|
||||
sInstance = fm;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
gFocusLog = PR_NewLogModule("Focus");
|
||||
gFocusNavigationLog = PR_NewLogModule("FocusNavigation");
|
||||
#endif
|
||||
|
||||
nsIContent::sTabFocusModelAppliesToXUL =
|
||||
Preferences::GetBool("accessibility.tabfocus_applies_to_xul",
|
||||
|
@ -493,7 +480,6 @@ nsFocusManager::MoveFocus(nsIDOMWindow* aWindow, nsIDOMElement* aStartElement,
|
|||
{
|
||||
*aElement = nullptr;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
LOGFOCUS(("<<MoveFocus begin Type: %d Flags: %x>>", aType, aFlags));
|
||||
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG) && mFocusedWindow) {
|
||||
|
@ -506,7 +492,6 @@ nsFocusManager::MoveFocus(nsIDOMWindow* aWindow, nsIDOMElement* aStartElement,
|
|||
}
|
||||
|
||||
LOGCONTENT(" Current Focus: %s", mFocusedContent.get());
|
||||
#endif
|
||||
|
||||
// use FLAG_BYMOVEFOCUS when switching focus with MoveFocus unless one of
|
||||
// the other focus methods is already set, or we're just moving to the root
|
||||
|
@ -653,7 +638,6 @@ nsFocusManager::WindowRaised(nsIDOMWindow* aWindow)
|
|||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
|
||||
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Raised [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
|
@ -670,7 +654,6 @@ nsFocusManager::WindowRaised(nsIDOMWindow* aWindow)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mActiveWindow == window) {
|
||||
// The window is already active, so there is no need to focus anything,
|
||||
|
@ -751,7 +734,6 @@ nsFocusManager::WindowLowered(nsIDOMWindow* aWindow)
|
|||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
|
||||
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Lowered [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
|
@ -768,7 +750,6 @@ nsFocusManager::WindowLowered(nsIDOMWindow* aWindow)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mActiveWindow != window)
|
||||
return NS_OK;
|
||||
|
@ -871,7 +852,6 @@ nsFocusManager::WindowShown(nsIDOMWindow* aWindow, bool aNeedsFocus)
|
|||
|
||||
window = window->GetOuterWindow();
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Shown [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
|
@ -889,7 +869,6 @@ nsFocusManager::WindowShown(nsIDOMWindow* aWindow, bool aNeedsFocus)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (nsCOMPtr<nsITabChild> child = do_GetInterface(window->GetDocShell())) {
|
||||
bool active = static_cast<TabChild*>(child.get())->ParentIsActive();
|
||||
|
@ -928,7 +907,6 @@ nsFocusManager::WindowHidden(nsIDOMWindow* aWindow)
|
|||
|
||||
window = window->GetOuterWindow();
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Hidden [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
|
@ -954,7 +932,6 @@ nsFocusManager::WindowHidden(nsIDOMWindow* aWindow)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!IsSameOrAncestor(window, mFocusedWindow))
|
||||
return NS_OK;
|
||||
|
@ -1799,7 +1776,6 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
|
|||
clearFirstFocusEvent = true;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
LOGCONTENT("Element %s has been focused", aContent);
|
||||
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
|
@ -1810,7 +1786,6 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
|
|||
LOGFOCUS((" [Newdoc: %d FocusChanged: %d Raised: %d Flags: %x]",
|
||||
aIsNewDocument, aFocusChanged, aWindowRaised, aFlags));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aIsNewDocument) {
|
||||
// if this is a new document, update the parent chain of frames so that
|
||||
|
|
|
@ -246,9 +246,7 @@ class nsIScriptTimeoutHandler;
|
|||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gDOMLeakPRLog;
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include <process.h>
|
||||
|
@ -1212,11 +1210,9 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gDOMLeakPRLog)
|
||||
PR_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
|
||||
("DOMWINDOW %p created outer=%p", this, aOuterWindow));
|
||||
#endif
|
||||
|
||||
NS_ASSERTION(sWindowsById, "Windows hash table must be created!");
|
||||
NS_ASSERTION(!sWindowsById->Get(mWindowID),
|
||||
|
@ -1248,10 +1244,8 @@ nsGlobalWindow::Init()
|
|||
NS_ASSERTION(gEntropyCollector,
|
||||
"gEntropyCollector should have been initialized!");
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
gDOMLeakPRLog = PR_NewLogModule("DOMLeak");
|
||||
NS_ASSERTION(gDOMLeakPRLog, "gDOMLeakPRLog should have been initialized!");
|
||||
#endif
|
||||
|
||||
sWindowsById = new WindowByIdTable();
|
||||
}
|
||||
|
@ -1306,11 +1300,9 @@ nsGlobalWindow::~nsGlobalWindow()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gDOMLeakPRLog)
|
||||
PR_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
|
||||
("DOMWINDOW %p destroyed", this));
|
||||
#endif
|
||||
|
||||
if (IsOuterWindow()) {
|
||||
JSObject *proxy = GetWrapperPreserveColor();
|
||||
|
@ -2812,7 +2804,6 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
|
|||
NS_PRECONDITION(IsInnerWindow(), "Must only be called on inner windows");
|
||||
MOZ_ASSERT(aDocument);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gDOMLeakPRLog && PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
nsIURI *uri = aDocument->GetDocumentURI();
|
||||
nsAutoCString spec;
|
||||
|
@ -2820,7 +2811,6 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
|
|||
uri->GetSpec(spec);
|
||||
PR_LogPrint("DOMWINDOW %p SetNewDocument %s", this, spec.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
mDoc = aDocument;
|
||||
ClearDocumentDependentSlots(aCx);
|
||||
|
@ -10568,11 +10558,9 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
|
|||
}
|
||||
|
||||
if (mSessionStorage) {
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p has %p sessionStorage", this, mSessionStorage.get());
|
||||
}
|
||||
#endif
|
||||
bool canAccess = mSessionStorage->CanAccess(principal);
|
||||
NS_ASSERTION(canAccess,
|
||||
"This window owned sessionStorage "
|
||||
|
@ -10621,11 +10609,9 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
|
|||
mSessionStorage = static_cast<DOMStorage*>(storage.get());
|
||||
MOZ_ASSERT(mSessionStorage);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p tried to get a new sessionStorage %p", this, mSessionStorage.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!mSessionStorage) {
|
||||
aError.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
|
||||
|
@ -10633,11 +10619,9 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p returns %p sessionStorage", this, mSessionStorage.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
return mSessionStorage;
|
||||
}
|
||||
|
@ -11553,12 +11537,10 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p with sessionStorage %p passing event from %p",
|
||||
this, mSessionStorage.get(), changingStorage.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
fireMozStorageChanged = mSessionStorage == changingStorage;
|
||||
break;
|
||||
|
|
|
@ -36,9 +36,7 @@ using mozilla::dom::NodeInfo;
|
|||
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gNodeInfoManagerLeakPRLog;
|
||||
#endif
|
||||
|
||||
PLHashNumber
|
||||
nsNodeInfoManager::GetNodeInfoInnerHashValue(const void *key)
|
||||
|
@ -117,14 +115,12 @@ nsNodeInfoManager::nsNodeInfoManager()
|
|||
{
|
||||
nsLayoutStatics::AddRef();
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (!gNodeInfoManagerLeakPRLog)
|
||||
gNodeInfoManagerLeakPRLog = PR_NewLogModule("NodeInfoManagerLeak");
|
||||
|
||||
if (gNodeInfoManagerLeakPRLog)
|
||||
PR_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
|
||||
("NODEINFOMANAGER %p created", this));
|
||||
#endif
|
||||
|
||||
mNodeInfoHash = PL_NewHashTable(32, GetNodeInfoInnerHashValue,
|
||||
NodeInfoInnerKeyCompare,
|
||||
|
@ -142,11 +138,9 @@ nsNodeInfoManager::~nsNodeInfoManager()
|
|||
|
||||
mBindingManager = nullptr;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gNodeInfoManagerLeakPRLog)
|
||||
PR_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
|
||||
("NODEINFOMANAGER %p destroyed", this));
|
||||
#endif
|
||||
|
||||
nsLayoutStatics::Release();
|
||||
}
|
||||
|
@ -201,11 +195,9 @@ nsNodeInfoManager::Init(nsIDocument *aDocument)
|
|||
|
||||
mDocument = aDocument;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (gNodeInfoManagerLeakPRLog)
|
||||
PR_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
|
||||
("NODEINFOMANAGER %p Init document=%p", this, aDocument));
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,6 @@ static const char *kPrefJavaMIME = "plugin.java.mime";
|
|||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo*
|
||||
GetObjectLog()
|
||||
{
|
||||
|
@ -115,7 +114,6 @@ GetObjectLog()
|
|||
sLog = PR_NewLogModule("objlc");
|
||||
return sLog;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LOG(args) PR_LOG(GetObjectLog(), PR_LOG_DEBUG, args)
|
||||
#define LOG_ENABLED() PR_LOG_TEST(GetObjectLog(), PR_LOG_DEBUG)
|
||||
|
|
|
@ -54,9 +54,7 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gCspPRLog;
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -109,10 +107,8 @@ nsScriptLoader::nsScriptLoader(nsIDocument *aDocument)
|
|||
mBlockingDOMContentLoaded(false)
|
||||
{
|
||||
// enable logging for CSP
|
||||
#ifdef PR_LOGGING
|
||||
if (!gCspPRLog)
|
||||
gCspPRLog = PR_NewLogModule("CSP");
|
||||
#endif
|
||||
}
|
||||
|
||||
nsScriptLoader::~nsScriptLoader()
|
||||
|
|
|
@ -17,12 +17,8 @@
|
|||
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetCameraLog();
|
||||
#define DOM_CAMERA_LOG( type, ... ) PR_LOG(GetCameraLog(), (PRLogModuleLevel)type, ( __VA_ARGS__ ))
|
||||
#else
|
||||
#define DOM_CAMERA_LOG( type, ... )
|
||||
#endif
|
||||
|
||||
#define DOM_CAMERA_LOGA( ... ) DOM_CAMERA_LOG( 0, __VA_ARGS__ )
|
||||
|
||||
|
@ -42,16 +38,12 @@ enum {
|
|||
* DOM_CAMERA_LOGR() can be called before 'gCameraLog' is set, so
|
||||
* we need to handle this one a little differently.
|
||||
*/
|
||||
#ifdef PR_LOGGING
|
||||
#define DOM_CAMERA_LOGR( ... ) \
|
||||
do { \
|
||||
if (GetCameraLog()) { \
|
||||
DOM_CAMERA_LOG( DOM_CAMERA_LOG_REFERENCES, __VA_ARGS__ ); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define DOM_CAMERA_LOGR( ... )
|
||||
#endif
|
||||
#define DOM_CAMERA_LOGT( ... ) DOM_CAMERA_LOG( DOM_CAMERA_LOG_TRACE, __VA_ARGS__ )
|
||||
#define DOM_CAMERA_LOGI( ... ) DOM_CAMERA_LOG( DOM_CAMERA_LOG_INFO, __VA_ARGS__ )
|
||||
#define DOM_CAMERA_LOGW( ... ) DOM_CAMERA_LOG( DOM_CAMERA_LOG_WARNING, __VA_ARGS__ )
|
||||
|
|
|
@ -92,7 +92,6 @@ CameraControlImpl::OnHardwareStateChange(CameraControlListener::HardwareState aN
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
const char* state[] = { "uninitialized", "closed", "open", "failed" };
|
||||
MOZ_ASSERT(aNewState >= 0);
|
||||
if (static_cast<unsigned int>(aNewState) < sizeof(state) / sizeof(state[0])) {
|
||||
|
@ -101,7 +100,6 @@ CameraControlImpl::OnHardwareStateChange(CameraControlListener::HardwareState aN
|
|||
} else {
|
||||
DOM_CAMERA_LOGE("OnHardwareStateChange: got invalid HardwareState value %d\n", aNewState);
|
||||
}
|
||||
#endif
|
||||
|
||||
mHardwareState = aNewState;
|
||||
mHardwareStateChangeReason = aReason;
|
||||
|
@ -221,7 +219,6 @@ CameraControlImpl::OnPreviewStateChange(CameraControlListener::PreviewState aNew
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
const char* state[] = { "stopped", "paused", "started" };
|
||||
MOZ_ASSERT(aNewState >= 0);
|
||||
if (static_cast<unsigned int>(aNewState) < sizeof(state) / sizeof(state[0])) {
|
||||
|
@ -229,7 +226,6 @@ CameraControlImpl::OnPreviewStateChange(CameraControlListener::PreviewState aNew
|
|||
} else {
|
||||
DOM_CAMERA_LOGE("OnPreviewStateChange: got unknown PreviewState value %d\n", aNewState);
|
||||
}
|
||||
#endif
|
||||
|
||||
mPreviewState = aNewState;
|
||||
|
||||
|
@ -280,7 +276,6 @@ CameraControlImpl::OnUserError(CameraControlListener::UserContext aContext,
|
|||
// the Camera Thread.
|
||||
RwLockAutoEnterRead lock(mListenerLock);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
const char* context[] = {
|
||||
"StartCamera",
|
||||
"StopCamera",
|
||||
|
@ -305,7 +300,6 @@ CameraControlImpl::OnUserError(CameraControlListener::UserContext aContext,
|
|||
DOM_CAMERA_LOGE("CameraControlImpl::OnUserError : aContext=%d, aError=0x%x\n",
|
||||
aContext, aError);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (uint32_t i = 0; i < mListeners.Length(); ++i) {
|
||||
CameraControlListener* l = mListeners[i];
|
||||
|
@ -321,7 +315,6 @@ CameraControlImpl::OnSystemError(CameraControlListener::SystemContext aContext,
|
|||
// the Camera Thread.
|
||||
RwLockAutoEnterRead lock(mListenerLock);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
const char* context[] = {
|
||||
"Camera Service"
|
||||
};
|
||||
|
@ -332,7 +325,6 @@ CameraControlImpl::OnSystemError(CameraControlListener::SystemContext aContext,
|
|||
DOM_CAMERA_LOGE("CameraControlImpl::OnSystemError : aContext=%d, aError=0x%x\n",
|
||||
aContext, aError);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (uint32_t i = 0; i < mListeners.Length(); ++i) {
|
||||
CameraControlListener* l = mListeners[i];
|
||||
|
|
|
@ -2246,12 +2246,7 @@ OnSystemError(nsGonkCameraControl* gc,
|
|||
CameraControlListener::SystemContext aWhere,
|
||||
int32_t aArg1, int32_t aArg2)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
DOM_CAMERA_LOGE("OnSystemError : aWhere=%d, aArg1=%d, aArg2=%d\n", aWhere, aArg1, aArg2);
|
||||
#else
|
||||
unused << aArg1;
|
||||
unused << aArg2;
|
||||
#endif
|
||||
gc->OnSystemError(aWhere, NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ namespace mozilla {
|
|||
using namespace dom;
|
||||
using namespace widget;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
/**
|
||||
* When a method is called, log its arguments and/or related static variables
|
||||
* with PR_LOG_ALWAYS. However, if it puts too many logs like
|
||||
|
@ -177,7 +176,6 @@ GetNotifyIMEMessageName(IMEMessage aMessage)
|
|||
return "unacceptable IME notification message";
|
||||
}
|
||||
}
|
||||
#endif // #ifdef PR_LOGGING
|
||||
|
||||
nsIContent* IMEStateManager::sContent = nullptr;
|
||||
nsPresContext* IMEStateManager::sPresContext = nullptr;
|
||||
|
@ -194,11 +192,9 @@ TextCompositionArray* IMEStateManager::sTextCompositions = nullptr;
|
|||
void
|
||||
IMEStateManager::Init()
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!sISMLog) {
|
||||
sISMLog = PR_NewLogModule("IMEStateManager");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -232,7 +228,6 @@ IMEStateManager::OnDestroyPresContext(nsPresContext* aPresContext)
|
|||
// there should be only one composition per presContext object.
|
||||
sTextCompositions->ElementAt(i)->Destroy();
|
||||
sTextCompositions->RemoveElementAt(i);
|
||||
#if defined DEBUG || PR_LOGGING
|
||||
if (sTextCompositions->IndexOf(aPresContext) !=
|
||||
TextCompositionArray::NoIndex) {
|
||||
PR_LOG(sISMLog, PR_LOG_ERROR,
|
||||
|
@ -240,7 +235,6 @@ IMEStateManager::OnDestroyPresContext(nsPresContext* aPresContext)
|
|||
"TextComposition instance from the array"));
|
||||
MOZ_CRASH("Failed to remove TextComposition instance from the array");
|
||||
}
|
||||
#endif // #if defined DEBUG || PR_LOGGING
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -513,7 +507,6 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
|
|||
bool consumed =
|
||||
sActiveIMEContentObserver->OnMouseButtonEvent(aPresContext, internalEvent);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
nsAutoString eventType;
|
||||
aMouseEvent->GetType(eventType);
|
||||
PR_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
|
@ -521,7 +514,6 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
|
|||
"mouse event (type=%s, button=%d) is %s",
|
||||
NS_ConvertUTF16toUTF8(eventType).get(), internalEvent->button,
|
||||
consumed ? "consumed" : "not consumed"));
|
||||
#endif
|
||||
|
||||
return consumed;
|
||||
}
|
||||
|
|
|
@ -92,15 +92,10 @@
|
|||
#include "nsRange.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gMediaElementLog;
|
||||
static PRLogModuleInfo* gMediaElementEventsLog;
|
||||
#define LOG(type, msg) PR_LOG(gMediaElementLog, type, msg)
|
||||
#define LOG_EVENT(type, msg) PR_LOG(gMediaElementEventsLog, type, msg)
|
||||
#else
|
||||
#define LOG(type, msg)
|
||||
#define LOG_EVENT(type, msg)
|
||||
#endif
|
||||
|
||||
#include "nsIContentSecurityPolicy.h"
|
||||
|
||||
|
@ -2094,14 +2089,12 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
|
|||
mDisableVideo(false),
|
||||
mElementInTreeState(ELEMENT_NOT_INTREE)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaElementLog) {
|
||||
gMediaElementLog = PR_NewLogModule("nsMediaElement");
|
||||
}
|
||||
if (!gMediaElementEventsLog) {
|
||||
gMediaElementEventsLog = PR_NewLogModule("nsMediaElementEvents");
|
||||
}
|
||||
#endif
|
||||
|
||||
mAudioChannel = AudioChannelService::GetDefaultAudioChannel();
|
||||
|
||||
|
@ -3597,7 +3590,6 @@ HTMLMediaElement::UpdateReadyStateInternal()
|
|||
ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_FUTURE_DATA);
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static const char* const gReadyStateToString[] = {
|
||||
"HAVE_NOTHING",
|
||||
"HAVE_METADATA",
|
||||
|
@ -3605,7 +3597,6 @@ static const char* const gReadyStateToString[] = {
|
|||
"HAVE_FUTURE_DATA",
|
||||
"HAVE_ENOUGH_DATA"
|
||||
};
|
||||
#endif
|
||||
|
||||
void HTMLMediaElement::ChangeReadyState(nsMediaReadyState aState)
|
||||
{
|
||||
|
@ -3657,14 +3648,12 @@ void HTMLMediaElement::ChangeReadyState(nsMediaReadyState aState)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static const char* const gNetworkStateToString[] = {
|
||||
"EMPTY",
|
||||
"IDLE",
|
||||
"LOADING",
|
||||
"NO_SOURCE"
|
||||
};
|
||||
#endif
|
||||
|
||||
void HTMLMediaElement::ChangeNetworkState(nsMediaNetworkState aState)
|
||||
{
|
||||
|
|
|
@ -40,12 +40,8 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "nsVideoFrame.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gTrackElementLog;
|
||||
#define LOG(type, msg) PR_LOG(gTrackElementLog, type, msg)
|
||||
#else
|
||||
#define LOG(type, msg)
|
||||
#endif
|
||||
|
||||
// Replace the usual NS_IMPL_NS_NEW_HTML_ELEMENT(Track) so
|
||||
// we can return an UnknownElement instead when pref'd off.
|
||||
|
@ -80,11 +76,9 @@ static MOZ_CONSTEXPR const char* kKindTableDefaultString = kKindTable->tag;
|
|||
HTMLTrackElement::HTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
: nsGenericHTMLElement(aNodeInfo)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gTrackElementLog) {
|
||||
gTrackElementLog = PR_NewLogModule("nsTrackElement");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
HTMLTrackElement::~HTMLTrackElement()
|
||||
|
|
|
@ -69,8 +69,7 @@
|
|||
fmt "\n", \
|
||||
NameWithComma().get(), \
|
||||
static_cast<uint64_t>(ChildID()), Pid(), ##__VA_ARGS__)
|
||||
|
||||
#elif defined(PR_LOGGING)
|
||||
#else
|
||||
static PRLogModuleInfo*
|
||||
GetPPMLog()
|
||||
{
|
||||
|
@ -87,9 +86,6 @@
|
|||
("ProcessPriorityManager[%schild-id=%" PRIu64 ", pid=%d] - " fmt, \
|
||||
NameWithComma().get(), \
|
||||
static_cast<uint64_t>(ChildID()), Pid(), ##__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(fmt, ...)
|
||||
#define LOGP(fmt, ...)
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
|
|
|
@ -10,16 +10,11 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define SINK_LOG(msg, ...) \
|
||||
PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
|
||||
#define SINK_LOG_V(msg, ...) \
|
||||
PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG+1, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
|
||||
#else
|
||||
#define SINK_LOG(msg, ...)
|
||||
#define SINK_LOG_V(msg, ...)
|
||||
#endif
|
||||
|
||||
AudioSink::OnAudioEndTimeUpdateTask::OnAudioEndTimeUpdateTask(
|
||||
MediaDecoderStateMachine* aStateMachine)
|
||||
|
|
|
@ -28,13 +28,9 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gAudioStreamLog = nullptr;
|
||||
// For simple logs
|
||||
#define LOG(x) PR_LOG(gAudioStreamLog, PR_LOG_DEBUG, x)
|
||||
#else
|
||||
#define LOG(x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* When MOZ_DUMP_AUDIO is set in the environment (to anything),
|
||||
|
@ -1071,11 +1067,8 @@ AudioStream::DataCallback(void* aBuffer, long aFrames)
|
|||
// we start getting callbacks.
|
||||
// Simple version - contract on first callback only.
|
||||
if (mLatencyRequest == LowLatency) {
|
||||
#ifdef PR_LOGGING
|
||||
uint32_t old_len = mBuffer.Length();
|
||||
#endif
|
||||
available = mBuffer.ContractTo(FramesToBytes(aFrames));
|
||||
#ifdef PR_LOGGING
|
||||
TimeStamp now = TimeStamp::Now();
|
||||
if (!mStartTime.IsNull()) {
|
||||
int64_t timeMs = (now - mStartTime).ToMilliseconds();
|
||||
|
@ -1093,7 +1086,6 @@ AudioStream::DataCallback(void* aBuffer, long aFrames)
|
|||
mReadPoint, BytesToFrames(old_len - available), mOutRate));
|
||||
mReadPoint += BytesToFrames(old_len - available);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
mState = RUNNING;
|
||||
}
|
||||
|
|
|
@ -126,9 +126,7 @@ bool CubebLatencyPrefSet()
|
|||
|
||||
void InitLibrary()
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
gAudioStreamLog = PR_NewLogModule("AudioStream");
|
||||
#endif
|
||||
PrefChanged(PREF_VOLUME_SCALE, nullptr);
|
||||
Preferences::RegisterCallback(PrefChanged, PREF_VOLUME_SCALE);
|
||||
PrefChanged(PREF_CUBEB_LATENCY, nullptr);
|
||||
|
|
|
@ -10,12 +10,8 @@
|
|||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
#define STREAM_LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
|
||||
#else
|
||||
#define STREAM_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
// We don't use NSPR log here because we want this interleaved with adb logcat
|
||||
// on Android/B2G
|
||||
|
|
|
@ -24,12 +24,8 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gMediaCacheLog;
|
||||
#define CACHE_LOG(type, msg) PR_LOG(gMediaCacheLog, type, msg)
|
||||
#else
|
||||
#define CACHE_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
// Readahead blocks for non-seekable streams will be limited to this
|
||||
// fraction of the cache space. We don't normally evict such blocks
|
||||
|
@ -587,11 +583,9 @@ MediaCache::Init()
|
|||
rv = mFileCache->Open(fileDesc);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaCacheLog) {
|
||||
gMediaCacheLog = PR_NewLogModule("MediaCache");
|
||||
}
|
||||
#endif
|
||||
|
||||
MediaCacheFlusher::Init();
|
||||
|
||||
|
|
|
@ -52,13 +52,9 @@ static const int64_t CAN_PLAY_THROUGH_MARGIN = 1;
|
|||
// avoid redefined macro in unified build
|
||||
#undef DECODER_LOG
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define DECODER_LOG(x, ...) \
|
||||
PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, this, ##__VA_ARGS__))
|
||||
#else
|
||||
#define DECODER_LOG(x, ...)
|
||||
#endif
|
||||
|
||||
static const char* const gPlayStateStr[] = {
|
||||
"START",
|
||||
|
|
|
@ -20,13 +20,9 @@ namespace mozilla {
|
|||
// Un-comment to enable logging of seek bisections.
|
||||
//#define SEEK_LOGGING
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define DECODER_LOG(x, ...) \
|
||||
PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, mDecoder, ##__VA_ARGS__))
|
||||
#else
|
||||
#define DECODER_LOG(x, ...)
|
||||
#endif
|
||||
|
||||
// Same workaround as MediaDecoderStateMachine.cpp.
|
||||
#define DECODER_WARN_HELPER(a, b) NS_WARNING b
|
||||
|
|
|
@ -54,7 +54,6 @@ using namespace mozilla::gfx;
|
|||
#undef DECODER_LOG
|
||||
#undef VERBOSE_LOG
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
extern PRLogModuleInfo* gMediaSampleLog;
|
||||
#define LOG(m, l, x, ...) \
|
||||
|
@ -65,11 +64,6 @@ extern PRLogModuleInfo* gMediaSampleLog;
|
|||
LOG(gMediaDecoderLog, PR_LOG_DEBUG+1, x, ##__VA_ARGS__)
|
||||
#define SAMPLE_LOG(x, ...) \
|
||||
LOG(gMediaSampleLog, PR_LOG_DEBUG, x, ##__VA_ARGS__)
|
||||
#else
|
||||
#define DECODER_LOG(x, ...)
|
||||
#define VERBOSE_LOG(x, ...)
|
||||
#define SAMPLE_LOG(x, ...)
|
||||
#endif
|
||||
|
||||
// Somehow MSVC doesn't correctly delete the comma before ##__VA_ARGS__
|
||||
// when __VA_ARGS__ expands to nothing. This is a workaround for it.
|
||||
|
@ -2915,17 +2909,13 @@ void MediaDecoderStateMachine::AdvanceFrame()
|
|||
nsRefPtr<VideoData> currentFrame;
|
||||
if (VideoQueue().GetSize() > 0) {
|
||||
VideoData* frame = VideoQueue().PeekFront();
|
||||
#ifdef PR_LOGGING
|
||||
int32_t droppedFrames = 0;
|
||||
#endif
|
||||
while (IsRealTime() || clock_time >= frame->mTime) {
|
||||
mVideoFrameEndTime = frame->GetEndTime();
|
||||
if (currentFrame) {
|
||||
mDecoder->NotifyDecodedFrames(0, 0, 1);
|
||||
#ifdef PR_LOGGING
|
||||
VERBOSE_LOG("discarding video frame mTime=%lld clock_time=%lld (%d so far)",
|
||||
currentFrame->mTime, clock_time, ++droppedFrames);
|
||||
#endif
|
||||
}
|
||||
currentFrame = frame;
|
||||
nsRefPtr<VideoData> releaseMe = PopVideo();
|
||||
|
@ -3249,12 +3239,10 @@ void MediaDecoderStateMachine::StartBuffering()
|
|||
SetState(DECODER_STATE_BUFFERING);
|
||||
DECODER_LOG("Changed state from DECODING to BUFFERING, decoded for %.3lfs",
|
||||
decodeDuration.ToSeconds());
|
||||
#ifdef PR_LOGGING
|
||||
MediaDecoder::Statistics stats = mDecoder->GetStatistics();
|
||||
DECODER_LOG("Playback rate: %.1lfKB/s%s download rate: %.1lfKB/s%s",
|
||||
stats.mPlaybackRate/1024, stats.mPlaybackRateReliable ? "" : " (unreliable)",
|
||||
stats.mDownloadRate/1024, stats.mDownloadRateReliable ? "" : " (unreliable)");
|
||||
#endif
|
||||
}
|
||||
|
||||
void MediaDecoderStateMachine::SetPlayStartTime(const TimeStamp& aTimeStamp)
|
||||
|
|
|
@ -103,7 +103,6 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo*
|
||||
GetMediaManagerLog()
|
||||
{
|
||||
|
@ -113,9 +112,6 @@ GetMediaManagerLog()
|
|||
return sLog;
|
||||
}
|
||||
#define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
|
||||
#else
|
||||
#define LOG(msg)
|
||||
#endif
|
||||
|
||||
using dom::MediaStreamConstraints;
|
||||
using dom::MediaTrackConstraintSet;
|
||||
|
|
|
@ -48,12 +48,8 @@ struct MediaStreamConstraints;
|
|||
struct MediaTrackConstraintSet;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaManagerLog();
|
||||
#define MM_LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
|
||||
#else
|
||||
#define MM_LOG(msg)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This class is an implementation of MediaStreamListener. This is used
|
||||
|
|
|
@ -31,12 +31,8 @@
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gMediaRecorderLog;
|
||||
#define LOG(type, msg) PR_LOG(gMediaRecorderLog, type, msg)
|
||||
#else
|
||||
#define LOG(type, msg)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -759,11 +755,9 @@ MediaRecorder::MediaRecorder(DOMMediaStream& aSourceMediaStream,
|
|||
MOZ_ASSERT(aOwnerWindow);
|
||||
MOZ_ASSERT(aOwnerWindow->IsInnerWindow());
|
||||
mDOMStream = &aSourceMediaStream;
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaRecorderLog) {
|
||||
gMediaRecorderLog = PR_NewLogModule("MediaRecorder");
|
||||
}
|
||||
#endif
|
||||
RegisterActivityObserver();
|
||||
}
|
||||
|
||||
|
@ -792,11 +786,9 @@ MediaRecorder::MediaRecorder(AudioNode& aSrcAudioNode,
|
|||
aSrcOutput);
|
||||
}
|
||||
mAudioNode = &aSrcAudioNode;
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaRecorderLog) {
|
||||
gMediaRecorderLog = PR_NewLogModule("MediaRecorder");
|
||||
}
|
||||
#endif
|
||||
RegisterActivityObserver();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,17 +33,12 @@
|
|||
#include "nsProxyRelease.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gMediaResourceLog;
|
||||
#define RESOURCE_LOG(msg, ...) PR_LOG(gMediaResourceLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
#define CMLOG(msg, ...) \
|
||||
RESOURCE_LOG("%p [ChannelMediaResource]: " msg, this, ##__VA_ARGS__)
|
||||
#else
|
||||
#define RESOURCE_LOG(msg, ...)
|
||||
#define CMLOG(msg, ...)
|
||||
#endif
|
||||
|
||||
static const uint32_t HTTP_OK_CODE = 200;
|
||||
static const uint32_t HTTP_PARTIAL_RESPONSE_CODE = 206;
|
||||
|
@ -85,11 +80,9 @@ ChannelMediaResource::ChannelMediaResource(MediaDecoder* aDecoder,
|
|||
mIgnoreResume(false),
|
||||
mIsTransportSeekable(true)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaResourceLog) {
|
||||
gMediaResourceLog = PR_NewLogModule("MediaResource");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ChannelMediaResource::~ChannelMediaResource()
|
||||
|
|
|
@ -13,12 +13,8 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define DECODER_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
|
||||
#else
|
||||
#define DECODER_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
NS_IMPL_ISUPPORTS(MediaShutdownManager, nsIObserver)
|
||||
|
||||
|
|
|
@ -41,12 +41,8 @@ using namespace mozilla::gfx;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
#define STREAM_LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
|
||||
#else
|
||||
#define STREAM_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
// #define ENABLE_LIFECYCLE_LOG
|
||||
|
||||
|
@ -2968,11 +2964,9 @@ MediaStreamGraphImpl::MediaStreamGraphImpl(bool aRealtime,
|
|||
#endif
|
||||
, mAudioChannel(static_cast<uint32_t>(aChannel))
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaStreamGraphLog) {
|
||||
gMediaStreamGraphLog = PR_NewLogModule("MediaStreamGraph");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mRealtime) {
|
||||
if (aStartWithAudioDriver) {
|
||||
|
|
|
@ -35,9 +35,7 @@ class nsAutoRefTraits<SpeexResamplerState> : public nsPointerRefTraits<SpeexResa
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MediaStreamGraph is a framework for synchronized audio/video processing
|
||||
|
|
|
@ -20,17 +20,12 @@
|
|||
#endif
|
||||
using namespace mozilla::net;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gRtspMediaResourceLog;
|
||||
#define RTSP_LOG(msg, ...) PR_LOG(gRtspMediaResourceLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
#define RTSPMLOG(msg, ...) \
|
||||
RTSP_LOG("%p [RtspMediaResource]: " msg, this, ##__VA_ARGS__)
|
||||
#else
|
||||
#define RTSP_LOG(msg, ...)
|
||||
#define RTSPMLOG(msg, ...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -509,12 +504,10 @@ RtspMediaResource::RtspMediaResource(MediaDecoder* aDecoder,
|
|||
MOZ_ASSERT(mMediaStreamController);
|
||||
mListener = new Listener(this);
|
||||
mMediaStreamController->AsyncOpen(mListener);
|
||||
#ifdef PR_LOGGING
|
||||
if (!gRtspMediaResourceLog) {
|
||||
gRtspMediaResourceLog = PR_NewLogModule("RtspMediaResource");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
RtspMediaResource::~RtspMediaResource()
|
||||
|
|
|
@ -9,12 +9,8 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
#define STREAM_LOG(type, msg) PR_LOG(gMediaStreamGraphLog, type, msg)
|
||||
#else
|
||||
#define STREAM_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
void
|
||||
|
|
|
@ -42,21 +42,15 @@ namespace mozilla {
|
|||
#undef STREAM_LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gTrackUnionStreamLog;
|
||||
#define STREAM_LOG(type, msg) PR_LOG(gTrackUnionStreamLog, type, msg)
|
||||
#else
|
||||
#define STREAM_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
TrackUnionStream::TrackUnionStream(DOMMediaStream* aWrapper) :
|
||||
ProcessedMediaStream(aWrapper)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gTrackUnionStreamLog) {
|
||||
gTrackUnionStreamLog = PR_NewLogModule("TrackUnionStream");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void TrackUnionStream::RemoveInput(MediaInputPort* aPort)
|
||||
|
|
|
@ -28,22 +28,16 @@ NS_INTERFACE_MAP_END
|
|||
NS_IMPL_CYCLE_COLLECTING_ADDREF(WebVTTListener)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(WebVTTListener)
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gTextTrackLog;
|
||||
# define VTT_LOG(...) PR_LOG(gTextTrackLog, PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
# define VTT_LOG(msg)
|
||||
#endif
|
||||
|
||||
WebVTTListener::WebVTTListener(HTMLTrackElement* aElement)
|
||||
: mElement(aElement)
|
||||
{
|
||||
MOZ_ASSERT(mElement, "Must pass an element to the callback");
|
||||
#ifdef PR_LOGGING
|
||||
if (!gTextTrackLog) {
|
||||
gTextTrackLog = PR_NewLogModule("TextTrack");
|
||||
}
|
||||
#endif
|
||||
VTT_LOG("WebVTTListener created.");
|
||||
}
|
||||
|
||||
|
|
|
@ -21,16 +21,10 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define LOGE(...) PR_LOG(gMediaDecoderLog, PR_LOG_ERROR, (__VA_ARGS__))
|
||||
#define LOGW(...) PR_LOG(gMediaDecoderLog, PR_LOG_WARNING, (__VA_ARGS__))
|
||||
#define LOGD(...) PR_LOG(gMediaDecoderLog, PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOGE(...)
|
||||
#define LOGW(...)
|
||||
#define LOGD(...)
|
||||
#endif
|
||||
|
||||
#define PROPERTY_ID_FORMAT "%c%c%c%c"
|
||||
#define PROPERTY_ID_PRINT(x) ((x) >> 24), \
|
||||
|
|
|
@ -23,12 +23,8 @@ using namespace mozilla::media;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
AudioSinkFilter::AudioSinkFilter(const wchar_t* aObjectName, HRESULT* aOutResult)
|
||||
: BaseFilter(aObjectName, CLSID_MozAudioSinkFilter),
|
||||
|
|
|
@ -15,12 +15,8 @@ using namespace mozilla::media;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
AudioSinkInputPin::AudioSinkInputPin(wchar_t* aObjectName,
|
||||
AudioSinkFilter* aFilter,
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
namespace mozilla {
|
||||
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
PRLogModuleInfo*
|
||||
GetDirectShowLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
|
@ -30,10 +28,6 @@ GetDirectShowLog() {
|
|||
|
||||
#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
DirectShowReader::DirectShowReader(AbstractMediaDecoder* aDecoder)
|
||||
: MediaDecoderReader(aDecoder),
|
||||
mMP3FrameParser(aDecoder->GetResource()->GetLength()),
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
|
||||
// Create a table which maps GUIDs to a string representation of the GUID.
|
||||
// This is useful for debugging purposes, for logging the GUIDs of media types.
|
||||
// This is only available when logging is enabled, i.e. not in release builds.
|
||||
|
@ -48,7 +46,6 @@ GetDirectShowGuidName(const GUID& aGuid)
|
|||
}
|
||||
return "Unknown";
|
||||
}
|
||||
#endif // PR_LOGGING
|
||||
|
||||
void
|
||||
RemoveGraphFromRunningObjectTable(DWORD aRotRegister)
|
||||
|
|
|
@ -112,11 +112,8 @@ RefTimeToSeconds(const REFERENCE_TIME aRefTime)
|
|||
return double(aRefTime) / 10000000;
|
||||
}
|
||||
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
const char*
|
||||
GetDirectShowGuidName(const GUID& aGuid);
|
||||
#endif
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -14,12 +14,8 @@ using namespace mozilla::media;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
SampleSink::SampleSink()
|
||||
: mMonitor("SampleSink"),
|
||||
|
@ -69,13 +65,11 @@ SampleSink::Receive(IMediaSample* aSample)
|
|||
mon.Wait();
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
REFERENCE_TIME start = 0, end = 0;
|
||||
HRESULT hr = aSample->GetMediaTime(&start, &end);
|
||||
LOG("SampleSink::Receive() [%4.2lf-%4.2lf]",
|
||||
(double)RefTimeToUsecs(start) / USECS_PER_S,
|
||||
(double)RefTimeToUsecs(end) / USECS_PER_S);
|
||||
#endif
|
||||
|
||||
mSample = aSample;
|
||||
// Notify the signal, to awaken the consumer thread in WaitForSample()
|
||||
|
@ -106,13 +100,11 @@ SampleSink::Extract(RefPtr<IMediaSample>& aOutSample)
|
|||
}
|
||||
aOutSample = mSample;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
int64_t start = 0, end = 0;
|
||||
mSample->GetMediaTime(&start, &end);
|
||||
LOG("SampleSink::Extract() [%4.2lf-%4.2lf]",
|
||||
(double)RefTimeToUsecs(start) / USECS_PER_S,
|
||||
(double)RefTimeToUsecs(end) / USECS_PER_S);
|
||||
#endif
|
||||
|
||||
mSample = nullptr;
|
||||
// Notify the signal, to awaken the producer thread in Receive()
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace mozilla {
|
|||
// Define to trace what's on...
|
||||
//#define DEBUG_SOURCE_TRACE 1
|
||||
|
||||
#if defined(PR_LOGGING) && defined (DEBUG_SOURCE_TRACE)
|
||||
#if defined (DEBUG_SOURCE_TRACE)
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define DIRECTSHOW_LOG(...) PR_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
|
|
|
@ -51,7 +51,6 @@ CDMCaps::AutoLock::~AutoLock()
|
|||
mData.Unlock();
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static void
|
||||
TestCap(uint64_t aFlag,
|
||||
uint64_t aCaps,
|
||||
|
@ -77,7 +76,6 @@ CapsToString(uint64_t aCaps)
|
|||
TestCap(GMP_EME_CAP_DECRYPT_AND_DECODE_VIDEO, aCaps, NS_LITERAL_CSTRING("DecryptAndDecodeVideo"), capsStr);
|
||||
return capsStr;
|
||||
}
|
||||
#endif // PR_LOGGING
|
||||
|
||||
void
|
||||
CDMCaps::AutoLock::SetCaps(uint64_t aCaps)
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
PRLogModuleInfo* GetEMELog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
|
@ -26,8 +24,6 @@ PRLogModuleInfo* GetEMEVerboseLog() {
|
|||
return log;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static bool
|
||||
ContainsOnlyDigits(const nsAString& aString)
|
||||
{
|
||||
|
|
|
@ -12,28 +12,15 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
#ifndef EME_LOG
|
||||
PRLogModuleInfo* GetEMELog();
|
||||
#define EME_LOG(...) PR_LOG(GetEMELog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#endif
|
||||
|
||||
#ifndef EME_VERBOSE_LOG
|
||||
PRLogModuleInfo* GetEMEVerboseLog();
|
||||
#define EME_VERBOSE_LOG(...) PR_LOG(GetEMEVerboseLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#ifndef EME_LOG
|
||||
#define EME_LOG(...)
|
||||
#endif
|
||||
|
||||
#ifndef EME_VERBOSE_LOG
|
||||
#define EME_VERBOSE_LOG(...)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef EME_LOG
|
||||
PRLogModuleInfo* GetEMELog();
|
||||
#define EME_LOG(...) PR_LOG(GetEMELog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#endif
|
||||
|
||||
#ifndef EME_VERBOSE_LOG
|
||||
PRLogModuleInfo* GetEMEVerboseLog();
|
||||
#define EME_VERBOSE_LOG(...) PR_LOG(GetEMEVerboseLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
|
||||
#ifndef EME_LOG
|
||||
#define EME_LOG(...)
|
||||
#endif
|
||||
|
@ -41,8 +28,7 @@ namespace mozilla {
|
|||
#ifndef EME_VERBOSE_LOG
|
||||
#define EME_VERBOSE_LOG(...)
|
||||
#endif
|
||||
|
||||
#endif // PR_LOGGING
|
||||
#endif
|
||||
|
||||
#define NO_CDM_VERSION -1
|
||||
|
||||
|
|
|
@ -138,7 +138,6 @@ MediaKeySession::UpdateKeyStatusMap()
|
|||
|
||||
mKeyStatusMap->Update(keyStatuses);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
nsAutoCString message(
|
||||
nsPrintfCString("MediaKeySession[%p,'%s'] key statuses change {",
|
||||
this, NS_ConvertUTF16toUTF8(mSessionId).get()));
|
||||
|
@ -155,7 +154,6 @@ MediaKeySession::UpdateKeyStatusMap()
|
|||
}
|
||||
message.Append(" }");
|
||||
EME_LOG(message.get());
|
||||
#endif
|
||||
}
|
||||
|
||||
MediaKeyStatusMap*
|
||||
|
@ -193,7 +191,6 @@ MediaKeySession::GenerateRequest(const nsAString& aInitDataType,
|
|||
return promise.forget();
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
// Convert initData to base64 for easier logging.
|
||||
// Note: UpdateSession() Move()s the data out of the array, so we have
|
||||
// to copy it here.
|
||||
|
@ -203,7 +200,6 @@ MediaKeySession::GenerateRequest(const nsAString& aInitDataType,
|
|||
if (NS_FAILED(Base64Encode(rawInitData, base64InitData))) {
|
||||
NS_WARNING("Failed to base64 encode initData for logging");
|
||||
}
|
||||
#endif
|
||||
|
||||
PromiseId pid = mKeys->StorePromise(promise);
|
||||
mKeys->GetCDMProxy()->CreateSession(Token(),
|
||||
|
@ -280,7 +276,6 @@ MediaKeySession::Update(const ArrayBufferViewOrArrayBuffer& aResponse, ErrorResu
|
|||
}
|
||||
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
// Convert response to base64 for easier logging.
|
||||
// Note: UpdateSession() Move()s the data out of the array, so we have
|
||||
// to copy it here.
|
||||
|
@ -290,7 +285,6 @@ MediaKeySession::Update(const ArrayBufferViewOrArrayBuffer& aResponse, ErrorResu
|
|||
if (NS_FAILED(Base64Encode(rawResponse, base64Response))) {
|
||||
NS_WARNING("Failed to base64 encode response for logging");
|
||||
}
|
||||
#endif
|
||||
|
||||
PromiseId pid = mKeys->StorePromise(promise);
|
||||
mKeys->GetCDMProxy()->UpdateSession(mSessionId,
|
||||
|
@ -382,7 +376,6 @@ void
|
|||
MediaKeySession::DispatchKeyMessage(MediaKeyMessageType aMessageType,
|
||||
const nsTArray<uint8_t>& aMessage)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
nsAutoCString base64MsgData;
|
||||
nsDependentCSubstring rawMsgData(reinterpret_cast<const char*>(aMessage.Elements()),
|
||||
aMessage.Length());
|
||||
|
@ -393,7 +386,6 @@ MediaKeySession::DispatchKeyMessage(MediaKeyMessageType aMessageType,
|
|||
this, NS_ConvertUTF16toUTF8(mSessionId).get(),
|
||||
MediaKeyMessageTypeValues::strings[uint32_t(aMessageType)].value,
|
||||
base64MsgData.get());
|
||||
#endif
|
||||
|
||||
nsRefPtr<MediaKeyMessageEvent> event(
|
||||
MediaKeyMessageEvent::Constructor(this, aMessageType, aMessage));
|
||||
|
|
|
@ -31,12 +31,8 @@
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gMediaEncoderLog;
|
||||
#define LOG(type, msg) PR_LOG(gMediaEncoderLog, type, msg)
|
||||
#else
|
||||
#define LOG(type, msg)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -79,11 +75,9 @@ MediaEncoder::NotifyEvent(MediaStreamGraph* aGraph,
|
|||
already_AddRefed<MediaEncoder>
|
||||
MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gMediaEncoderLog) {
|
||||
gMediaEncoderLog = PR_NewLogModule("MediaEncoder");
|
||||
}
|
||||
#endif
|
||||
PROFILER_LABEL("MediaEncoder", "CreateEncoder",
|
||||
js::ProfileEntry::Category::OTHER);
|
||||
|
||||
|
|
|
@ -18,12 +18,8 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gTrackEncoderLog;
|
||||
#define TRACK_LOG(type, msg) PR_LOG(gTrackEncoderLog, type, msg)
|
||||
#else
|
||||
#define TRACK_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
static const int DEFAULT_CHANNELS = 1;
|
||||
static const int DEFAULT_SAMPLING_RATE = 16000;
|
||||
|
@ -38,16 +34,12 @@ TrackEncoder::TrackEncoder()
|
|||
, mInitialized(false)
|
||||
, mEndOfStream(false)
|
||||
, mCanceled(false)
|
||||
#ifdef PR_LOGGING
|
||||
, mAudioInitCounter(0)
|
||||
, mVideoInitCounter(0)
|
||||
#endif
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gTrackEncoderLog) {
|
||||
gTrackEncoderLog = PR_NewLogModule("TrackEncoder");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -65,10 +57,8 @@ AudioTrackEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph,
|
|||
|
||||
// Check and initialize parameters for codec encoder.
|
||||
if (!mInitialized) {
|
||||
#ifdef PR_LOGGING
|
||||
mAudioInitCounter++;
|
||||
TRACK_LOG(PR_LOG_DEBUG, ("Init the audio encoder %d times", mAudioInitCounter));
|
||||
#endif
|
||||
AudioSegment::ChunkIterator iter(const_cast<AudioSegment&>(audio));
|
||||
while (!iter.IsEnded()) {
|
||||
AudioChunk chunk = *iter;
|
||||
|
@ -193,10 +183,8 @@ VideoTrackEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph,
|
|||
|
||||
// Check and initialize parameters for codec encoder.
|
||||
if (!mInitialized) {
|
||||
#ifdef PR_LOGGING
|
||||
mVideoInitCounter++;
|
||||
TRACK_LOG(PR_LOG_DEBUG, ("Init the video encoder %d times", mVideoInitCounter));
|
||||
#endif
|
||||
VideoSegment::ChunkIterator iter(const_cast<VideoSegment&>(video));
|
||||
while (!iter.IsEnded()) {
|
||||
VideoChunk chunk = *iter;
|
||||
|
|
|
@ -129,11 +129,9 @@ protected:
|
|||
*/
|
||||
bool mCanceled;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
// How many times we have tried to initialize the encoder.
|
||||
uint32_t mAudioInitCounter;
|
||||
uint32_t mVideoInitCounter;
|
||||
#endif
|
||||
};
|
||||
|
||||
class AudioTrackEncoder : public TrackEncoder
|
||||
|
|
|
@ -15,14 +15,10 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gVP8TrackEncoderLog;
|
||||
#define VP8LOG(msg, ...) PR_LOG(gVP8TrackEncoderLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
#else
|
||||
#define VP8LOG(msg, ...)
|
||||
#endif
|
||||
|
||||
#define DEFAULT_BITRATE 2500 // in kbit/s
|
||||
#define DEFAULT_ENCODE_FRAMERATE 30
|
||||
|
@ -38,11 +34,9 @@ VP8TrackEncoder::VP8TrackEncoder()
|
|||
, mVPXImageWrapper(new vpx_image_t())
|
||||
{
|
||||
MOZ_COUNT_CTOR(VP8TrackEncoder);
|
||||
#ifdef PR_LOGGING
|
||||
if (!gVP8TrackEncoderLog) {
|
||||
gVP8TrackEncoderLog = PR_NewLogModule("VP8TrackEncoder");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
VP8TrackEncoder::~VP8TrackEncoder()
|
||||
|
|
|
@ -17,23 +17,17 @@ static const float BASE_QUALITY = 0.4f;
|
|||
namespace mozilla {
|
||||
|
||||
#undef LOG
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gVorbisTrackEncoderLog;
|
||||
#define VORBISLOG(msg, ...) PR_LOG(gVorbisTrackEncoderLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
#else
|
||||
#define VORBISLOG(msg, ...)
|
||||
#endif
|
||||
|
||||
VorbisTrackEncoder::VorbisTrackEncoder()
|
||||
: AudioTrackEncoder()
|
||||
{
|
||||
MOZ_COUNT_CTOR(VorbisTrackEncoder);
|
||||
#ifdef PR_LOGGING
|
||||
if (!gVorbisTrackEncoderLog) {
|
||||
gVorbisTrackEncoderLog = PR_NewLogModule("VorbisTrackEncoder");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
VorbisTrackEncoder::~VorbisTrackEncoder()
|
||||
|
|
|
@ -34,7 +34,6 @@ using mozilla::layers::LayerManager;
|
|||
using mozilla::layers::ImageContainer;
|
||||
using mozilla::layers::LayersBackend;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
|
@ -44,10 +43,6 @@ PRLogModuleInfo* GetDemuxerLog() {
|
|||
}
|
||||
#define LOG(arg, ...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define VLOG(arg, ...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#define VLOG(...)
|
||||
#endif
|
||||
|
||||
using namespace mp4_demuxer;
|
||||
|
||||
|
@ -56,7 +51,6 @@ namespace mozilla {
|
|||
// Uncomment to enable verbose per-sample logging.
|
||||
//#define LOG_SAMPLE_DECODE 1
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static const char*
|
||||
TrackTypeToStr(TrackInfo::TrackType aTrack)
|
||||
{
|
||||
|
@ -71,7 +65,6 @@ TrackTypeToStr(TrackInfo::TrackType aTrack)
|
|||
return "Unknown";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
AccumulateSPSTelemetry(const MediaByteBuffer* aExtradata)
|
||||
|
|
|
@ -12,12 +12,8 @@
|
|||
#include "AppleATDecoder.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
#define FourCC2Str(n) ((char[5]){(char)(n >> 24), (char)(n >> 16), (char)(n >> 8), (char)(n), 0})
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -12,12 +12,8 @@
|
|||
#include "nsCocoaFeatures.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "mozilla/DebugOnly.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetAppleMediaLog() {
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
if (!log) {
|
||||
|
@ -23,7 +22,6 @@ PRLogModuleInfo* GetAppleMediaLog() {
|
|||
}
|
||||
return log;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -23,13 +23,9 @@
|
|||
#include <algorithm>
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
//#define LOG_MEDIA_SHA1
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -10,12 +10,8 @@
|
|||
#include "MainThreadUtils.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -20,13 +20,9 @@
|
|||
#include "VideoUtils.h"
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
//#define LOG_MEDIA_SHA1
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
#ifdef LOG_MEDIA_SHA1
|
||||
#include "mozilla/SHA1.h"
|
||||
|
|
|
@ -11,12 +11,8 @@
|
|||
#include "mozilla/ArrayUtils.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) PR_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -7,11 +7,7 @@
|
|||
#ifndef __FFmpegLog_h__
|
||||
#define __FFmpegLog_h__
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetFFmpegDecoderLog();
|
||||
#define FFMPEG_LOG(...) PR_LOG(GetFFmpegDecoderLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define FFMPEG_LOG(...)
|
||||
#endif
|
||||
|
||||
#endif // __FFmpegLog_h__
|
||||
|
|
|
@ -25,12 +25,8 @@
|
|||
#include <android/log.h>
|
||||
#define GADM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkAudioDecoderManager", __VA_ARGS__)
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
#define READ_OUTPUT_BUFFER_TIMEOUT_US 3000
|
||||
|
||||
using namespace android;
|
||||
|
|
|
@ -14,12 +14,8 @@
|
|||
#include <android/log.h>
|
||||
#define GMDD_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkMediaDataDecoder", __VA_ARGS__)
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
using namespace android;
|
||||
|
||||
|
|
|
@ -31,12 +31,8 @@
|
|||
#include <android/log.h>
|
||||
#define GVDM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkVideoDecoderManager", __VA_ARGS__)
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
using namespace mozilla::layers;
|
||||
using namespace android;
|
||||
typedef android::MediaCodecProxy MediaCodecProxy;
|
||||
|
|
|
@ -9,13 +9,8 @@
|
|||
#include "WMFUtils.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -12,12 +12,8 @@
|
|||
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -11,13 +11,8 @@
|
|||
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -21,12 +21,8 @@
|
|||
#include "IMFYCbCrImage.h"
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) PR_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(...)
|
||||
#endif
|
||||
|
||||
using mozilla::layers::Image;
|
||||
using mozilla::layers::IMFYCbCrImage;
|
||||
|
|
|
@ -17,15 +17,10 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(level, msg)
|
||||
#endif
|
||||
|
||||
namespace gmp {
|
||||
|
||||
|
|
|
@ -45,14 +45,9 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#undef LOGD
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
#define LOG(level, x, ...) PR_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
|
||||
#define LOGD(x, ...) LOG(PR_LOG_DEBUG, "GMPChild[pid=%d] " x, (int)base::GetCurrentProcId(), ##__VA_ARGS__)
|
||||
#else
|
||||
#define LOG(level, x, ...)
|
||||
#define LOGD(x, ...)
|
||||
#endif
|
||||
|
||||
namespace gmp {
|
||||
|
||||
|
|
|
@ -19,15 +19,10 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(level, msg)
|
||||
#endif
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
|
|
@ -41,14 +41,9 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#undef LOGD
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
#define LOG(level, x, ...) PR_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
|
||||
#define LOGD(x, ...) LOG(PR_LOG_DEBUG, "GMPParent[%p|childPid=%d] " x, this, mChildPid, ##__VA_ARGS__)
|
||||
#else
|
||||
#define LOG(level, x, ...)
|
||||
#define LOGD(x, ...)
|
||||
#endif
|
||||
|
||||
namespace gmp {
|
||||
|
||||
|
@ -62,9 +57,7 @@ GMPParent::GMPParent()
|
|||
, mGMPContentChildCount(0)
|
||||
, mAsyncShutdownRequired(false)
|
||||
, mAsyncShutdownInProgress(false)
|
||||
#ifdef PR_LOGGING
|
||||
, mChildPid(0)
|
||||
#endif
|
||||
{
|
||||
LOGD("GMPParent ctor");
|
||||
mPluginId = GeckoChildProcessHost::GetUniqueID();
|
||||
|
@ -145,9 +138,7 @@ GMPParent::LoadProcess()
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
mChildPid = base::GetProcId(mProcess->GetChildProcessHandle());
|
||||
#endif
|
||||
LOGD("%s: Launched new child process", __FUNCTION__);
|
||||
|
||||
bool opened = Open(mProcess->GetChannel(),
|
||||
|
|
|
@ -217,9 +217,7 @@ private:
|
|||
bool mAsyncShutdownRequired;
|
||||
bool mAsyncShutdownInProgress;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
int mChildPid;
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace gmp
|
||||
|
|
|
@ -41,7 +41,6 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo*
|
||||
GetGMPLog()
|
||||
{
|
||||
|
@ -53,10 +52,6 @@ GetGMPLog()
|
|||
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(leve1, msg)
|
||||
#endif
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
|
|
@ -12,13 +12,8 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(leve1, msg)
|
||||
#endif
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
|
|
@ -40,13 +40,8 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(leve1, msg)
|
||||
#endif
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
@ -305,10 +300,8 @@ GeckoMediaPluginServiceParent::GetContentParentFrom(const nsACString& aNodeId,
|
|||
{
|
||||
nsRefPtr<GMPParent> gmp = SelectPluginForAPI(aNodeId, aAPI, aTags);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
nsCString api = aTags[0];
|
||||
LOGD(("%s: %p returning %p for api %s", __FUNCTION__, (void *)this, (void *)gmp, api.get()));
|
||||
#endif
|
||||
|
||||
if (!gmp) {
|
||||
return false;
|
||||
|
@ -1439,10 +1432,8 @@ GMPServiceParent::RecvLoadGMP(const nsCString& aNodeId,
|
|||
{
|
||||
nsRefPtr<GMPParent> gmp = mService->SelectPluginForAPI(aNodeId, aAPI, aTags);
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
nsCString api = aTags[0];
|
||||
LOGD(("%s: %p returning %p for api %s", __FUNCTION__, (void *)this, (void *)gmp, api.get()));
|
||||
#endif
|
||||
|
||||
if (!gmp || !gmp->EnsureProcessLoaded(aId)) {
|
||||
return false;
|
||||
|
|
|
@ -26,15 +26,10 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(level, msg)
|
||||
#endif
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
|
|
@ -13,15 +13,10 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(level, msg)
|
||||
#endif
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
|
|
@ -21,15 +21,10 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(level, msg)
|
||||
#endif
|
||||
|
||||
namespace gmp {
|
||||
|
||||
|
|
|
@ -23,15 +23,10 @@ namespace mozilla {
|
|||
#undef LOG
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) PR_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) PR_LOG(GetGMPLog(), (level), msg)
|
||||
#else
|
||||
#define LOGD(msg)
|
||||
#define LOG(level, msg)
|
||||
#endif
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
|
|
@ -30,13 +30,9 @@ using namespace layers;
|
|||
// Un-comment to enable logging of seek bisections.
|
||||
//#define SEEK_LOGGING
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define LOG(type, msg, ...) \
|
||||
PR_LOG(gMediaDecoderLog, type, ("GStreamerReader(%p) " msg, this, ##__VA_ARGS__))
|
||||
#else
|
||||
#define LOG(type, msg, ...)
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
static const unsigned int MAX_CHANNELS = 4;
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
PRLogModuleInfo* GetICLog()
|
||||
{
|
||||
static PRLogModuleInfo* log = nullptr;
|
||||
|
@ -29,8 +27,6 @@ PRLogModuleInfo* GetICLog()
|
|||
return log;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED(ImageCapture, DOMEventTargetHelper,
|
||||
|
|
|
@ -13,21 +13,11 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
#ifndef IC_LOG
|
||||
PRLogModuleInfo* GetICLog();
|
||||
#define IC_LOG(...) PR_LOG(GetICLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifndef IC_LOG
|
||||
#define IC_LOG(...)
|
||||
#endif
|
||||
|
||||
#endif // PR_LOGGING
|
||||
|
||||
namespace dom {
|
||||
|
||||
class Blob;
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#endif
|
||||
#include "SourceBufferResource.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
/* Polyfill __func__ on MSVC to pass to the log. */
|
||||
|
@ -27,9 +26,6 @@ extern PRLogModuleInfo* GetMediaSourceLog();
|
|||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
#define MSE_DEBUG(name, arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, (TOSTRING(name) "(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
struct JSContext;
|
||||
class JSObject;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetMediaSourceLog()
|
||||
{
|
||||
static PRLogModuleInfo* sLogModule;
|
||||
|
@ -57,10 +56,6 @@ PRLogModuleInfo* GetMediaSourceAPILog()
|
|||
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_API(arg, ...) PR_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#define MSE_API(...)
|
||||
#endif
|
||||
|
||||
// Arbitrary limit.
|
||||
static const unsigned int MAX_SOURCE_BUFFERS = 16;
|
||||
|
|
|
@ -16,15 +16,10 @@
|
|||
#include "SourceBufferDecoder.h"
|
||||
#include "VideoUtils.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#define MSE_DEBUGV(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -22,15 +22,10 @@
|
|||
#include "MP4Reader.h"
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#define MSE_DEBUGV(...)
|
||||
#endif
|
||||
|
||||
// When a stream hits EOS it needs to decide what other stream to switch to. Due
|
||||
// to inaccuracies is determining buffer end frames (Bug 1065207) and rounding
|
||||
|
|
|
@ -11,13 +11,9 @@
|
|||
#include "mozilla/Monitor.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#endif
|
||||
|
||||
#define UNIMPLEMENTED() MSE_DEBUG("UNIMPLEMENTED FUNCTION at %s:%d", __FILE__, __LINE__)
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "MediaData.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetSourceBufferResourceLog();
|
||||
|
||||
/* Polyfill __func__ on MSVC to pass to the log. */
|
||||
|
@ -18,10 +17,6 @@ extern PRLogModuleInfo* GetSourceBufferResourceLog();
|
|||
|
||||
#define SBR_DEBUG(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define SBR_DEBUGV(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define SBR_DEBUG(...)
|
||||
#define SBR_DEBUGV(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -26,18 +26,12 @@
|
|||
struct JSContext;
|
||||
class JSObject;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern PRLogModuleInfo* GetMediaSourceAPILog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_API(arg, ...) PR_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#define MSE_DEBUGV(...)
|
||||
#define MSE_API(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "MediaDecoderReader.h"
|
||||
#include "mozilla/dom/TimeRanges.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
/* Polyfill __func__ on MSVC to pass to the log. */
|
||||
#ifdef _MSC_VER
|
||||
|
@ -19,9 +18,6 @@ extern PRLogModuleInfo* GetMediaSourceLog();
|
|||
#endif
|
||||
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferDecoder(%p:%s)::%s: " arg, this, mResource->GetContentType().get(), __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -16,16 +16,11 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern PRLogModuleInfo* GetMediaSourceAPILog();
|
||||
|
||||
#define MSE_API(arg, ...) PR_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_API(...)
|
||||
#define MSE_DEBUG(...)
|
||||
#endif
|
||||
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "prlog.h"
|
||||
#include "MediaData.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* GetSourceBufferResourceLog()
|
||||
{
|
||||
static PRLogModuleInfo* sLogModule;
|
||||
|
@ -25,10 +24,6 @@ PRLogModuleInfo* GetSourceBufferResourceLog()
|
|||
|
||||
#define SBR_DEBUG(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define SBR_DEBUGV(arg, ...) PR_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define SBR_DEBUG(...)
|
||||
#define SBR_DEBUGV(...)
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -22,13 +22,9 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("TrackBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#else
|
||||
#define MSE_DEBUG(...)
|
||||
#endif
|
||||
|
||||
// Time in seconds to substract from the current time when deciding the
|
||||
// time point to evict data before in a decoder. This is used to help
|
||||
|
|
|
@ -32,12 +32,8 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
|
||||
#else
|
||||
#define LOG(type, msg)
|
||||
#endif
|
||||
|
||||
/** Decoder base class for Ogg-encapsulated streams. */
|
||||
OggCodecState*
|
||||
|
|
|
@ -37,7 +37,6 @@ namespace mozilla {
|
|||
// Un-comment to enable logging of seek bisections.
|
||||
//#define SEEK_LOGGING
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
|
||||
#ifdef SEEK_LOGGING
|
||||
|
@ -45,10 +44,6 @@ extern PRLogModuleInfo* gMediaDecoderLog;
|
|||
#else
|
||||
#define SEEK_LOG(type, msg)
|
||||
#endif
|
||||
#else
|
||||
#define LOG(type, msg)
|
||||
#define SEEK_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
// The number of microseconds of "fuzz" we use in a bisection search over
|
||||
// HTTP. When we're seeking with fuzz, we'll stop the search if a bisection
|
||||
|
|
|
@ -24,12 +24,8 @@ extern "C" {
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define OPUS_LOG(type, msg) PR_LOG(gMediaDecoderLog, type, msg)
|
||||
#else
|
||||
#define OPUS_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
OpusParser::OpusParser():
|
||||
mRate(0),
|
||||
|
|
|
@ -42,13 +42,9 @@ using namespace android;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo* gAudioOffloadPlayerLog;
|
||||
#define AUDIO_OFFLOAD_LOG(type, msg) \
|
||||
PR_LOG(gAudioOffloadPlayerLog, type, msg)
|
||||
#else
|
||||
#define AUDIO_OFFLOAD_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
// maximum time in paused state when offloading audio decompression.
|
||||
// When elapsed, the GonkAudioSink is destroyed to allow the audio DSP to power down.
|
||||
|
@ -67,11 +63,9 @@ AudioOffloadPlayer::AudioOffloadPlayer(MediaOmxCommonDecoder* aObserver) :
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
if (!gAudioOffloadPlayerLog) {
|
||||
gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
|
||||
}
|
||||
#endif
|
||||
|
||||
CHECK(aObserver);
|
||||
#if ANDROID_VERSION >= 21
|
||||
|
|
|
@ -22,13 +22,9 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
extern PRLogModuleInfo* gAudioOffloadPlayerLog;
|
||||
#define AUDIO_OFFLOAD_LOG(type, msg) \
|
||||
PR_LOG(gAudioOffloadPlayerLog, type, msg)
|
||||
#else
|
||||
#define AUDIO_OFFLOAD_LOG(type, msg)
|
||||
#endif
|
||||
|
||||
using namespace android;
|
||||
|
||||
|
@ -39,11 +35,9 @@ AudioOutput::AudioOutput(int aSessionId, int aUid) :
|
|||
mUid(aUid),
|
||||
mSessionId(aSessionId)
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gAudioOffloadPlayerLog) {
|
||||
gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
AudioOutput::~AudioOutput()
|
||||
|
|
|
@ -10,12 +10,8 @@
|
|||
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
PRLogModuleInfo *gI420ColorConverterHelperLog;
|
||||
#define LOG(msg...) PR_LOG(gI420ColorConverterHelperLog, PR_LOG_WARNING, (msg))
|
||||
#else
|
||||
#define LOG(x...)
|
||||
#endif
|
||||
|
||||
namespace android {
|
||||
|
||||
|
@ -23,11 +19,9 @@ I420ColorConverterHelper::I420ColorConverterHelper()
|
|||
: mHandle(nullptr)
|
||||
, mConverter({nullptr, nullptr, nullptr, nullptr, nullptr})
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
if (!gI420ColorConverterHelperLog) {
|
||||
gI420ColorConverterHelperLog = PR_NewLogModule("I420ColorConverterHelper");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
I420ColorConverterHelper::~I420ColorConverterHelper()
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче