mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515) Backed out changeset 150606c022a2 (bug 1165515) Backed out changeset 4e875a488349 (bug 1165515) Backed out changeset 467e7feeb546 (bug 1165515) Backed out changeset d6b6cc373197 (bug 1165515) Backed out changeset 0615265b593c (bug 1165515) Backed out changeset fafd1dce9f08 (bug 1165515) Backed out changeset d1df869245f9 (bug 1165515) Backed out changeset 6876a7c63611 (bug 1165515) Backed out changeset b7841c94a9a3 (bug 1165515) Backed out changeset e5e3617f7c73 (bug 1165515) Backed out changeset 39be3db95978 (bug 1165515) Backed out changeset 0ec74176f8de (bug 1165515) Backed out changeset 5b928dd10d71 (bug 1165515)
This commit is contained in:
parent
8c6cfbd786
commit
fcc808d96c
@ -926,7 +926,7 @@ nsDocShell::nsDocShell()
|
||||
gDocShellLeakLog = PR_NewLogModule("nsDocShellLeak");
|
||||
}
|
||||
if (gDocShellLeakLog) {
|
||||
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug, ("DOCSHELL %p created\n", this));
|
||||
MOZ_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p created\n", this));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -958,7 +958,7 @@ nsDocShell::~nsDocShell()
|
||||
}
|
||||
|
||||
if (gDocShellLeakLog) {
|
||||
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug, ("DOCSHELL %p destroyed\n", this));
|
||||
MOZ_LOG(gDocShellLeakLog, PR_LOG_DEBUG, ("DOCSHELL %p destroyed\n", this));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -1095,7 +1095,7 @@ nsDocShell::GetInterface(const nsIID& aIID, void** aSink)
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
MOZ_LOG(gDocShellLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
("nsDocShell[%p]: returning app cache container %p",
|
||||
this, domDoc.get()));
|
||||
#endif
|
||||
@ -1418,10 +1418,10 @@ nsDocShell::LoadURI(nsIURI* aURI,
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString uristr;
|
||||
aURI->GetAsciiSpec(uristr);
|
||||
MOZ_LOG(gDocShellLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
("nsDocShell[%p]: loading %s with flags 0x%08x",
|
||||
this, uristr.get(), aLoadFlags));
|
||||
}
|
||||
@ -1540,7 +1540,7 @@ nsDocShell::LoadURI(nsIURI* aURI,
|
||||
|
||||
if (shEntry) {
|
||||
#ifdef DEBUG
|
||||
MOZ_LOG(gDocShellLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
("nsDocShell[%p]: loading from session history", this));
|
||||
#endif
|
||||
|
||||
@ -1980,7 +1980,7 @@ bool
|
||||
nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
|
||||
bool aFireOnLocationChange, uint32_t aLocationFlags)
|
||||
{
|
||||
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, LogLevel::Debug)) {
|
||||
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
if (aURI) {
|
||||
aURI->GetSpec(spec);
|
||||
@ -5302,7 +5302,7 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
|
||||
nsIChannel* aFailedChannel)
|
||||
{
|
||||
#if defined(DEBUG)
|
||||
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
|
||||
@ -5313,7 +5313,7 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
|
||||
chanName.AssignLiteral("<no channel>");
|
||||
}
|
||||
|
||||
MOZ_LOG(gDocShellLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
("nsDocShell[%p]::LoadErrorPage(\"%s\", \"%s\", {...}, [%s])\n", this,
|
||||
spec.get(), NS_ConvertUTF16toUTF8(aURL).get(), chanName.get()));
|
||||
}
|
||||
@ -9606,7 +9606,7 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
||||
nsresult rv = NS_OK;
|
||||
mOriginalUriString.Truncate();
|
||||
|
||||
if (gDocShellLeakLog && MOZ_LOG_TEST(gDocShellLeakLog, LogLevel::Debug)) {
|
||||
if (gDocShellLeakLog && PR_LOG_TEST(gDocShellLeakLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
if (aURI) {
|
||||
aURI->GetSpec(spec);
|
||||
@ -11165,7 +11165,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
|
||||
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
|
||||
|
||||
#if defined(DEBUG)
|
||||
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
|
||||
@ -11176,7 +11176,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
|
||||
chanName.AssignLiteral("<no channel>");
|
||||
}
|
||||
|
||||
MOZ_LOG(gDocShellLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
("nsDocShell[%p]::OnNewURI(\"%s\", [%s], 0x%x)\n", this, spec.get(),
|
||||
chanName.get(), aLoadType));
|
||||
}
|
||||
@ -11241,7 +11241,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
|
||||
// XXX This log message is almost useless because |updateSHistory|
|
||||
// and |updateGHistory| are not correct at this point.
|
||||
|
||||
MOZ_LOG(gDocShellLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
(" shAvailable=%i updateSHistory=%i updateGHistory=%i"
|
||||
" equalURI=%i\n",
|
||||
shAvailable, updateSHistory, updateGHistory, equalUri));
|
||||
@ -11785,7 +11785,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
|
||||
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
|
||||
|
||||
#if defined(DEBUG)
|
||||
if (MOZ_LOG_TEST(gDocShellLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDocShellLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
|
||||
@ -11796,7 +11796,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
|
||||
chanName.AssignLiteral("<no channel>");
|
||||
}
|
||||
|
||||
MOZ_LOG(gDocShellLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocShellLog, PR_LOG_DEBUG,
|
||||
("nsDocShell[%p]::AddToSessionHistory(\"%s\", [%s])\n",
|
||||
this, spec.get(), chanName.get()));
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ GetSHistoryLog()
|
||||
}
|
||||
return sLog;
|
||||
}
|
||||
#define LOG(format) MOZ_LOG(GetSHistoryLog(), mozilla::LogLevel::Debug, format)
|
||||
#define LOG(format) MOZ_LOG(GetSHistoryLog(), PR_LOG_DEBUG, format)
|
||||
|
||||
// This macro makes it easier to print a log message which includes a URI's
|
||||
// spec. Example use:
|
||||
@ -78,7 +78,7 @@ GetSHistoryLog()
|
||||
//
|
||||
#define LOG_SPEC(format, uri) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (MOZ_LOG_TEST(GetSHistoryLog(), LogLevel::Debug)) { \
|
||||
if (PR_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
|
||||
nsAutoCString _specStr(NS_LITERAL_CSTRING("(null)"));\
|
||||
if (uri) { \
|
||||
uri->GetSpec(_specStr); \
|
||||
@ -96,7 +96,7 @@ GetSHistoryLog()
|
||||
//
|
||||
#define LOG_SHENTRY_SPEC(format, shentry) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (MOZ_LOG_TEST(GetSHistoryLog(), LogLevel::Debug)) { \
|
||||
if (PR_LOG_TEST(GetSHistoryLog(), PR_LOG_DEBUG)) { \
|
||||
nsCOMPtr<nsIURI> uri; \
|
||||
shentry->GetURI(getter_AddRefs(uri)); \
|
||||
LOG_SPEC(format, uri); \
|
||||
|
@ -23,7 +23,7 @@ NS_IMPL_ISUPPORTS(ThirdPartyUtil, mozIThirdPartyUtil)
|
||||
//
|
||||
static PRLogModuleInfo *gThirdPartyLog;
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(gThirdPartyLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG(args) MOZ_LOG(gThirdPartyLog, PR_LOG_DEBUG, args)
|
||||
|
||||
nsresult
|
||||
ThirdPartyUtil::Init()
|
||||
|
@ -188,7 +188,7 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
|
||||
#define LOG_CHECK(logType) \
|
||||
PR_BEGIN_MACRO \
|
||||
/* skip all this nonsense if the call failed or logging is disabled */ \
|
||||
if (NS_SUCCEEDED(rv) && MOZ_LOG_TEST(gConPolLog, LogLevel::Debug)) { \
|
||||
if (NS_SUCCEEDED(rv) && PR_LOG_TEST(gConPolLog, PR_LOG_DEBUG)) { \
|
||||
const char *resultName; \
|
||||
if (decision) { \
|
||||
resultName = NS_CP_ResponseName(*decision); \
|
||||
@ -203,7 +203,7 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
|
||||
if (requestingLocation) { \
|
||||
requestingLocation->GetSpec(refSpec); \
|
||||
} \
|
||||
MOZ_LOG(gConPolLog, LogLevel::Debug, \
|
||||
MOZ_LOG(gConPolLog, PR_LOG_DEBUG, \
|
||||
("Content Policy: " logType ": <%s> <Ref:%s> result=%s", \
|
||||
spec.get(), refSpec.get(), resultName) \
|
||||
); \
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
extern PRLogModuleInfo* GetDataChannelLog();
|
||||
#undef LOG
|
||||
#define LOG(args) MOZ_LOG(GetDataChannelLog(), mozilla::LogLevel::Debug, args)
|
||||
#define LOG(args) MOZ_LOG(GetDataChannelLog(), PR_LOG_DEBUG, args)
|
||||
|
||||
|
||||
#include "nsDOMDataChannelDeclarations.h"
|
||||
|
@ -1595,7 +1595,7 @@ nsDocument::nsDocument(const char* aContentType)
|
||||
gDocumentLeakPRLog = PR_NewLogModule("DocumentLeak");
|
||||
|
||||
if (gDocumentLeakPRLog)
|
||||
MOZ_LOG(gDocumentLeakPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocumentLeakPRLog, PR_LOG_DEBUG,
|
||||
("DOCUMENT %p created", this));
|
||||
|
||||
if (!gCspPRLog)
|
||||
@ -1639,7 +1639,7 @@ nsIDocument::~nsIDocument()
|
||||
nsDocument::~nsDocument()
|
||||
{
|
||||
if (gDocumentLeakPRLog)
|
||||
MOZ_LOG(gDocumentLeakPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDocumentLeakPRLog, PR_LOG_DEBUG,
|
||||
("DOCUMENT %p destroyed", this));
|
||||
|
||||
NS_ASSERTION(!mIsShowing, "Destroying a currently-showing document");
|
||||
@ -2305,7 +2305,7 @@ nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
|
||||
{
|
||||
NS_PRECONDITION(aURI, "Null URI passed to ResetToURI");
|
||||
|
||||
if (gDocumentLeakPRLog && MOZ_LOG_TEST(gDocumentLeakPRLog, LogLevel::Debug)) {
|
||||
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
|
||||
nsAutoCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
PR_LogPrint("DOCUMENT %p ResetToURI %s", this, spec.get());
|
||||
@ -2638,7 +2638,7 @@ nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
|
||||
nsIStreamListener **aDocListener,
|
||||
bool aReset, nsIContentSink* aSink)
|
||||
{
|
||||
if (gDocumentLeakPRLog && MOZ_LOG_TEST(gDocumentLeakPRLog, LogLevel::Debug)) {
|
||||
if (gDocumentLeakPRLog && PR_LOG_TEST(gDocumentLeakPRLog, PR_LOG_DEBUG)) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
aChannel->GetURI(getter_AddRefs(uri));
|
||||
nsAutoCString spec;
|
||||
@ -2773,7 +2773,7 @@ AppendCSPFromHeader(nsIContentSecurityPolicy* csp,
|
||||
rv = csp->AppendPolicy(policy, aReportOnly);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
{
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("CSP refined with policy: \"%s\"",
|
||||
NS_ConvertUTF16toUTF8(policy).get()));
|
||||
}
|
||||
@ -2813,7 +2813,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
{
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp;
|
||||
if (!CSPService::sCSPEnabled) {
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("CSP is disabled, skipping CSP init for document %p", this));
|
||||
return NS_OK;
|
||||
}
|
||||
@ -2866,12 +2866,12 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
!applyLoopCSP &&
|
||||
cspHeaderValue.IsEmpty() &&
|
||||
cspROHeaderValue.IsEmpty()) {
|
||||
if (MOZ_LOG_TEST(gCspPRLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gCspPRLog, PR_LOG_DEBUG)) {
|
||||
nsCOMPtr<nsIURI> chanURI;
|
||||
aChannel->GetURI(getter_AddRefs(chanURI));
|
||||
nsAutoCString aspec;
|
||||
chanURI->GetAsciiSpec(aspec);
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("no CSP for document, %s, %s",
|
||||
aspec.get(),
|
||||
applyAppDefaultCSP ? "is app" : "not an app"));
|
||||
@ -2880,7 +2880,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug, ("Document is an app or CSP header specified %p", this));
|
||||
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG, ("Document is an app or CSP header specified %p", this));
|
||||
|
||||
nsresult rv;
|
||||
|
||||
@ -2899,7 +2899,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (csp) {
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug, ("%s %s %s",
|
||||
MOZ_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."));
|
||||
@ -2910,7 +2910,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
csp = do_CreateInstance("@mozilla.org/cspcontext;1", &rv);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug, ("Failed to create CSP object: %x", rv));
|
||||
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG, ("Failed to create CSP object: %x", rv));
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -2963,7 +2963,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
rv = csp->PermitsAncestry(docShell, &safeAncestry);
|
||||
|
||||
if (NS_FAILED(rv) || !safeAncestry) {
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("CSP doesn't like frame's ancestry, not loading."));
|
||||
// stop! ERROR page!
|
||||
aChannel->Cancel(NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION);
|
||||
@ -2988,7 +2988,7 @@ nsDocument::InitCSP(nsIChannel* aChannel)
|
||||
|
||||
rv = principal->SetCsp(csp);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
MOZ_LOG(gCspPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gCspPRLog, PR_LOG_DEBUG,
|
||||
("Inserted CSP into principal %p", principal));
|
||||
|
||||
return NS_OK;
|
||||
|
@ -77,16 +77,16 @@ using namespace mozilla::widget;
|
||||
PRLogModuleInfo* gFocusLog;
|
||||
PRLogModuleInfo* gFocusNavigationLog;
|
||||
|
||||
#define LOGFOCUS(args) MOZ_LOG(gFocusLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOGFOCUSNAVIGATION(args) MOZ_LOG(gFocusNavigationLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOGFOCUS(args) MOZ_LOG(gFocusLog, PR_LOG_DEBUG, args)
|
||||
#define LOGFOCUSNAVIGATION(args) MOZ_LOG(gFocusNavigationLog, PR_LOG_DEBUG, args)
|
||||
|
||||
#define LOGTAG(log, format, content) \
|
||||
if (MOZ_LOG_TEST(log, LogLevel::Debug)) { \
|
||||
if (PR_LOG_TEST(log, PR_LOG_DEBUG)) { \
|
||||
nsAutoCString tag(NS_LITERAL_CSTRING("(none)")); \
|
||||
if (content) { \
|
||||
content->NodeInfo()->NameAtom()->ToUTF8String(tag); \
|
||||
} \
|
||||
MOZ_LOG(log, LogLevel::Debug, (format, tag.get())); \
|
||||
MOZ_LOG(log, PR_LOG_DEBUG, (format, tag.get())); \
|
||||
}
|
||||
|
||||
#define LOGCONTENT(format, content) LOGTAG(gFocusLog, format, content)
|
||||
@ -482,7 +482,7 @@ nsFocusManager::MoveFocus(nsIDOMWindow* aWindow, nsIDOMElement* aStartElement,
|
||||
|
||||
LOGFOCUS(("<<MoveFocus begin Type: %d Flags: %x>>", aType, aFlags));
|
||||
|
||||
if (MOZ_LOG_TEST(gFocusLog, LogLevel::Debug) && mFocusedWindow) {
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG) && mFocusedWindow) {
|
||||
nsIDocument* doc = mFocusedWindow->GetExtantDoc();
|
||||
if (doc && doc->GetDocumentURI()) {
|
||||
nsAutoCString spec;
|
||||
@ -638,7 +638,7 @@ nsFocusManager::WindowRaised(nsIDOMWindow* aWindow)
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
|
||||
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
|
||||
|
||||
if (MOZ_LOG_TEST(gFocusLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Raised [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
nsIDocument* doc = window->GetExtantDoc();
|
||||
@ -734,7 +734,7 @@ nsFocusManager::WindowLowered(nsIDOMWindow* aWindow)
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aWindow);
|
||||
NS_ENSURE_TRUE(window && window->IsOuterWindow(), NS_ERROR_INVALID_ARG);
|
||||
|
||||
if (MOZ_LOG_TEST(gFocusLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Lowered [Currently: %p %p]", aWindow, mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
nsIDocument* doc = window->GetExtantDoc();
|
||||
@ -852,7 +852,7 @@ nsFocusManager::WindowShown(nsIDOMWindow* aWindow, bool aNeedsFocus)
|
||||
|
||||
window = window->GetOuterWindow();
|
||||
|
||||
if (MOZ_LOG_TEST(gFocusLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Shown [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
nsIDocument* doc = window->GetExtantDoc();
|
||||
@ -907,7 +907,7 @@ nsFocusManager::WindowHidden(nsIDOMWindow* aWindow)
|
||||
|
||||
window = window->GetOuterWindow();
|
||||
|
||||
if (MOZ_LOG_TEST(gFocusLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
LOGFOCUS(("Window %p Hidden [Currently: %p %p]", window.get(), mActiveWindow.get(), mFocusedWindow.get()));
|
||||
nsAutoCString spec;
|
||||
nsIDocument* doc = window->GetExtantDoc();
|
||||
@ -1777,7 +1777,7 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
|
||||
|
||||
LOGCONTENT("Element %s has been focused", aContent);
|
||||
|
||||
if (MOZ_LOG_TEST(gFocusLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gFocusLog, PR_LOG_DEBUG)) {
|
||||
nsIDocument* docm = aWindow->GetExtantDoc();
|
||||
if (docm) {
|
||||
LOGCONTENT(" from %s", docm->GetRootElement());
|
||||
|
@ -1211,7 +1211,7 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
||||
#endif
|
||||
|
||||
if (gDOMLeakPRLog)
|
||||
MOZ_LOG(gDOMLeakPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
|
||||
("DOMWINDOW %p created outer=%p", this, aOuterWindow));
|
||||
|
||||
NS_ASSERTION(sWindowsById, "Windows hash table must be created!");
|
||||
@ -1301,7 +1301,7 @@ nsGlobalWindow::~nsGlobalWindow()
|
||||
#endif
|
||||
|
||||
if (gDOMLeakPRLog)
|
||||
MOZ_LOG(gDOMLeakPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gDOMLeakPRLog, PR_LOG_DEBUG,
|
||||
("DOMWINDOW %p destroyed", this));
|
||||
|
||||
if (IsOuterWindow()) {
|
||||
@ -2804,7 +2804,7 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
|
||||
NS_PRECONDITION(IsInnerWindow(), "Must only be called on inner windows");
|
||||
MOZ_ASSERT(aDocument);
|
||||
|
||||
if (gDOMLeakPRLog && MOZ_LOG_TEST(gDOMLeakPRLog, LogLevel::Debug)) {
|
||||
if (gDOMLeakPRLog && PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
nsIURI *uri = aDocument->GetDocumentURI();
|
||||
nsAutoCString spec;
|
||||
if (uri)
|
||||
@ -10558,7 +10558,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
|
||||
}
|
||||
|
||||
if (mSessionStorage) {
|
||||
if (MOZ_LOG_TEST(gDOMLeakPRLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p has %p sessionStorage", this, mSessionStorage.get());
|
||||
}
|
||||
bool canAccess = mSessionStorage->CanAccess(principal);
|
||||
@ -10609,7 +10609,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
|
||||
mSessionStorage = static_cast<DOMStorage*>(storage.get());
|
||||
MOZ_ASSERT(mSessionStorage);
|
||||
|
||||
if (MOZ_LOG_TEST(gDOMLeakPRLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p tried to get a new sessionStorage %p", this, mSessionStorage.get());
|
||||
}
|
||||
|
||||
@ -10619,7 +10619,7 @@ nsGlobalWindow::GetSessionStorage(ErrorResult& aError)
|
||||
}
|
||||
}
|
||||
|
||||
if (MOZ_LOG_TEST(gDOMLeakPRLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p returns %p sessionStorage", this, mSessionStorage.get());
|
||||
}
|
||||
|
||||
@ -11537,7 +11537,7 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (MOZ_LOG_TEST(gDOMLeakPRLog, LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(gDOMLeakPRLog, PR_LOG_DEBUG)) {
|
||||
PR_LogPrint("nsGlobalWindow %p with sessionStorage %p passing event from %p",
|
||||
this, mSessionStorage.get(), changingStorage.get());
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ nsNodeInfoManager::nsNodeInfoManager()
|
||||
gNodeInfoManagerLeakPRLog = PR_NewLogModule("NodeInfoManagerLeak");
|
||||
|
||||
if (gNodeInfoManagerLeakPRLog)
|
||||
MOZ_LOG(gNodeInfoManagerLeakPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
|
||||
("NODEINFOMANAGER %p created", this));
|
||||
|
||||
mNodeInfoHash = PL_NewHashTable(32, GetNodeInfoInnerHashValue,
|
||||
@ -139,7 +139,7 @@ nsNodeInfoManager::~nsNodeInfoManager()
|
||||
mBindingManager = nullptr;
|
||||
|
||||
if (gNodeInfoManagerLeakPRLog)
|
||||
MOZ_LOG(gNodeInfoManagerLeakPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
|
||||
("NODEINFOMANAGER %p destroyed", this));
|
||||
|
||||
nsLayoutStatics::Release();
|
||||
@ -196,7 +196,7 @@ nsNodeInfoManager::Init(nsIDocument *aDocument)
|
||||
mDocument = aDocument;
|
||||
|
||||
if (gNodeInfoManagerLeakPRLog)
|
||||
MOZ_LOG(gNodeInfoManagerLeakPRLog, LogLevel::Debug,
|
||||
MOZ_LOG(gNodeInfoManagerLeakPRLog, PR_LOG_DEBUG,
|
||||
("NODEINFOMANAGER %p Init document=%p", this, aDocument));
|
||||
|
||||
return NS_OK;
|
||||
|
@ -116,8 +116,8 @@ GetObjectLog()
|
||||
return sLog;
|
||||
}
|
||||
|
||||
#define LOG(args) MOZ_LOG(GetObjectLog(), mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(GetObjectLog(), mozilla::LogLevel::Debug)
|
||||
#define LOG(args) MOZ_LOG(GetObjectLog(), PR_LOG_DEBUG, args)
|
||||
#define LOG_ENABLED() PR_LOG_TEST(GetObjectLog(), PR_LOG_DEBUG)
|
||||
|
||||
static bool
|
||||
IsJavaMIME(const nsACString & aMIMEType)
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* GetCameraLog();
|
||||
#define DOM_CAMERA_LOG( type, ... ) MOZ_LOG(GetCameraLog(), (mozilla::LogLevel)type, ( __VA_ARGS__ ))
|
||||
#define DOM_CAMERA_LOG( type, ... ) MOZ_LOG(GetCameraLog(), (PRLogModuleLevel)type, ( __VA_ARGS__ ))
|
||||
|
||||
#define DOM_CAMERA_LOGA( ... ) DOM_CAMERA_LOG( 0, __VA_ARGS__ )
|
||||
|
||||
|
@ -43,16 +43,16 @@ using namespace widget;
|
||||
|
||||
/**
|
||||
* When a method is called, log its arguments and/or related static variables
|
||||
* with LogLevel::Info. However, if it puts too many logs like
|
||||
* with PR_LOG_ALWAYS. However, if it puts too many logs like
|
||||
* OnDestroyPresContext(), should long only when the method actually does
|
||||
* something. In this case, the log should start with "ISM: <method name>".
|
||||
*
|
||||
* When a method quits due to unexpected situation, log the reason with
|
||||
* LogLevel::Error. In this case, the log should start with
|
||||
* PR_LOG_ERROR. In this case, the log should start with
|
||||
* "ISM: <method name>(), FAILED". The indent makes the log look easier.
|
||||
*
|
||||
* When a method does something only in some situations and it may be important
|
||||
* for debug, log the information with LogLevel::Debug. In this case, the log
|
||||
* for debug, log the information with PR_LOG_DEBUG. In this case, the log
|
||||
* should start with "ISM: <method name>(),".
|
||||
*/
|
||||
PRLogModuleInfo* sISMLog = nullptr;
|
||||
@ -200,7 +200,7 @@ IMEStateManager::Init()
|
||||
void
|
||||
IMEStateManager::Shutdown()
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::Shutdown(), "
|
||||
"sTextCompositions=0x%p, sTextCompositions->Length()=%u",
|
||||
sTextCompositions, sTextCompositions ? sTextCompositions->Length() : 0));
|
||||
@ -221,7 +221,7 @@ IMEStateManager::OnDestroyPresContext(nsPresContext* aPresContext)
|
||||
TextCompositionArray::index_type i =
|
||||
sTextCompositions->IndexOf(aPresContext);
|
||||
if (i != TextCompositionArray::NoIndex) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnDestroyPresContext(), "
|
||||
"removing TextComposition instance from the array (index=%u)", i));
|
||||
// there should be only one composition per presContext object.
|
||||
@ -229,7 +229,7 @@ IMEStateManager::OnDestroyPresContext(nsPresContext* aPresContext)
|
||||
sTextCompositions->RemoveElementAt(i);
|
||||
if (sTextCompositions->IndexOf(aPresContext) !=
|
||||
TextCompositionArray::NoIndex) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::OnDestroyPresContext(), FAILED to remove "
|
||||
"TextComposition instance from the array"));
|
||||
MOZ_CRASH("Failed to remove TextComposition instance from the array");
|
||||
@ -241,7 +241,7 @@ IMEStateManager::OnDestroyPresContext(nsPresContext* aPresContext)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnDestroyPresContext(aPresContext=0x%p), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sTextCompositions=0x%p",
|
||||
aPresContext, sPresContext, sContent, sTextCompositions));
|
||||
@ -273,7 +273,7 @@ IMEStateManager::OnRemoveContent(nsPresContext* aPresContext,
|
||||
sTextCompositions->GetCompositionInContent(aPresContext, aContent);
|
||||
|
||||
if (compositionInContent) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnRemoveContent(), "
|
||||
"composition is in the content"));
|
||||
|
||||
@ -296,7 +296,7 @@ IMEStateManager::OnRemoveContent(nsPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnRemoveContent(aPresContext=0x%p, "
|
||||
"aContent=0x%p), sPresContext=0x%p, sContent=0x%p, sTextCompositions=0x%p",
|
||||
aPresContext, aContent, sPresContext, sContent, sTextCompositions));
|
||||
@ -324,7 +324,7 @@ IMEStateManager::OnChangeFocus(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
InputContextAction::Cause aCause)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnChangeFocus(aPresContext=0x%p, "
|
||||
"aContent=0x%p, aCause=%s)",
|
||||
aPresContext, aContent, GetActionCauseName(aCause)));
|
||||
@ -339,7 +339,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
InputContextAction aAction)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnChangeFocusInternal(aPresContext=0x%p, "
|
||||
"aContent=0x%p, aAction={ mCause=%s, mFocusChange=%s }), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p",
|
||||
@ -367,7 +367,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
if (!aPresContext) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnChangeFocusInternal(), "
|
||||
"no nsPresContext is being activated"));
|
||||
return NS_OK;
|
||||
@ -377,7 +377,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
(sPresContext == aPresContext) ? oldWidget.get() :
|
||||
aPresContext->GetRootWidget();
|
||||
if (NS_WARN_IF(!widget)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::OnChangeFocusInternal(), FAILED due to "
|
||||
"no widget to manage its IME state"));
|
||||
return NS_OK;
|
||||
@ -395,7 +395,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
// on focus to the main process... but this cannot cause bugs like missed keypresses.
|
||||
// (It just means a lot of needless IPC.)
|
||||
if ((newState.mEnabled == IMEState::DISABLED) && TabParent::GetIMETabParent()) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnChangeFocusInternal(), "
|
||||
"Parent process cancels to set DISABLED state because the content process "
|
||||
"has IME focus and has already sets IME state"));
|
||||
@ -410,7 +410,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
// we should do it.
|
||||
InputContext context = widget->GetInputContext();
|
||||
if (context.mIMEState.mEnabled == newState.mEnabled) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnChangeFocusInternal(), "
|
||||
"neither focus nor IME state is changing"));
|
||||
return NS_OK;
|
||||
@ -449,7 +449,7 @@ IMEStateManager::OnChangeFocusInternal(nsPresContext* aPresContext,
|
||||
void
|
||||
IMEStateManager::OnInstalledMenuKeyboardListener(bool aInstalling)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnInstalledMenuKeyboardListener(aInstalling=%s), "
|
||||
"sInstalledMenuKeyboardListener=%s",
|
||||
GetBoolName(aInstalling), GetBoolName(sInstalledMenuKeyboardListener)));
|
||||
@ -468,27 +468,27 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIDOMMouseEvent* aMouseEvent)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(aPresContext=0x%p, "
|
||||
"aContent=0x%p, aMouseEvent=0x%p), sPresContext=0x%p, sContent=0x%p",
|
||||
aPresContext, aContent, aMouseEvent, sPresContext, sContent));
|
||||
|
||||
if (sPresContext != aPresContext || sContent != aContent) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(), "
|
||||
"the mouse event isn't fired on the editor managed by ISM"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sActiveIMEContentObserver) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(), "
|
||||
"there is no active IMEContentObserver"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sActiveIMEContentObserver->IsManaging(aPresContext, aContent)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(), "
|
||||
"the active IMEContentObserver isn't managing the editor"));
|
||||
return false;
|
||||
@ -497,7 +497,7 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
|
||||
WidgetMouseEvent* internalEvent =
|
||||
aMouseEvent->GetInternalNSEvent()->AsMouseEvent();
|
||||
if (NS_WARN_IF(!internalEvent)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(), "
|
||||
"the internal event of aMouseEvent isn't WidgetMouseEvent"));
|
||||
return false;
|
||||
@ -506,10 +506,10 @@ IMEStateManager::OnMouseButtonEventInEditor(nsPresContext* aPresContext,
|
||||
bool consumed =
|
||||
sActiveIMEContentObserver->OnMouseButtonEvent(aPresContext, internalEvent);
|
||||
|
||||
if (MOZ_LOG_TEST(sISMLog, LogLevel::Info)) {
|
||||
if (PR_LOG_TEST(sISMLog, PR_LOG_ALWAYS)) {
|
||||
nsAutoString eventType;
|
||||
aMouseEvent->GetType(eventType);
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnMouseButtonEventInEditor(), "
|
||||
"mouse event (type=%s, button=%d) is %s",
|
||||
NS_ConvertUTF16toUTF8(eventType).get(), internalEvent->button,
|
||||
@ -525,13 +525,13 @@ IMEStateManager::OnClickInEditor(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIDOMMouseEvent* aMouseEvent)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnClickInEditor(aPresContext=0x%p, aContent=0x%p, "
|
||||
"aMouseEvent=0x%p), sPresContext=0x%p, sContent=0x%p",
|
||||
aPresContext, aContent, aMouseEvent, sPresContext, sContent));
|
||||
|
||||
if (sPresContext != aPresContext || sContent != aContent) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnClickInEditor(), "
|
||||
"the mouse event isn't fired on the editor managed by ISM"));
|
||||
return;
|
||||
@ -544,7 +544,7 @@ IMEStateManager::OnClickInEditor(nsPresContext* aPresContext,
|
||||
nsresult rv = aMouseEvent->GetIsTrusted(&isTrusted);
|
||||
NS_ENSURE_SUCCESS_VOID(rv);
|
||||
if (!isTrusted) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnClickInEditor(), "
|
||||
"the mouse event isn't a trusted event"));
|
||||
return; // ignore untrusted event.
|
||||
@ -554,7 +554,7 @@ IMEStateManager::OnClickInEditor(nsPresContext* aPresContext,
|
||||
rv = aMouseEvent->GetButton(&button);
|
||||
NS_ENSURE_SUCCESS_VOID(rv);
|
||||
if (button != 0) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnClickInEditor(), "
|
||||
"the mouse event isn't a left mouse button event"));
|
||||
return; // not a left click event.
|
||||
@ -564,7 +564,7 @@ IMEStateManager::OnClickInEditor(nsPresContext* aPresContext,
|
||||
rv = aMouseEvent->GetDetail(&clickCount);
|
||||
NS_ENSURE_SUCCESS_VOID(rv);
|
||||
if (clickCount != 1) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnClickInEditor(), "
|
||||
"the mouse event isn't a single click event"));
|
||||
return; // should notify only first click event.
|
||||
@ -582,7 +582,7 @@ IMEStateManager::OnFocusInEditor(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsIEditor* aEditor)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnFocusInEditor(aPresContext=0x%p, aContent=0x%p, "
|
||||
"aEditor=0x%p), sPresContext=0x%p, sContent=0x%p, "
|
||||
"sActiveIMEContentObserver=0x%p",
|
||||
@ -590,7 +590,7 @@ IMEStateManager::OnFocusInEditor(nsPresContext* aPresContext,
|
||||
sActiveIMEContentObserver));
|
||||
|
||||
if (sPresContext != aPresContext || sContent != aContent) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnFocusInEditor(), "
|
||||
"an editor not managed by ISM gets focus"));
|
||||
return;
|
||||
@ -600,7 +600,7 @@ IMEStateManager::OnFocusInEditor(nsPresContext* aPresContext,
|
||||
// we need to recreate the instance.
|
||||
if (sActiveIMEContentObserver) {
|
||||
if (sActiveIMEContentObserver->IsManaging(aPresContext, aContent)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::OnFocusInEditor(), "
|
||||
"the editor is already being managed by sActiveIMEContentObserver"));
|
||||
return;
|
||||
@ -617,7 +617,7 @@ IMEStateManager::UpdateIMEState(const IMEState& aNewIMEState,
|
||||
nsIContent* aContent,
|
||||
nsIEditor* aEditor)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::UpdateIMEState(aNewIMEState={ mEnabled=%s, "
|
||||
"mOpen=%s }, aContent=0x%p, aEditor=0x%p), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p, "
|
||||
@ -628,21 +628,21 @@ IMEStateManager::UpdateIMEState(const IMEState& aNewIMEState,
|
||||
GetBoolName(sIsGettingNewIMEState)));
|
||||
|
||||
if (sIsGettingNewIMEState) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::UpdateIMEState(), "
|
||||
"does nothing because of called while getting new IME state"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(!sPresContext)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::UpdateIMEState(), FAILED due to "
|
||||
"no managing nsPresContext"));
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsIWidget> widget = sPresContext->GetRootWidget();
|
||||
if (NS_WARN_IF(!widget)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::UpdateIMEState(), FAILED due to "
|
||||
"no widget for the managing nsPresContext"));
|
||||
return;
|
||||
@ -652,12 +652,12 @@ IMEStateManager::UpdateIMEState(const IMEState& aNewIMEState,
|
||||
// editor with current editable root content due to reframed. In such case,
|
||||
// We should try to reinitialize the IMEContentObserver.
|
||||
if (sActiveIMEContentObserver && IsIMEObserverNeeded(aNewIMEState)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
PR_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::UpdateIMEState(), try to reinitialize the "
|
||||
"active IMEContentObserver"));
|
||||
if (!sActiveIMEContentObserver->MaybeReinitialize(widget, sPresContext,
|
||||
aContent, aEditor)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
PR_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::UpdateIMEState(), failed to reinitialize the "
|
||||
"active IMEContentObserver"));
|
||||
}
|
||||
@ -697,7 +697,7 @@ IMEState
|
||||
IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
|
||||
nsIContent* aContent)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::GetNewIMEState(aPresContext=0x%p, aContent=0x%p), "
|
||||
"sInstalledMenuKeyboardListener=%s",
|
||||
aPresContext, aContent, GetBoolName(sInstalledMenuKeyboardListener)));
|
||||
@ -705,14 +705,14 @@ IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
|
||||
// On Printing or Print Preview, we don't need IME.
|
||||
if (aPresContext->Type() == nsPresContext::eContext_PrintPreview ||
|
||||
aPresContext->Type() == nsPresContext::eContext_Print) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::GetNewIMEState() returns DISABLED because "
|
||||
"the nsPresContext is for print or print preview"));
|
||||
return IMEState(IMEState::DISABLED);
|
||||
}
|
||||
|
||||
if (sInstalledMenuKeyboardListener) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::GetNewIMEState() returns DISABLED because "
|
||||
"menu keyboard listener was installed"));
|
||||
return IMEState(IMEState::DISABLED);
|
||||
@ -723,12 +723,12 @@ IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
|
||||
// editable, such case is design mode.
|
||||
nsIDocument* doc = aPresContext->Document();
|
||||
if (doc && doc->HasFlag(NODE_IS_EDITABLE)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::GetNewIMEState() returns ENABLED because "
|
||||
"design mode editor has focus"));
|
||||
return IMEState(IMEState::ENABLED);
|
||||
}
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::GetNewIMEState() returns DISABLED because "
|
||||
"no content has focus"));
|
||||
return IMEState(IMEState::DISABLED);
|
||||
@ -742,7 +742,7 @@ IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
|
||||
GettingNewIMEStateBlocker blocker;
|
||||
|
||||
IMEState newIMEState = aContent->GetDesiredIMEState();
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::GetNewIMEState() returns { mEnabled=%s, "
|
||||
"mOpen=%s }",
|
||||
GetIMEStateEnabledName(newIMEState.mEnabled),
|
||||
@ -763,7 +763,7 @@ public:
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
services::GetObserverService();
|
||||
if (observerService) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEEnabledStateChangedEvent::Run(), notifies observers of "
|
||||
"\"ime-enabled-state-changed\""));
|
||||
nsAutoString state;
|
||||
@ -785,7 +785,7 @@ IMEStateManager::SetIMEState(const IMEState& aState,
|
||||
nsIWidget* aWidget,
|
||||
InputContextAction aAction)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::SetIMEState(aState={ mEnabled=%s, mOpen=%s }, "
|
||||
"aContent=0x%p, aWidget=0x%p, aAction={ mCause=%s, mFocusChange=%s })",
|
||||
GetIMEStateEnabledName(aState.mEnabled),
|
||||
@ -871,7 +871,7 @@ IMEStateManager::SetIMEState(const IMEState& aState,
|
||||
}
|
||||
|
||||
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::SetIMEState(), "
|
||||
"calling nsIWidget::SetInputContext(context={ mIMEState={ mEnabled=%s, "
|
||||
"mOpen=%s }, mHTMLInputType=\"%s\", mHTMLInputInputmode=\"%s\", "
|
||||
@ -913,7 +913,7 @@ IMEStateManager::DispatchCompositionEvent(
|
||||
EventDispatchingCallback* aCallBack,
|
||||
bool aIsSynthesized)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::DispatchCompositionEvent(aNode=0x%p, "
|
||||
"aPresContext=0x%p, aCompositionEvent={ message=%s, "
|
||||
"mFlags={ mIsTrusted=%s, mPropagationStopped=%s } }, "
|
||||
@ -942,7 +942,7 @@ IMEStateManager::DispatchCompositionEvent(
|
||||
if (NS_WARN_IF(aIsSynthesized)) {
|
||||
return;
|
||||
}
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::DispatchCompositionEvent(), "
|
||||
"adding new TextComposition to the array"));
|
||||
MOZ_ASSERT(aCompositionEvent->message == NS_COMPOSITION_START);
|
||||
@ -978,7 +978,7 @@ IMEStateManager::DispatchCompositionEvent(
|
||||
TextCompositionArray::index_type i =
|
||||
sTextCompositions->IndexOf(aCompositionEvent->widget);
|
||||
if (i != TextCompositionArray::NoIndex) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::DispatchCompositionEvent(), "
|
||||
"removing TextComposition from the array since NS_COMPOSTION_END "
|
||||
"was dispatched"));
|
||||
@ -996,7 +996,7 @@ IMEStateManager::OnCompositionEventDiscarded(
|
||||
// Note that this method is never called for synthesized events for emulating
|
||||
// commit or cancel composition.
|
||||
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnCompositionEventDiscarded(aCompositionEvent={ "
|
||||
"message=%s, mFlags={ mIsTrusted=%s } })",
|
||||
GetEventMessageName(aCompositionEvent->message),
|
||||
@ -1019,7 +1019,7 @@ IMEStateManager::OnCompositionEventDiscarded(
|
||||
// a TextComposition instance for the composition was already removed from
|
||||
// the array and destroyed in OnDestroyPresContext(). Therefore, we may
|
||||
// fail to retrieve a TextComposition instance here.
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::OnCompositionEventDiscarded(), "
|
||||
"TextComposition instance for the widget has already gone"));
|
||||
return;
|
||||
@ -1040,14 +1040,14 @@ IMEStateManager::NotifyIME(IMEMessage aMessage,
|
||||
bool isSynthesizedForTests =
|
||||
composition && composition->IsSynthesizedForTests();
|
||||
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::NotifyIME(aMessage=%s, aWidget=0x%p), "
|
||||
"composition=0x%p, composition->IsSynthesizedForTests()=%s",
|
||||
GetNotifyIMEMessageName(aMessage), aWidget, composition.get(),
|
||||
GetBoolName(isSynthesizedForTests)));
|
||||
|
||||
if (NS_WARN_IF(!aWidget)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::NotifyIME(), FAILED due to no widget"));
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
@ -1075,7 +1075,7 @@ nsresult
|
||||
IMEStateManager::NotifyIME(IMEMessage aMessage,
|
||||
nsPresContext* aPresContext)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::NotifyIME(aMessage=%s, aPresContext=0x%p)",
|
||||
GetNotifyIMEMessageName(aMessage), aPresContext));
|
||||
|
||||
@ -1083,7 +1083,7 @@ IMEStateManager::NotifyIME(IMEMessage aMessage,
|
||||
|
||||
nsIWidget* widget = aPresContext->GetRootWidget();
|
||||
if (NS_WARN_IF(!widget)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::NotifyIME(), FAILED due to no widget for the "
|
||||
"nsPresContext"));
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
@ -1150,18 +1150,18 @@ IMEStateManager::IsIMEObserverNeeded(const IMEState& aState)
|
||||
void
|
||||
IMEStateManager::DestroyIMEContentObserver()
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::DestroyIMEContentObserver(), "
|
||||
"sActiveIMEContentObserver=0x%p",
|
||||
sActiveIMEContentObserver));
|
||||
|
||||
if (!sActiveIMEContentObserver) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::DestroyIMEContentObserver() does nothing"));
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::DestroyIMEContentObserver(), destroying "
|
||||
"the active IMEContentObserver..."));
|
||||
nsRefPtr<IMEContentObserver> tsm;
|
||||
@ -1173,7 +1173,7 @@ IMEStateManager::DestroyIMEContentObserver()
|
||||
void
|
||||
IMEStateManager::CreateIMEContentObserver(nsIEditor* aEditor)
|
||||
{
|
||||
MOZ_LOG(sISMLog, LogLevel::Info,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ALWAYS,
|
||||
("ISM: IMEStateManager::CreateIMEContentObserver(aEditor=0x%p), "
|
||||
"sPresContext=0x%p, sContent=0x%p, sActiveIMEContentObserver=0x%p, "
|
||||
"sActiveIMEContentObserver->IsManaging(sPresContext, sContent)=%s",
|
||||
@ -1182,7 +1182,7 @@ IMEStateManager::CreateIMEContentObserver(nsIEditor* aEditor)
|
||||
sActiveIMEContentObserver->IsManaging(sPresContext, sContent) : false)));
|
||||
|
||||
if (NS_WARN_IF(sActiveIMEContentObserver)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::CreateIMEContentObserver(), FAILED due to "
|
||||
"there is already an active IMEContentObserver"));
|
||||
MOZ_ASSERT(sActiveIMEContentObserver->IsManaging(sPresContext, sContent));
|
||||
@ -1191,7 +1191,7 @@ IMEStateManager::CreateIMEContentObserver(nsIEditor* aEditor)
|
||||
|
||||
nsCOMPtr<nsIWidget> widget = sPresContext->GetRootWidget();
|
||||
if (!widget) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Error,
|
||||
MOZ_LOG(sISMLog, PR_LOG_ERROR,
|
||||
("ISM: IMEStateManager::CreateIMEContentObserver(), FAILED due to "
|
||||
"there is a root widget for the nsPresContext"));
|
||||
return; // Sometimes, there are no widgets.
|
||||
@ -1199,13 +1199,13 @@ IMEStateManager::CreateIMEContentObserver(nsIEditor* aEditor)
|
||||
|
||||
// If it's not text editable, we don't need to create IMEContentObserver.
|
||||
if (!IsIMEObserverNeeded(widget->GetInputContext().mIMEState)) {
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::CreateIMEContentObserver() doesn't create "
|
||||
"IMEContentObserver because of non-editable IME state"));
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_LOG(sISMLog, LogLevel::Debug,
|
||||
MOZ_LOG(sISMLog, PR_LOG_DEBUG,
|
||||
("ISM: IMEStateManager::CreateIMEContentObserver() is creating an "
|
||||
"IMEContentObserver instance..."));
|
||||
sActiveIMEContentObserver = new IMEContentObserver();
|
||||
|
@ -238,7 +238,7 @@ public:
|
||||
// Silently cancel if our load has been cancelled.
|
||||
if (IsCancelled())
|
||||
return NS_OK;
|
||||
LOG_EVENT(LogLevel::Debug, ("%p Dispatching simple event source error", mElement.get()));
|
||||
LOG_EVENT(PR_LOG_DEBUG, ("%p Dispatching simple event source error", mElement.get()));
|
||||
return nsContentUtils::DispatchTrustedEvent(mElement->OwnerDoc(),
|
||||
mSource,
|
||||
NS_LITERAL_STRING("error"),
|
||||
@ -867,7 +867,7 @@ void HTMLMediaElement::SelectResource()
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NewURIFromString(src, getter_AddRefs(uri));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
LOG(LogLevel::Debug, ("%p Trying load from src=%s", this, NS_ConvertUTF16toUTF8(src).get()));
|
||||
LOG(PR_LOG_DEBUG, ("%p Trying load from src=%s", this, NS_ConvertUTF16toUTF8(src).get()));
|
||||
NS_ASSERTION(!mIsLoadingFromSourceChildren,
|
||||
"Should think we're not loading from source children by default");
|
||||
|
||||
@ -900,7 +900,7 @@ void HTMLMediaElement::SelectResource()
|
||||
void HTMLMediaElement::NotifyLoadError()
|
||||
{
|
||||
if (!mIsLoadingFromSourceChildren) {
|
||||
LOG(LogLevel::Debug, ("NotifyLoadError(), no supported media error"));
|
||||
LOG(PR_LOG_DEBUG, ("NotifyLoadError(), no supported media error"));
|
||||
NoSupportedMediaSourceError();
|
||||
} else if (mSourceLoadCandidate) {
|
||||
DispatchAsyncSourceError(mSourceLoadCandidate);
|
||||
@ -995,7 +995,7 @@ void HTMLMediaElement::LoadFromSourceChildren()
|
||||
ReportLoadError("MediaLoadSourceMediaNotMatched", params, ArrayLength(params));
|
||||
continue;
|
||||
}
|
||||
LOG(LogLevel::Debug, ("%p Trying load from <source>=%s type=%s media=%s", this,
|
||||
LOG(PR_LOG_DEBUG, ("%p Trying load from <source>=%s type=%s media=%s", this,
|
||||
NS_ConvertUTF16toUTF8(src).get(), NS_ConvertUTF16toUTF8(type).get(),
|
||||
NS_ConvertUTF16toUTF8(media).get()));
|
||||
|
||||
@ -1453,14 +1453,14 @@ HTMLMediaElement::Seek(double aTime,
|
||||
}
|
||||
|
||||
if (!mPlayed) {
|
||||
LOG(LogLevel::Debug, ("HTMLMediaElement::mPlayed not available."));
|
||||
LOG(PR_LOG_DEBUG, ("HTMLMediaElement::mPlayed not available."));
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurrentPlayRangeStart != -1.0) {
|
||||
double rangeEndTime = CurrentTime();
|
||||
LOG(LogLevel::Debug, ("%p Adding \'played\' a range : [%f, %f]", this, mCurrentPlayRangeStart, rangeEndTime));
|
||||
LOG(PR_LOG_DEBUG, ("%p Adding \'played\' a range : [%f, %f]", this, mCurrentPlayRangeStart, rangeEndTime));
|
||||
// Multiple seek without playing, or seek while playing.
|
||||
if (mCurrentPlayRangeStart != rangeEndTime) {
|
||||
mPlayed->Add(mCurrentPlayRangeStart, rangeEndTime);
|
||||
@ -1471,13 +1471,13 @@ HTMLMediaElement::Seek(double aTime,
|
||||
}
|
||||
|
||||
if (!mDecoder) {
|
||||
LOG(LogLevel::Debug, ("%p SetCurrentTime(%f) failed: no decoder", this, aTime));
|
||||
LOG(PR_LOG_DEBUG, ("%p SetCurrentTime(%f) failed: no decoder", this, aTime));
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mReadyState == nsIDOMHTMLMediaElement::HAVE_NOTHING) {
|
||||
LOG(LogLevel::Debug, ("%p SetCurrentTime(%f) failed: no source", this, aTime));
|
||||
LOG(PR_LOG_DEBUG, ("%p SetCurrentTime(%f) failed: no source", this, aTime));
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
}
|
||||
@ -1554,7 +1554,7 @@ HTMLMediaElement::Seek(double aTime,
|
||||
mPlayingBeforeSeek = IsPotentiallyPlaying();
|
||||
// The media backend is responsible for dispatching the timeupdate
|
||||
// event if it changes the playback position as a result of the seek.
|
||||
LOG(LogLevel::Debug, ("%p SetCurrentTime(%f) starting seek", this, aTime));
|
||||
LOG(PR_LOG_DEBUG, ("%p SetCurrentTime(%f) starting seek", this, aTime));
|
||||
nsresult rv = mDecoder->Seek(aTime, aSeekType);
|
||||
if (NS_FAILED(rv)) {
|
||||
aRv.Throw(rv);
|
||||
@ -1568,7 +1568,7 @@ NS_IMETHODIMP HTMLMediaElement::SetCurrentTime(double aCurrentTime)
|
||||
{
|
||||
// Detect for a NaN and invalid values.
|
||||
if (mozilla::IsNaN(aCurrentTime)) {
|
||||
LOG(LogLevel::Debug, ("%p SetCurrentTime(%f) failed: bad time", this, aCurrentTime));
|
||||
LOG(PR_LOG_DEBUG, ("%p SetCurrentTime(%f) failed: bad time", this, aCurrentTime));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@ -1665,7 +1665,7 @@ void
|
||||
HTMLMediaElement::Pause(ErrorResult& aRv)
|
||||
{
|
||||
if (mNetworkState == nsIDOMHTMLMediaElement::NETWORK_EMPTY) {
|
||||
LOG(LogLevel::Debug, ("Loading due to Pause()"));
|
||||
LOG(PR_LOG_DEBUG, ("Loading due to Pause()"));
|
||||
aRv = Load();
|
||||
if (aRv.Failed()) {
|
||||
return;
|
||||
@ -2561,7 +2561,7 @@ HTMLMediaElement::ReportEMETelemetry()
|
||||
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
|
||||
if (mIsEncrypted && Preferences::GetBool("media.eme.enabled")) {
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_EME_PLAY_SUCCESS, mLoadedDataFired);
|
||||
LOG(LogLevel::Debug, ("%p VIDEO_EME_PLAY_SUCCESS = %s",
|
||||
LOG(PR_LOG_DEBUG, ("%p VIDEO_EME_PLAY_SUCCESS = %s",
|
||||
this, mLoadedDataFired ? "true" : "false"));
|
||||
}
|
||||
}
|
||||
@ -2613,14 +2613,14 @@ HTMLMediaElement::ReportMSETelemetry()
|
||||
}
|
||||
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_MSE_UNLOAD_STATE, state);
|
||||
LOG(LogLevel::Debug, ("%p VIDEO_MSE_UNLOAD_STATE = %d", this, state));
|
||||
LOG(PR_LOG_DEBUG, ("%p VIDEO_MSE_UNLOAD_STATE = %d", this, state));
|
||||
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_MSE_PLAY_TIME_MS, SECONDS_TO_MS(mPlayTime.Total()));
|
||||
LOG(LogLevel::Debug, ("%p VIDEO_MSE_PLAY_TIME_MS = %f", this, mPlayTime.Total()));
|
||||
LOG(PR_LOG_DEBUG, ("%p VIDEO_MSE_PLAY_TIME_MS = %f", this, mPlayTime.Total()));
|
||||
|
||||
double latency = mJoinLatency.Count() ? mJoinLatency.Total() / mJoinLatency.Count() : 0.0;
|
||||
Telemetry::Accumulate(Telemetry::VIDEO_MSE_JOIN_LATENCY_MS, SECONDS_TO_MS(latency));
|
||||
LOG(LogLevel::Debug, ("%p VIDEO_MSE_JOIN_LATENCY = %f (%d ms) count=%d\n",
|
||||
LOG(PR_LOG_DEBUG, ("%p VIDEO_MSE_JOIN_LATENCY = %f (%d ms) count=%d\n",
|
||||
this, latency, SECONDS_TO_MS(latency), mJoinLatency.Count()));
|
||||
}
|
||||
|
||||
@ -2676,7 +2676,7 @@ HTMLMediaElement::CanPlayType(const nsAString& aType, nsAString& aResult)
|
||||
break;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("%p CanPlayType(%s) = \"%s\"", this,
|
||||
LOG(PR_LOG_DEBUG, ("%p CanPlayType(%s) = \"%s\"", this,
|
||||
NS_ConvertUTF16toUTF8(aType).get(),
|
||||
NS_ConvertUTF16toUTF8(aResult).get()));
|
||||
|
||||
@ -2695,10 +2695,10 @@ nsresult HTMLMediaElement::InitializeDecoderAsClone(MediaDecoder* aOriginal)
|
||||
if (!decoder)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
LOG(LogLevel::Debug, ("%p Cloned decoder %p from %p", this, decoder.get(), aOriginal));
|
||||
LOG(PR_LOG_DEBUG, ("%p Cloned decoder %p from %p", this, decoder.get(), aOriginal));
|
||||
|
||||
if (!decoder->Init(this)) {
|
||||
LOG(LogLevel::Debug, ("%p Failed to init cloned decoder %p", this, decoder.get()));
|
||||
LOG(PR_LOG_DEBUG, ("%p Failed to init cloned decoder %p", this, decoder.get()));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@ -2710,7 +2710,7 @@ nsresult HTMLMediaElement::InitializeDecoderAsClone(MediaDecoder* aOriginal)
|
||||
|
||||
nsRefPtr<MediaResource> resource = originalResource->CloneData(decoder);
|
||||
if (!resource) {
|
||||
LOG(LogLevel::Debug, ("%p Failed to cloned stream for decoder %p", this, decoder.get()));
|
||||
LOG(PR_LOG_DEBUG, ("%p Failed to cloned stream for decoder %p", this, decoder.get()));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@ -2738,7 +2738,7 @@ nsresult HTMLMediaElement::InitializeDecoderForChannel(nsIChannel* aChannel,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("%p Created decoder %p for type %s", this, decoder.get(), mimeType.get()));
|
||||
LOG(PR_LOG_DEBUG, ("%p Created decoder %p for type %s", this, decoder.get(), mimeType.get()));
|
||||
|
||||
nsRefPtr<MediaResource> resource = MediaResource::Create(decoder, aChannel);
|
||||
if (!resource)
|
||||
@ -2798,7 +2798,7 @@ nsresult HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder,
|
||||
nsresult rv = aDecoder->Load(aListener, aCloneDonor);
|
||||
if (NS_FAILED(rv)) {
|
||||
SetDecoder(nullptr);
|
||||
LOG(LogLevel::Debug, ("%p Failed to load for decoder %p", this, aDecoder));
|
||||
LOG(PR_LOG_DEBUG, ("%p Failed to load for decoder %p", this, aDecoder));
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -3318,7 +3318,7 @@ void HTMLMediaElement::PlaybackEnded()
|
||||
}
|
||||
|
||||
if (mSrcStream || (mDecoder && mDecoder->IsInfinite())) {
|
||||
LOG(LogLevel::Debug, ("%p, got duration by reaching the end of the resource", this));
|
||||
LOG(PR_LOG_DEBUG, ("%p, got duration by reaching the end of the resource", this));
|
||||
DispatchAsyncEvent(NS_LITERAL_STRING("durationchange"));
|
||||
}
|
||||
|
||||
@ -3609,7 +3609,7 @@ void HTMLMediaElement::ChangeReadyState(nsMediaReadyState aState)
|
||||
return;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("%p Ready state changed to %s", this, gReadyStateToString[aState]));
|
||||
LOG(PR_LOG_DEBUG, ("%p Ready state changed to %s", this, gReadyStateToString[aState]));
|
||||
|
||||
UpdateAudioChannelPlayingState();
|
||||
|
||||
@ -3664,7 +3664,7 @@ void HTMLMediaElement::ChangeNetworkState(nsMediaNetworkState aState)
|
||||
|
||||
nsMediaNetworkState oldState = mNetworkState;
|
||||
mNetworkState = aState;
|
||||
LOG(LogLevel::Debug, ("%p Network state changed to %s", this, gNetworkStateToString[aState]));
|
||||
LOG(PR_LOG_DEBUG, ("%p Network state changed to %s", this, gNetworkStateToString[aState]));
|
||||
|
||||
// TODO: |mBegun| reflects the download status. We should be able to remove
|
||||
// it and check |mNetworkState| only.
|
||||
@ -3759,7 +3759,7 @@ VideoFrameContainer* HTMLMediaElement::GetVideoFrameContainer()
|
||||
|
||||
nsresult HTMLMediaElement::DispatchEvent(const nsAString& aName)
|
||||
{
|
||||
LOG_EVENT(LogLevel::Debug, ("%p Dispatching event %s", this,
|
||||
LOG_EVENT(PR_LOG_DEBUG, ("%p Dispatching event %s", this,
|
||||
NS_ConvertUTF16toUTF8(aName).get()));
|
||||
|
||||
// Save events that occur while in the bfcache. These will be dispatched
|
||||
@ -3778,7 +3778,7 @@ nsresult HTMLMediaElement::DispatchEvent(const nsAString& aName)
|
||||
|
||||
nsresult HTMLMediaElement::DispatchAsyncEvent(const nsAString& aName)
|
||||
{
|
||||
LOG_EVENT(LogLevel::Debug, ("%p Queuing event %s", this,
|
||||
LOG_EVENT(PR_LOG_DEBUG, ("%p Queuing event %s", this,
|
||||
NS_ConvertUTF16toUTF8(aName).get()));
|
||||
|
||||
// Save events that occur while in the bfcache. These will be dispatched
|
||||
@ -4040,7 +4040,7 @@ HTMLMediaElement::IsNodeOfType(uint32_t aFlags) const
|
||||
|
||||
void HTMLMediaElement::DispatchAsyncSourceError(nsIContent* aSourceElement)
|
||||
{
|
||||
LOG_EVENT(LogLevel::Debug, ("%p Queuing simple source error event", this));
|
||||
LOG_EVENT(PR_LOG_DEBUG, ("%p Queuing simple source error event", this));
|
||||
|
||||
nsCOMPtr<nsIRunnable> event = new nsSourceErrorEventRunner(this, aSourceElement);
|
||||
NS_DispatchToMainThread(event);
|
||||
@ -4125,7 +4125,7 @@ void HTMLMediaElement::ChangeDelayLoadStatus(bool aDelay)
|
||||
|
||||
mDelayingLoadEvent = aDelay;
|
||||
|
||||
LOG(LogLevel::Debug, ("%p ChangeDelayLoadStatus(%d) doc=0x%p", this, aDelay, mLoadBlockedDoc.get()));
|
||||
LOG(PR_LOG_DEBUG, ("%p ChangeDelayLoadStatus(%d) doc=0x%p", this, aDelay, mLoadBlockedDoc.get()));
|
||||
if (mDecoder) {
|
||||
mDecoder->SetLoadInBackground(!aDelay);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ HTMLTrackElement::LoadResource()
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NewURIFromString(src, getter_AddRefs(uri));
|
||||
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
|
||||
LOG(LogLevel::Info, ("%p Trying to load from src=%s", this,
|
||||
LOG(PR_LOG_ALWAYS, ("%p Trying to load from src=%s", this,
|
||||
NS_ConvertUTF16toUTF8(src).get()));
|
||||
|
||||
if (mChannel) {
|
||||
@ -246,7 +246,7 @@ HTMLTrackElement::LoadResource()
|
||||
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
|
||||
channel->SetNotificationCallbacks(mListener);
|
||||
|
||||
LOG(LogLevel::Debug, ("opening webvtt channel"));
|
||||
LOG(PR_LOG_DEBUG, ("opening webvtt channel"));
|
||||
rv = channel->AsyncOpen(mListener, nullptr);
|
||||
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
|
||||
|
||||
@ -269,7 +269,7 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("Track Element bound to tree."));
|
||||
LOG(PR_LOG_DEBUG, ("Track Element bound to tree."));
|
||||
if (!aParent || !aParent->IsNodeOfType(nsINode::eMEDIA)) {
|
||||
return NS_OK;
|
||||
}
|
||||
@ -281,7 +281,7 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
|
||||
HTMLMediaElement* media = static_cast<HTMLMediaElement*>(aParent);
|
||||
// TODO: separate notification for 'alternate' tracks?
|
||||
media->NotifyAddedSource();
|
||||
LOG(LogLevel::Debug, ("Track element sent notification to parent."));
|
||||
LOG(PR_LOG_DEBUG, ("Track element sent notification to parent."));
|
||||
|
||||
mMediaParent->RunInStableState(
|
||||
NS_NewRunnableMethod(this, &HTMLTrackElement::LoadResource));
|
||||
|
@ -107,7 +107,7 @@
|
||||
|
||||
#define IDB_DEBUG_LOG(_args) \
|
||||
MOZ_LOG(IndexedDatabaseManager::GetLoggingModule(), \
|
||||
LogLevel::Debug, \
|
||||
PR_LOG_DEBUG, \
|
||||
_args )
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
|
||||
|
@ -282,9 +282,9 @@ LoggingHelper(bool aUseProfiler, const char* aFmt, ...)
|
||||
PRLogModuleInfo* logModule = IndexedDatabaseManager::GetLoggingModule();
|
||||
MOZ_ASSERT(logModule);
|
||||
|
||||
static const mozilla::LogLevel logLevel = LogLevel::Warning;
|
||||
static const PRLogModuleLevel logLevel = PR_LOG_WARNING;
|
||||
|
||||
if (MOZ_LOG_TEST(logModule, logLevel) ||
|
||||
if (PR_LOG_TEST(logModule, logLevel) ||
|
||||
(aUseProfiler && profiler_is_active())) {
|
||||
nsAutoCString message;
|
||||
|
||||
|
@ -77,10 +77,10 @@
|
||||
return sLog;
|
||||
}
|
||||
# define LOG(fmt, ...) \
|
||||
MOZ_LOG(GetPPMLog(), LogLevel::Debug, \
|
||||
MOZ_LOG(GetPPMLog(), PR_LOG_DEBUG, \
|
||||
("ProcessPriorityManager - " fmt, ##__VA_ARGS__))
|
||||
# define LOGP(fmt, ...) \
|
||||
MOZ_LOG(GetPPMLog(), LogLevel::Debug, \
|
||||
MOZ_LOG(GetPPMLog(), PR_LOG_DEBUG, \
|
||||
("ProcessPriorityManager[%schild-id=%" PRIu64 ", pid=%d] - " fmt, \
|
||||
NameWithComma().get(), \
|
||||
static_cast<uint64_t>(ChildID()), Pid(), ##__VA_ARGS__))
|
||||
|
@ -12,9 +12,9 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define SINK_LOG(msg, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
|
||||
MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
|
||||
#define SINK_LOG_V(msg, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Verbose, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
|
||||
MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG+1, ("AudioSink=%p " msg, this, ##__VA_ARGS__))
|
||||
|
||||
AudioSink::OnAudioEndTimeUpdateTask::OnAudioEndTimeUpdateTask(
|
||||
MediaDecoderStateMachine* aStateMachine)
|
||||
|
@ -31,7 +31,7 @@ namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* gAudioStreamLog = nullptr;
|
||||
// For simple logs
|
||||
#define LOG(x) MOZ_LOG(gAudioStreamLog, mozilla::LogLevel::Debug, x)
|
||||
#define LOG(x) MOZ_LOG(gAudioStreamLog, PR_LOG_DEBUG, x)
|
||||
|
||||
/**
|
||||
* When MOZ_DUMP_AUDIO is set in the environment (to anything),
|
||||
@ -330,7 +330,7 @@ AudioStream::Init(int32_t aNumChannels, int32_t aRate,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Debug,
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_DEBUG,
|
||||
("%s channels: %d, rate: %d for %p", __FUNCTION__, aNumChannels, aRate, this));
|
||||
mInRate = mOutRate = aRate;
|
||||
mChannels = aNumChannels;
|
||||
@ -547,12 +547,12 @@ AudioStream::CheckForStart()
|
||||
if (mLatencyRequest == LowLatency || mNeedsStart) {
|
||||
StartUnlocked(); // mState = STARTED or ERRORED
|
||||
mNeedsStart = false;
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning,
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
|
||||
("Started waiting %s-latency stream",
|
||||
mLatencyRequest == LowLatency ? "low" : "high"));
|
||||
} else {
|
||||
// high latency, not full - OR Pause() was called before we got here
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Debug,
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_DEBUG,
|
||||
("Not starting waiting %s-latency stream",
|
||||
mLatencyRequest == LowLatency ? "low" : "high"));
|
||||
}
|
||||
@ -612,7 +612,7 @@ AudioStream::Write(const AudioDataValue* aBuf, uint32_t aFrames, TimeStamp *aTim
|
||||
uint32_t bytesToCopy = FramesToBytes(aFrames);
|
||||
|
||||
// XXX this will need to change if we want to enable this on-the-fly!
|
||||
if (MOZ_LOG_TEST(GetLatencyLog(), LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
|
||||
// Record the position and time this data was inserted
|
||||
int64_t timeMs;
|
||||
if (aTime && !aTime->IsNull()) {
|
||||
@ -645,7 +645,7 @@ AudioStream::Write(const AudioDataValue* aBuf, uint32_t aFrames, TimeStamp *aTim
|
||||
remains = mBuffer.Length() - bytesToCopy; // Free up just enough space
|
||||
}
|
||||
// account for dropping samples
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning, ("Stream %p dropping %u bytes (%u frames)in Write()",
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Stream %p dropping %u bytes (%u frames)in Write()",
|
||||
this, mBuffer.Length() - remains, BytesToFrames(mBuffer.Length() - remains)));
|
||||
mReadPoint += BytesToFrames(mBuffer.Length() - remains);
|
||||
mBuffer.ContractTo(remains);
|
||||
@ -653,14 +653,14 @@ AudioStream::Write(const AudioDataValue* aBuf, uint32_t aFrames, TimeStamp *aTim
|
||||
// If we are not playing, but our buffer is full, start playing to make
|
||||
// room for soon-to-be-decoded data.
|
||||
if (mState != STARTED && mState != RUNNING) {
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning, ("Starting stream %p in Write (%u waiting)",
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Starting stream %p in Write (%u waiting)",
|
||||
this, bytesToCopy));
|
||||
StartUnlocked();
|
||||
if (mState == ERRORED) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning, ("Stream %p waiting in Write() (%u waiting)",
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING, ("Stream %p waiting in Write() (%u waiting)",
|
||||
this, bytesToCopy));
|
||||
mon.Wait();
|
||||
}
|
||||
@ -1073,16 +1073,16 @@ AudioStream::DataCallback(void* aBuffer, long aFrames)
|
||||
TimeStamp now = TimeStamp::Now();
|
||||
if (!mStartTime.IsNull()) {
|
||||
int64_t timeMs = (now - mStartTime).ToMilliseconds();
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning,
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
|
||||
("Stream took %lldms to start after first Write() @ %u", timeMs, mOutRate));
|
||||
} else {
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning,
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
|
||||
("Stream started before Write() @ %u", mOutRate));
|
||||
}
|
||||
|
||||
if (old_len != available) {
|
||||
// Note that we may have dropped samples in Write() as well!
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning,
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
|
||||
("AudioStream %p dropped %u + %u initial frames @ %u", this,
|
||||
mReadPoint, BytesToFrames(old_len - available), mOutRate));
|
||||
mReadPoint += BytesToFrames(old_len - available);
|
||||
@ -1123,7 +1123,7 @@ AudioStream::DataCallback(void* aBuffer, long aFrames)
|
||||
uint8_t* rpos = static_cast<uint8_t*>(aBuffer) + FramesToBytes(aFrames - underrunFrames);
|
||||
memset(rpos, 0, FramesToBytes(underrunFrames));
|
||||
if (underrunFrames) {
|
||||
MOZ_LOG(gAudioStreamLog, LogLevel::Warning,
|
||||
MOZ_LOG(gAudioStreamLog, PR_LOG_WARNING,
|
||||
("AudioStream %p lost %d frames", this, underrunFrames));
|
||||
}
|
||||
servicedFrames += underrunFrames;
|
||||
@ -1133,7 +1133,7 @@ AudioStream::DataCallback(void* aBuffer, long aFrames)
|
||||
|
||||
WriteDumpFile(mDumpFile, this, aFrames, aBuffer);
|
||||
// Don't log if we're not interested or if the stream is inactive
|
||||
if (MOZ_LOG_TEST(GetLatencyLog(), LogLevel::Debug) &&
|
||||
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG) &&
|
||||
mState != SHUTDOWN &&
|
||||
insertTime != INT64_MAX && servicedFrames > underrunFrames) {
|
||||
uint32_t latency = UINT32_MAX;
|
||||
|
@ -69,7 +69,7 @@ void GraphDriver::SetGraphTime(GraphDriver* aPreviousDriver,
|
||||
mStateComputedTime = aLastSwitchStateComputedTime;
|
||||
mNextStateComputedTime = aLastSwitchNextStateComputedTime;
|
||||
|
||||
STREAM_LOG(LogLevel::Debug, ("Setting previous driver: %p (%s)", aPreviousDriver, aPreviousDriver->AsAudioCallbackDriver() ? "AudioCallbackDriver" : "SystemClockDriver"));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Setting previous driver: %p (%s)", aPreviousDriver, aPreviousDriver->AsAudioCallbackDriver() ? "AudioCallbackDriver" : "SystemClockDriver"));
|
||||
MOZ_ASSERT(!mPreviousDriver);
|
||||
mPreviousDriver = aPreviousDriver;
|
||||
}
|
||||
@ -182,7 +182,7 @@ public:
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
char aLocal;
|
||||
STREAM_LOG(LogLevel::Debug, ("Starting system thread"));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Starting system thread"));
|
||||
profiler_register_thread("MediaStreamGraph", &aLocal);
|
||||
LIFECYCLE_LOG("Starting a new system driver for graph %p\n",
|
||||
mDriver->mGraphImpl);
|
||||
@ -236,7 +236,7 @@ ThreadedDriver::Revive()
|
||||
{
|
||||
// Note: only called on MainThread, without monitor
|
||||
// We know were weren't in a running state
|
||||
STREAM_LOG(LogLevel::Debug, ("AudioCallbackDriver reviving."));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("AudioCallbackDriver reviving."));
|
||||
// If we were switching, switch now. Otherwise, tell thread to run the main
|
||||
// loop again.
|
||||
MonitorAutoLock mon(mGraphImpl->GetMonitor());
|
||||
@ -256,7 +256,7 @@ ThreadedDriver::Stop()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Must be called on main thread");
|
||||
// mGraph's thread is not running so it's OK to do whatever here
|
||||
STREAM_LOG(LogLevel::Debug, ("Stopping threads for MediaStreamGraph %p", this));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Stopping threads for MediaStreamGraph %p", this));
|
||||
|
||||
if (mThread) {
|
||||
mThread->Shutdown();
|
||||
@ -287,7 +287,7 @@ ThreadedDriver::RunThread()
|
||||
mNextStateComputedTime =
|
||||
mGraphImpl->RoundUpToNextAudioBlock(
|
||||
nextCurrentTime + mGraphImpl->MillisecondsToMediaTime(AUDIO_TARGET_MS));
|
||||
STREAM_LOG(LogLevel::Debug,
|
||||
STREAM_LOG(PR_LOG_DEBUG,
|
||||
("interval[%ld; %ld] state[%ld; %ld]",
|
||||
(long)mIterationStart, (long)mIterationEnd,
|
||||
(long)mStateComputedTime, (long)mNextStateComputedTime));
|
||||
@ -300,7 +300,7 @@ ThreadedDriver::RunThread()
|
||||
mNextStateComputedTime);
|
||||
|
||||
if (mNextDriver && stillProcessing) {
|
||||
STREAM_LOG(LogLevel::Debug, ("Switching to AudioCallbackDriver"));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Switching to AudioCallbackDriver"));
|
||||
mNextDriver->SetGraphTime(this, mIterationStart, mIterationEnd,
|
||||
mStateComputedTime, mNextStateComputedTime);
|
||||
mGraphImpl->SetCurrentDriver(mNextDriver);
|
||||
@ -319,20 +319,20 @@ SystemClockDriver::GetIntervalForIteration(GraphTime& aFrom, GraphTime& aTo)
|
||||
|
||||
mCurrentTimeStamp = now;
|
||||
|
||||
MOZ_LOG(gMediaStreamGraphLog, LogLevel::Verbose, ("Updating current time to %f (real %f, mStateComputedTime %f)",
|
||||
MOZ_LOG(gMediaStreamGraphLog, PR_LOG_DEBUG+1, ("Updating current time to %f (real %f, mStateComputedTime %f)",
|
||||
mGraphImpl->MediaTimeToSeconds(aTo),
|
||||
(now - mInitialTimeStamp).ToSeconds(),
|
||||
mGraphImpl->MediaTimeToSeconds(StateComputedTime())));
|
||||
|
||||
if (mStateComputedTime < aTo) {
|
||||
STREAM_LOG(LogLevel::Warning, ("Media graph global underrun detected"));
|
||||
STREAM_LOG(PR_LOG_WARNING, ("Media graph global underrun detected"));
|
||||
aTo = mIterationEnd = mStateComputedTime;
|
||||
}
|
||||
|
||||
if (aFrom >= aTo) {
|
||||
NS_ASSERTION(aFrom == aTo , "Time can't go backwards!");
|
||||
// This could happen due to low clock resolution, maybe?
|
||||
STREAM_LOG(LogLevel::Debug, ("Time did not advance"));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Time did not advance"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -363,7 +363,7 @@ SystemClockDriver::WaitForNextIteration()
|
||||
// least once a minute, if we need to wake up at all
|
||||
timeoutMS = std::max<int64_t>(0, std::min<int64_t>(timeoutMS, 60*1000));
|
||||
timeout = PR_MillisecondsToInterval(uint32_t(timeoutMS));
|
||||
STREAM_LOG(LogLevel::Verbose, ("Waiting for next iteration; at %f, timeout=%f", (now - mInitialTimeStamp).ToSeconds(), timeoutMS/1000.0));
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("Waiting for next iteration; at %f, timeout=%f", (now - mInitialTimeStamp).ToSeconds(), timeoutMS/1000.0));
|
||||
if (mWaitState == WAITSTATE_WAITING_INDEFINITELY) {
|
||||
mGraphImpl->mGraphDriverAsleep = false; // atomic
|
||||
}
|
||||
@ -374,7 +374,7 @@ SystemClockDriver::WaitForNextIteration()
|
||||
}
|
||||
if (timeout > 0) {
|
||||
mGraphImpl->GetMonitor().Wait(timeout);
|
||||
STREAM_LOG(LogLevel::Verbose, ("Resuming after timeout; at %f, elapsed=%f",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("Resuming after timeout; at %f, elapsed=%f",
|
||||
(TimeStamp::Now() - mInitialTimeStamp).ToSeconds(),
|
||||
(TimeStamp::Now() - now).ToSeconds()));
|
||||
}
|
||||
@ -439,14 +439,14 @@ OfflineClockDriver::GetIntervalForIteration(GraphTime& aFrom, GraphTime& aTo)
|
||||
aTo = mIterationEnd = IterationEnd() + mGraphImpl->MillisecondsToMediaTime(mSlice);
|
||||
|
||||
if (mStateComputedTime < aTo) {
|
||||
STREAM_LOG(LogLevel::Warning, ("Media graph global underrun detected"));
|
||||
STREAM_LOG(PR_LOG_WARNING, ("Media graph global underrun detected"));
|
||||
aTo = mIterationEnd = mStateComputedTime;
|
||||
}
|
||||
|
||||
if (aFrom >= aTo) {
|
||||
NS_ASSERTION(aFrom == aTo , "Time can't go backwards!");
|
||||
// This could happen due to low clock resolution, maybe?
|
||||
STREAM_LOG(LogLevel::Debug, ("Time did not advance"));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Time did not advance"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -545,7 +545,7 @@ AudioCallbackDriver::AudioCallbackDriver(MediaStreamGraphImpl* aGraphImpl, dom::
|
||||
, mCallbackReceivedWhileSwitching(0)
|
||||
#endif
|
||||
{
|
||||
STREAM_LOG(LogLevel::Debug, ("AudioCallbackDriver ctor for graph %p", aGraphImpl));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("AudioCallbackDriver ctor for graph %p", aGraphImpl));
|
||||
}
|
||||
|
||||
AudioCallbackDriver::~AudioCallbackDriver()
|
||||
@ -613,21 +613,21 @@ AudioCallbackDriver::Init()
|
||||
|
||||
StartStream();
|
||||
|
||||
STREAM_LOG(LogLevel::Debug, ("AudioCallbackDriver started."));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("AudioCallbackDriver started."));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioCallbackDriver::Destroy()
|
||||
{
|
||||
STREAM_LOG(LogLevel::Debug, ("AudioCallbackDriver destroyed."));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("AudioCallbackDriver destroyed."));
|
||||
mAudioStream.reset();
|
||||
}
|
||||
|
||||
void
|
||||
AudioCallbackDriver::Resume()
|
||||
{
|
||||
STREAM_LOG(LogLevel::Debug, ("Resuming audio threads for MediaStreamGraph %p", mGraphImpl));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Resuming audio threads for MediaStreamGraph %p", mGraphImpl));
|
||||
if (cubeb_stream_start(mAudioStream) != CUBEB_OK) {
|
||||
NS_WARNING("Could not start cubeb stream for MSG.");
|
||||
}
|
||||
@ -639,12 +639,12 @@ AudioCallbackDriver::Start()
|
||||
// If this is running on the main thread, we can't open the stream directly,
|
||||
// because it is a blocking operation.
|
||||
if (NS_IsMainThread()) {
|
||||
STREAM_LOG(LogLevel::Debug, ("Starting audio threads for MediaStreamGraph %p from a new thread.", mGraphImpl));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Starting audio threads for MediaStreamGraph %p from a new thread.", mGraphImpl));
|
||||
nsRefPtr<AsyncCubebTask> initEvent =
|
||||
new AsyncCubebTask(this, AsyncCubebOperation::INIT);
|
||||
initEvent->Dispatch();
|
||||
} else {
|
||||
STREAM_LOG(LogLevel::Debug, ("Starting audio threads for MediaStreamGraph %p from the previous driver's thread", mGraphImpl));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Starting audio threads for MediaStreamGraph %p from the previous driver's thread", mGraphImpl));
|
||||
Init();
|
||||
|
||||
// Check if we need to resolve promises because the driver just got switched
|
||||
@ -689,7 +689,7 @@ AudioCallbackDriver::Revive()
|
||||
{
|
||||
// Note: only called on MainThread, without monitor
|
||||
// We know were weren't in a running state
|
||||
STREAM_LOG(LogLevel::Debug, ("AudioCallbackDriver reviving."));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("AudioCallbackDriver reviving."));
|
||||
// If we were switching, switch now. Otherwise, start the audio thread again.
|
||||
MonitorAutoLock mon(mGraphImpl->GetMonitor());
|
||||
if (mNextDriver) {
|
||||
@ -698,7 +698,7 @@ AudioCallbackDriver::Revive()
|
||||
mGraphImpl->SetCurrentDriver(mNextDriver);
|
||||
mNextDriver->Start();
|
||||
} else {
|
||||
STREAM_LOG(LogLevel::Debug, ("Starting audio threads for MediaStreamGraph %p from a new thread.", mGraphImpl));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Starting audio threads for MediaStreamGraph %p from a new thread.", mGraphImpl));
|
||||
nsRefPtr<AsyncCubebTask> initEvent =
|
||||
new AsyncCubebTask(this, AsyncCubebOperation::INIT);
|
||||
initEvent->Dispatch();
|
||||
@ -782,9 +782,9 @@ AudioCallbackDriver::OSXDeviceSwitchingWorkaround()
|
||||
// callback is called "some" number of times, and then stops being called,
|
||||
// and then gets called again. 10 is to be safe, it's a low-enough number
|
||||
// of milliseconds anyways (< 100ms)
|
||||
//STREAM_LOG(LogLevel::Debug, ("Callbacks during switch: %d", mCallbackReceivedWhileSwitching+1));
|
||||
//STREAM_LOG(PR_LOG_DEBUG, ("Callbacks during switch: %d", mCallbackReceivedWhileSwitching+1));
|
||||
if (mCallbackReceivedWhileSwitching++ >= 10) {
|
||||
STREAM_LOG(LogLevel::Debug, ("Got %d callbacks, switching back to CallbackDriver", mCallbackReceivedWhileSwitching));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Got %d callbacks, switching back to CallbackDriver", mCallbackReceivedWhileSwitching));
|
||||
// If we have a self reference, we have fallen back temporarily on a
|
||||
// system clock driver, but we just got called back, that means the osx
|
||||
// audio backend has switched to the new device.
|
||||
@ -883,7 +883,7 @@ AudioCallbackDriver::DataCallback(AudioDataValue* aBuffer, long aFrames)
|
||||
// reclock the current time against the state time, here.
|
||||
mIterationEnd = mIterationStart + 0.8 * inGraph;
|
||||
|
||||
STREAM_LOG(LogLevel::Debug, ("interval[%ld; %ld] state[%ld; %ld] (frames: %ld) (durationMS: %u) (duration ticks: %ld)\n",
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("interval[%ld; %ld] state[%ld; %ld] (frames: %ld) (durationMS: %u) (duration ticks: %ld)\n",
|
||||
(long)mIterationStart, (long)mIterationEnd,
|
||||
(long)mStateComputedTime, (long)mNextStateComputedTime,
|
||||
(long)aFrames, (uint32_t)durationMS,
|
||||
@ -892,7 +892,7 @@ AudioCallbackDriver::DataCallback(AudioDataValue* aBuffer, long aFrames)
|
||||
mCurrentTimeStamp = TimeStamp::Now();
|
||||
|
||||
if (mStateComputedTime < mIterationEnd) {
|
||||
STREAM_LOG(LogLevel::Warning, ("Media graph global underrun detected"));
|
||||
STREAM_LOG(PR_LOG_WARNING, ("Media graph global underrun detected"));
|
||||
mIterationEnd = mStateComputedTime;
|
||||
}
|
||||
|
||||
@ -916,7 +916,7 @@ AudioCallbackDriver::DataCallback(AudioDataValue* aBuffer, long aFrames)
|
||||
return aFrames;
|
||||
}
|
||||
}
|
||||
STREAM_LOG(LogLevel::Debug, ("Switching to system driver."));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Switching to system driver."));
|
||||
mNextDriver->SetGraphTime(this, mIterationStart, mIterationEnd,
|
||||
mStateComputedTime, mNextStateComputedTime);
|
||||
mGraphImpl->SetCurrentDriver(mNextDriver);
|
||||
@ -936,7 +936,7 @@ AudioCallbackDriver::DataCallback(AudioDataValue* aBuffer, long aFrames)
|
||||
void
|
||||
AudioCallbackDriver::StateCallback(cubeb_state aState)
|
||||
{
|
||||
STREAM_LOG(LogLevel::Debug, ("AudioCallbackDriver State: %d", aState));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("AudioCallbackDriver State: %d", aState));
|
||||
}
|
||||
|
||||
void
|
||||
@ -1020,7 +1020,7 @@ AudioCallbackDriver::DeviceChangedCallback() {
|
||||
if (mSelfReference) {
|
||||
return;
|
||||
}
|
||||
STREAM_LOG(LogLevel::Error, ("Switching to SystemClockDriver during output switch"));
|
||||
STREAM_LOG(PR_LOG_ERROR, ("Switching to SystemClockDriver during output switch"));
|
||||
mSelfReference.Take(this);
|
||||
mCallbackReceivedWhileSwitching = 0;
|
||||
mGraphImpl->mFlushSourcesOnNextIteration = true;
|
||||
|
@ -191,11 +191,11 @@ void AsyncLatencyLogger::WriteLog(LatencyLogIndex aIndex, uint64_t aID, int64_t
|
||||
TimeStamp aTimeStamp)
|
||||
{
|
||||
if (aTimeStamp.IsNull()) {
|
||||
MOZ_LOG(GetLatencyLog(), LogLevel::Debug,
|
||||
MOZ_LOG(GetLatencyLog(), PR_LOG_DEBUG,
|
||||
("Latency: %s,%llu,%lld,%lld",
|
||||
LatencyLogIndex2Strings[aIndex], aID, GetTimeStamp(), aValue));
|
||||
} else {
|
||||
MOZ_LOG(GetLatencyLog(), LogLevel::Debug,
|
||||
MOZ_LOG(GetLatencyLog(), PR_LOG_DEBUG,
|
||||
("Latency: %s,%llu,%lld,%lld,%lld",
|
||||
LatencyLogIndex2Strings[aIndex], aID, GetTimeStamp(), aValue,
|
||||
static_cast<int64_t>((aTimeStamp - gAsyncLogger->mStart).ToMilliseconds())));
|
||||
@ -216,7 +216,7 @@ void AsyncLatencyLogger::Log(LatencyLogIndex aIndex, uint64_t aID, int64_t aValu
|
||||
|
||||
void AsyncLatencyLogger::Log(LatencyLogIndex aIndex, uint64_t aID, int64_t aValue, TimeStamp &aTime)
|
||||
{
|
||||
if (MOZ_LOG_TEST(GetLatencyLog(), LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(GetLatencyLog(), PR_LOG_DEBUG)) {
|
||||
nsCOMPtr<nsIRunnable> event = new LogEvent(aIndex, aID, aValue, aTime);
|
||||
if (mThread) {
|
||||
mThread->Dispatch(event, NS_DISPATCH_NORMAL);
|
||||
|
@ -955,7 +955,7 @@ MediaCache::FreeBlock(int32_t aBlock)
|
||||
return;
|
||||
}
|
||||
|
||||
CACHE_LOG(LogLevel::Debug, ("Released block %d", aBlock));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Released block %d", aBlock));
|
||||
|
||||
for (uint32_t i = 0; i < block->mOwners.Length(); ++i) {
|
||||
BlockOwner* bo = &block->mOwners[i];
|
||||
@ -1121,17 +1121,17 @@ MediaCache::Update()
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// We successfully copied the file data.
|
||||
CACHE_LOG(LogLevel::Debug, ("Swapping blocks %d and %d (trimming cache)",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Swapping blocks %d and %d (trimming cache)",
|
||||
blockIndex, destinationBlockIndex));
|
||||
// Swapping the block metadata here lets us maintain the
|
||||
// correct positions in the linked lists
|
||||
SwapBlocks(blockIndex, destinationBlockIndex);
|
||||
//Free the overflowing block even if the copy failed.
|
||||
CACHE_LOG(LogLevel::Debug, ("Released block %d (trimming cache)", blockIndex));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Released block %d (trimming cache)", blockIndex));
|
||||
FreeBlock(blockIndex);
|
||||
}
|
||||
} else {
|
||||
CACHE_LOG(LogLevel::Debug, ("Could not trim cache block %d (destination %d, predicted next use %f, latest predicted use for overflow %f",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Could not trim cache block %d (destination %d, predicted next use %f, latest predicted use for overflow %f",
|
||||
blockIndex, destinationBlockIndex,
|
||||
PredictNextUse(now, destinationBlockIndex).ToSeconds(),
|
||||
latestPredictedUseForOverflow.ToSeconds()));
|
||||
@ -1169,7 +1169,7 @@ MediaCache::Update()
|
||||
|
||||
MediaCacheStream* stream = mStreams[i];
|
||||
if (stream->mClosed) {
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p closed", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p closed", stream));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1220,29 +1220,29 @@ MediaCache::Update()
|
||||
// advertised with Content-Length, and we may as well keep reading.
|
||||
// But we don't want to seek to the end of the stream if we're not
|
||||
// already there.
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p at end of stream", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p at end of stream", stream));
|
||||
enableReading = !stream->mCacheSuspended &&
|
||||
stream->mStreamLength == stream->mChannelOffset;
|
||||
} else if (desiredOffset < stream->mStreamOffset) {
|
||||
// We're reading to try to catch up to where the current stream
|
||||
// reader wants to be. Better not stop.
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p catching up", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p catching up", stream));
|
||||
enableReading = true;
|
||||
} else if (desiredOffset < stream->mStreamOffset + BLOCK_SIZE) {
|
||||
// The stream reader is waiting for us, or nearly so. Better feed it.
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p feeding reader", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p feeding reader", stream));
|
||||
enableReading = true;
|
||||
} else if (!stream->mIsTransportSeekable &&
|
||||
nonSeekableReadaheadBlockCount >= maxBlocks*NONSEEKABLE_READAHEAD_MAX) {
|
||||
// This stream is not seekable and there are already too many blocks
|
||||
// being cached for readahead for nonseekable streams (which we can't
|
||||
// free). So stop reading ahead now.
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p throttling non-seekable readahead", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p throttling non-seekable readahead", stream));
|
||||
enableReading = false;
|
||||
} else if (mIndex.Length() > uint32_t(maxBlocks)) {
|
||||
// We're in the process of bringing the cache size back to the
|
||||
// desired limit, so don't bring in more data yet
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p throttling to reduce cache size", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p throttling to reduce cache size", stream));
|
||||
enableReading = false;
|
||||
} else {
|
||||
TimeDuration predictedNewDataUse = PredictNextUseForIncomingData(stream);
|
||||
@ -1250,24 +1250,24 @@ MediaCache::Update()
|
||||
if (stream->mCacheSuspended &&
|
||||
predictedNewDataUse.ToSeconds() > resumeThreshold) {
|
||||
// Don't need data for a while, so don't bother waking up the stream
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p avoiding wakeup since more data is not needed", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p avoiding wakeup since more data is not needed", stream));
|
||||
enableReading = false;
|
||||
} else if (predictedNewDataUse.ToSeconds() > readaheadLimit) {
|
||||
// Don't read ahead more than this much
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p throttling to avoid reading ahead too far", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p throttling to avoid reading ahead too far", stream));
|
||||
enableReading = false;
|
||||
} else if (freeBlockCount > 0) {
|
||||
// Free blocks in the cache, so keep reading
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p reading since there are free blocks", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p reading since there are free blocks", stream));
|
||||
enableReading = true;
|
||||
} else if (latestNextUse <= TimeDuration(0)) {
|
||||
// No reusable blocks, so can't read anything
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p throttling due to no reusable blocks", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p throttling due to no reusable blocks", stream));
|
||||
enableReading = false;
|
||||
} else {
|
||||
// Read ahead if the data we expect to read is more valuable than
|
||||
// the least valuable block in the main part of the cache
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p predict next data in %f, current worst block is %f",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p predict next data in %f, current worst block is %f",
|
||||
stream, predictedNewDataUse.ToSeconds(), latestNextUse.ToSeconds()));
|
||||
enableReading = predictedNewDataUse < latestNextUse;
|
||||
}
|
||||
@ -1282,7 +1282,7 @@ MediaCache::Update()
|
||||
// This block is already going to be read by the other stream.
|
||||
// So don't try to read it from this stream as well.
|
||||
enableReading = false;
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p waiting on same block (%lld) from stream %p",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p waiting on same block (%lld) from stream %p",
|
||||
stream, desiredOffset/BLOCK_SIZE, other));
|
||||
break;
|
||||
}
|
||||
@ -1346,18 +1346,18 @@ MediaCache::Update()
|
||||
switch (actions[i]) {
|
||||
case SEEK:
|
||||
case SEEK_AND_RESUME:
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p CacheSeek to %lld (resume=%d)", stream,
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p CacheSeek to %lld (resume=%d)", stream,
|
||||
(long long)stream->mChannelOffset, actions[i] == SEEK_AND_RESUME));
|
||||
rv = stream->mClient->CacheClientSeek(stream->mChannelOffset,
|
||||
actions[i] == SEEK_AND_RESUME);
|
||||
break;
|
||||
case RESUME:
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p Resumed", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p Resumed", stream));
|
||||
rv = stream->mClient->CacheClientResume();
|
||||
QueueSuspendedStatusUpdate(stream->mResourceID);
|
||||
break;
|
||||
case SUSPEND:
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p Suspended", stream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p Suspended", stream));
|
||||
rv = stream->mClient->CacheClientSuspend();
|
||||
QueueSuspendedStatusUpdate(stream->mResourceID);
|
||||
break;
|
||||
@ -1497,7 +1497,7 @@ MediaCache::AllocateAndWriteBlock(MediaCacheStream* aStream, const void* aData,
|
||||
if (stream->mBlocks[streamBlockIndex] >= 0) {
|
||||
// We no longer want to own this block
|
||||
int32_t globalBlockIndex = stream->mBlocks[streamBlockIndex];
|
||||
CACHE_LOG(LogLevel::Debug, ("Released block %d from stream %p block %d(%lld)",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Released block %d from stream %p block %d(%lld)",
|
||||
globalBlockIndex, stream, streamBlockIndex, (long long)streamBlockIndex*BLOCK_SIZE));
|
||||
RemoveBlockOwner(globalBlockIndex, stream);
|
||||
}
|
||||
@ -1511,7 +1511,7 @@ MediaCache::AllocateAndWriteBlock(MediaCacheStream* aStream, const void* aData,
|
||||
FreeBlock(blockIndex);
|
||||
|
||||
Block* block = &mIndex[blockIndex];
|
||||
CACHE_LOG(LogLevel::Debug, ("Allocated block %d to stream %p block %d(%lld)",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Allocated block %d to stream %p block %d(%lld)",
|
||||
blockIndex, aStream, streamBlockIndex, (long long)streamBlockIndex*BLOCK_SIZE));
|
||||
|
||||
mFreeBlocks.RemoveBlock(blockIndex);
|
||||
@ -1546,7 +1546,7 @@ MediaCache::AllocateAndWriteBlock(MediaCacheStream* aStream, const void* aData,
|
||||
|
||||
nsresult rv = mFileCache->WriteBlock(blockIndex, reinterpret_cast<const uint8_t*>(aData));
|
||||
if (NS_FAILED(rv)) {
|
||||
CACHE_LOG(LogLevel::Debug, ("Released block %d from stream %p block %d(%lld)",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Released block %d from stream %p block %d(%lld)",
|
||||
blockIndex, aStream, streamBlockIndex, (long long)streamBlockIndex*BLOCK_SIZE));
|
||||
FreeBlock(blockIndex);
|
||||
}
|
||||
@ -1563,7 +1563,7 @@ MediaCache::OpenStream(MediaCacheStream* aStream)
|
||||
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
|
||||
|
||||
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p opened", aStream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p opened", aStream));
|
||||
mStreams.AppendElement(aStream);
|
||||
aStream->mResourceID = AllocateResourceID();
|
||||
|
||||
@ -1577,7 +1577,7 @@ MediaCache::ReleaseStream(MediaCacheStream* aStream)
|
||||
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
|
||||
|
||||
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p closed", aStream));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p closed", aStream));
|
||||
mStreams.RemoveElement(aStream);
|
||||
|
||||
// Update MediaCache again for |mStreams| is changed.
|
||||
@ -1598,7 +1598,7 @@ MediaCache::ReleaseStreamBlocks(MediaCacheStream* aStream)
|
||||
for (uint32_t i = 0; i < length; ++i) {
|
||||
int32_t blockIndex = aStream->mBlocks[i];
|
||||
if (blockIndex >= 0) {
|
||||
CACHE_LOG(LogLevel::Debug, ("Released block %d from stream %p block %d(%lld)",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Released block %d from stream %p block %d(%lld)",
|
||||
blockIndex, aStream, i, (long long)i*BLOCK_SIZE));
|
||||
RemoveBlockOwner(blockIndex, aStream);
|
||||
}
|
||||
@ -1769,7 +1769,7 @@ MediaCacheStream::NotifyDataReceived(int64_t aSize, const char* aData,
|
||||
int64_t size = aSize;
|
||||
const char* data = aData;
|
||||
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p DataReceived at %lld count=%lld",
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p DataReceived at %lld count=%lld",
|
||||
this, (long long)mChannelOffset, (long long)aSize));
|
||||
|
||||
// We process the data one block (or part of a block) at a time
|
||||
@ -1837,7 +1837,7 @@ MediaCacheStream::FlushPartialBlockInternal(bool aNotifyAll)
|
||||
|
||||
int32_t blockOffset = int32_t(mChannelOffset%BLOCK_SIZE);
|
||||
if (blockOffset > 0) {
|
||||
CACHE_LOG(LogLevel::Debug,
|
||||
CACHE_LOG(PR_LOG_DEBUG,
|
||||
("Stream %p writing partial block: [%d] bytes; "
|
||||
"mStreamOffset [%lld] mChannelOffset[%lld] mStreamLength [%lld] "
|
||||
"notifying: [%s]",
|
||||
@ -2186,7 +2186,7 @@ MediaCacheStream::Seek(int32_t aWhence, int64_t aOffset)
|
||||
return NS_ERROR_FAILURE;
|
||||
mStreamOffset = newOffset;
|
||||
|
||||
CACHE_LOG(LogLevel::Debug, ("Stream %p Seek to %lld", this, (long long)mStreamOffset));
|
||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p Seek to %lld", this, (long long)mStreamOffset));
|
||||
gMediaCache->NoteSeek(this, oldOffset);
|
||||
|
||||
gMediaCache->QueueUpdate();
|
||||
@ -2303,7 +2303,7 @@ MediaCacheStream::Read(char* aBuffer, uint32_t aCount, uint32_t* aBytes)
|
||||
// have changed
|
||||
gMediaCache->QueueUpdate();
|
||||
}
|
||||
CACHE_LOG(LogLevel::Debug,
|
||||
CACHE_LOG(PR_LOG_DEBUG,
|
||||
("Stream %p Read at %lld count=%d", this, (long long)(mStreamOffset-count), count));
|
||||
*aBytes = count;
|
||||
return NS_OK;
|
||||
|
@ -53,7 +53,7 @@ static const int64_t CAN_PLAY_THROUGH_MARGIN = 1;
|
||||
|
||||
PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define DECODER_LOG(x, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("Decoder=%p " x, this, ##__VA_ARGS__))
|
||||
MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, this, ##__VA_ARGS__))
|
||||
|
||||
static const char* const gPlayStateStr[] = {
|
||||
"START",
|
||||
|
@ -22,7 +22,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* gMediaDecoderLog;
|
||||
#define DECODER_LOG(x, ...) \
|
||||
MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("Decoder=%p " x, mDecoder, ##__VA_ARGS__))
|
||||
MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, ("Decoder=%p " x, mDecoder, ##__VA_ARGS__))
|
||||
|
||||
// Same workaround as MediaDecoderStateMachine.cpp.
|
||||
#define DECODER_WARN_HELPER(a, b) NS_WARNING b
|
||||
|
@ -60,11 +60,11 @@ extern PRLogModuleInfo* gMediaSampleLog;
|
||||
#define LOG(m, l, x, ...) \
|
||||
MOZ_LOG(m, l, ("Decoder=%p " x, mDecoder.get(), ##__VA_ARGS__))
|
||||
#define DECODER_LOG(x, ...) \
|
||||
LOG(gMediaDecoderLog, LogLevel::Debug, x, ##__VA_ARGS__)
|
||||
LOG(gMediaDecoderLog, PR_LOG_DEBUG, x, ##__VA_ARGS__)
|
||||
#define VERBOSE_LOG(x, ...) \
|
||||
LOG(gMediaDecoderLog, LogLevel::Verbose, x, ##__VA_ARGS__)
|
||||
LOG(gMediaDecoderLog, PR_LOG_DEBUG+1, x, ##__VA_ARGS__)
|
||||
#define SAMPLE_LOG(x, ...) \
|
||||
LOG(gMediaSampleLog, LogLevel::Debug, x, ##__VA_ARGS__)
|
||||
LOG(gMediaSampleLog, PR_LOG_DEBUG, x, ##__VA_ARGS__)
|
||||
|
||||
// Somehow MSVC doesn't correctly delete the comma before ##__VA_ARGS__
|
||||
// when __VA_ARGS__ expands to nothing. This is a workaround for it.
|
||||
|
@ -35,8 +35,8 @@ PRLogModuleInfo* GetFormatDecoderLog() {
|
||||
}
|
||||
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__))
|
||||
#define LOG(arg, ...) MOZ_LOG(GetFormatDecoderLog(), PR_LOG_DEBUG, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define LOGV(arg, ...) MOZ_LOG(GetFormatDecoderLog(), PR_LOG_DEBUG+1, ("MediaFormatReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -111,7 +111,7 @@ GetMediaManagerLog()
|
||||
sLog = PR_NewLogModule("MediaManager");
|
||||
return sLog;
|
||||
}
|
||||
#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
|
||||
|
||||
using dom::File;
|
||||
using dom::MediaStreamConstraints;
|
||||
|
@ -49,7 +49,7 @@ struct MediaTrackConstraintSet;
|
||||
}
|
||||
|
||||
extern PRLogModuleInfo* GetMediaManagerLog();
|
||||
#define MM_LOG(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define MM_LOG(msg) MOZ_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg)
|
||||
|
||||
/**
|
||||
* This class is an implementation of MediaStreamListener. This is used
|
||||
|
@ -31,7 +31,7 @@ extern PRLogModuleInfo* gMediaPromiseLog;
|
||||
|
||||
#define PROMISE_LOG(x, ...) \
|
||||
MOZ_ASSERT(gMediaPromiseLog); \
|
||||
MOZ_LOG(gMediaPromiseLog, mozilla::LogLevel::Debug, (x, ##__VA_ARGS__))
|
||||
MOZ_LOG(gMediaPromiseLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
|
||||
|
||||
namespace detail {
|
||||
template<typename ThisType, typename Ret, typename ArgType>
|
||||
|
@ -168,7 +168,7 @@ class MediaRecorder::Session: public nsIObserver
|
||||
|
||||
NS_IMETHODIMP Run()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.PushBlobRunnable s=(%p)", mSession.get()));
|
||||
LOG(PR_LOG_DEBUG, ("Session.PushBlobRunnable s=(%p)", mSession.get()));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsRefPtr<MediaRecorder> recorder = mSession->mRecorder;
|
||||
@ -198,7 +198,7 @@ class MediaRecorder::Session: public nsIObserver
|
||||
|
||||
NS_IMETHODIMP Run()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.ErrorNotifyRunnable s=(%p)", mSession.get()));
|
||||
LOG(PR_LOG_DEBUG, ("Session.ErrorNotifyRunnable s=(%p)", mSession.get()));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsRefPtr<MediaRecorder> recorder = mSession->mRecorder;
|
||||
@ -227,7 +227,7 @@ class MediaRecorder::Session: public nsIObserver
|
||||
|
||||
NS_IMETHODIMP Run()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.DispatchStartEventRunnable s=(%p)", mSession.get()));
|
||||
LOG(PR_LOG_DEBUG, ("Session.DispatchStartEventRunnable s=(%p)", mSession.get()));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
NS_ENSURE_TRUE(mSession->mRecorder, NS_OK);
|
||||
@ -259,7 +259,7 @@ class MediaRecorder::Session: public nsIObserver
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mSession->mReadThread);
|
||||
|
||||
LOG(LogLevel::Debug, ("Session.ExtractRunnable shutdown = %d", mSession->mEncoder->IsShutdown()));
|
||||
LOG(PR_LOG_DEBUG, ("Session.ExtractRunnable shutdown = %d", mSession->mEncoder->IsShutdown()));
|
||||
if (!mSession->mEncoder->IsShutdown()) {
|
||||
mSession->Extract(false);
|
||||
nsCOMPtr<nsIRunnable> event = new ExtractRunnable(mSession);
|
||||
@ -304,7 +304,7 @@ class MediaRecorder::Session: public nsIObserver
|
||||
trackTypes |= ContainerWriter::CREATE_VIDEO_TRACK;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("Session.NotifyTracksAvailable track type = (%d)", trackTypes));
|
||||
LOG(PR_LOG_DEBUG, ("Session.NotifyTracksAvailable track type = (%d)", trackTypes));
|
||||
mSession->InitEncoder(trackTypes);
|
||||
}
|
||||
private:
|
||||
@ -320,7 +320,7 @@ class MediaRecorder::Session: public nsIObserver
|
||||
|
||||
NS_IMETHODIMP Run()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.DestroyRunnable session refcnt = (%d) stopIssued %d s=(%p)",
|
||||
LOG(PR_LOG_DEBUG, ("Session.DestroyRunnable session refcnt = (%d) stopIssued %d s=(%p)",
|
||||
(int)mSession->mRefCnt, mSession->mStopIssued, mSession.get()));
|
||||
MOZ_ASSERT(NS_IsMainThread() && mSession.get());
|
||||
nsRefPtr<MediaRecorder> recorder = mSession->mRecorder;
|
||||
@ -381,7 +381,7 @@ public:
|
||||
|
||||
void Start()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.Start %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.Start %p", this));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
SetupStreams();
|
||||
@ -389,12 +389,12 @@ public:
|
||||
|
||||
void Stop()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.Stop %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.Stop %p", this));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mStopIssued = true;
|
||||
CleanupStreams();
|
||||
if (mNeedSessionEndTask) {
|
||||
LOG(LogLevel::Debug, ("Session.Stop mNeedSessionEndTask %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.Stop mNeedSessionEndTask %p", this));
|
||||
// End the Session directly if there is no ExtractRunnable.
|
||||
DoSessionEndTask(NS_OK);
|
||||
}
|
||||
@ -403,7 +403,7 @@ public:
|
||||
|
||||
nsresult Pause()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.Pause"));
|
||||
LOG(PR_LOG_DEBUG, ("Session.Pause"));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
NS_ENSURE_TRUE(mTrackUnionStream, NS_ERROR_FAILURE);
|
||||
@ -414,7 +414,7 @@ public:
|
||||
|
||||
nsresult Resume()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.Resume"));
|
||||
LOG(PR_LOG_DEBUG, ("Session.Resume"));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
NS_ENSURE_TRUE(mTrackUnionStream, NS_ERROR_FAILURE);
|
||||
@ -425,7 +425,7 @@ public:
|
||||
|
||||
nsresult RequestData()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.RequestData"));
|
||||
LOG(PR_LOG_DEBUG, ("Session.RequestData"));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (NS_FAILED(NS_DispatchToMainThread(new EncoderErrorNotifierRunnable(this))) ||
|
||||
@ -464,7 +464,7 @@ private:
|
||||
// Only DestroyRunnable is allowed to delete Session object.
|
||||
virtual ~Session()
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.~Session (%p)", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.~Session (%p)", this));
|
||||
CleanupStreams();
|
||||
}
|
||||
// Pull encoded media data from MediaEncoder and put into EncodedBufferCache.
|
||||
@ -474,7 +474,7 @@ private:
|
||||
void Extract(bool aForceFlush)
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mReadThread);
|
||||
LOG(LogLevel::Debug, ("Session.Extract %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.Extract %p", this));
|
||||
|
||||
if (!mIsRegisterProfiler) {
|
||||
char aLocal;
|
||||
@ -577,11 +577,11 @@ private:
|
||||
|
||||
void InitEncoder(uint8_t aTrackTypes)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("Session.InitEncoder %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.InitEncoder %p", this));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mRecorder) {
|
||||
LOG(LogLevel::Debug, ("Session.InitEncoder failure, mRecorder is null %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.InitEncoder failure, mRecorder is null %p", this));
|
||||
return;
|
||||
}
|
||||
// Allocate encoder and bind with union stream.
|
||||
@ -595,7 +595,7 @@ private:
|
||||
}
|
||||
|
||||
if (!mEncoder) {
|
||||
LOG(LogLevel::Debug, ("Session.InitEncoder !mEncoder %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.InitEncoder !mEncoder %p", this));
|
||||
DoSessionEndTask(NS_ERROR_ABORT);
|
||||
return;
|
||||
}
|
||||
@ -604,7 +604,7 @@ private:
|
||||
// The Session::stop would clean the mTrackUnionStream. If the AfterTracksAdded
|
||||
// comes after stop command, this function would crash.
|
||||
if (!mTrackUnionStream) {
|
||||
LOG(LogLevel::Debug, ("Session.InitEncoder !mTrackUnionStream %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.InitEncoder !mTrackUnionStream %p", this));
|
||||
DoSessionEndTask(NS_OK);
|
||||
return;
|
||||
}
|
||||
@ -613,7 +613,7 @@ private:
|
||||
if (!mReadThread) {
|
||||
nsresult rv = NS_NewNamedThread("Media_Encoder", getter_AddRefs(mReadThread));
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Debug, ("Session.InitEncoder !mReadThread %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.InitEncoder !mReadThread %p", this));
|
||||
DoSessionEndTask(rv);
|
||||
return;
|
||||
}
|
||||
@ -626,7 +626,7 @@ private:
|
||||
nsCOMPtr<nsIRunnable> event = new ExtractRunnable(this);
|
||||
if (NS_FAILED(mReadThread->Dispatch(event, NS_DISPATCH_NORMAL))) {
|
||||
NS_WARNING("Failed to dispatch ExtractRunnable at beginning");
|
||||
LOG(LogLevel::Debug, ("Session.InitEncoder !ReadThread->Dispatch %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.InitEncoder !ReadThread->Dispatch %p", this));
|
||||
DoSessionEndTask(NS_ERROR_ABORT);
|
||||
}
|
||||
// Set mNeedSessionEndTask to false because the
|
||||
@ -672,7 +672,7 @@ private:
|
||||
NS_IMETHODIMP Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) override
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
LOG(LogLevel::Debug, ("Session.Observe XPCOM_SHUTDOWN %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("Session.Observe XPCOM_SHUTDOWN %p", this));
|
||||
if (strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID) == 0) {
|
||||
// Force stop Session to terminate Read Thread.
|
||||
mEncoder->Cancel();
|
||||
@ -742,7 +742,7 @@ MediaRecorder::~MediaRecorder()
|
||||
mInputPort->Destroy();
|
||||
mPipeStream->Destroy();
|
||||
}
|
||||
LOG(LogLevel::Debug, ("~MediaRecorder (%p)", this));
|
||||
LOG(PR_LOG_DEBUG, ("~MediaRecorder (%p)", this));
|
||||
UnRegisterActivityObserver();
|
||||
}
|
||||
|
||||
@ -832,7 +832,7 @@ MediaRecorder::GetMimeType(nsString &aMimeType)
|
||||
void
|
||||
MediaRecorder::Start(const Optional<int32_t>& aTimeSlice, ErrorResult& aResult)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("MediaRecorder.Start %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("MediaRecorder.Start %p", this));
|
||||
if (mState != RecordingState::Inactive) {
|
||||
aResult.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
@ -874,7 +874,7 @@ MediaRecorder::Start(const Optional<int32_t>& aTimeSlice, ErrorResult& aResult)
|
||||
void
|
||||
MediaRecorder::Stop(ErrorResult& aResult)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("MediaRecorder.Stop %p", this));
|
||||
LOG(PR_LOG_DEBUG, ("MediaRecorder.Stop %p", this));
|
||||
MediaRecorderReporter::RemoveMediaRecorder(this);
|
||||
if (mState == RecordingState::Inactive) {
|
||||
aResult.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
@ -888,7 +888,7 @@ MediaRecorder::Stop(ErrorResult& aResult)
|
||||
void
|
||||
MediaRecorder::Pause(ErrorResult& aResult)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("MediaRecorder.Pause"));
|
||||
LOG(PR_LOG_DEBUG, ("MediaRecorder.Pause"));
|
||||
if (mState != RecordingState::Recording) {
|
||||
aResult.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
@ -906,7 +906,7 @@ MediaRecorder::Pause(ErrorResult& aResult)
|
||||
void
|
||||
MediaRecorder::Resume(ErrorResult& aResult)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("MediaRecorder.Resume"));
|
||||
LOG(PR_LOG_DEBUG, ("MediaRecorder.Resume"));
|
||||
if (mState != RecordingState::Paused) {
|
||||
aResult.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||
return;
|
||||
@ -1112,7 +1112,7 @@ bool MediaRecorder::CheckPrincipal()
|
||||
void
|
||||
MediaRecorder::RemoveSession(Session* aSession)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("MediaRecorder.RemoveSession (%p)", aSession));
|
||||
LOG(PR_LOG_DEBUG, ("MediaRecorder.RemoveSession (%p)", aSession));
|
||||
mSessions.RemoveElement(aSession);
|
||||
}
|
||||
|
||||
@ -1124,7 +1124,7 @@ MediaRecorder::NotifyOwnerDocumentActivityChanged()
|
||||
nsIDocument* doc = window->GetExtantDoc();
|
||||
NS_ENSURE_TRUE_VOID(doc);
|
||||
|
||||
LOG(LogLevel::Debug, ("MediaRecorder %p document IsActive %d isVisible %d\n",
|
||||
LOG(PR_LOG_DEBUG, ("MediaRecorder %p document IsActive %d isVisible %d\n",
|
||||
this, doc->IsActive(), doc->IsVisible()));
|
||||
if (!doc->IsActive() || !doc->IsVisible()) {
|
||||
// Stop the session.
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "nsIContentPolicy.h"
|
||||
|
||||
PRLogModuleInfo* gMediaResourceLog;
|
||||
#define RESOURCE_LOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
|
||||
#define RESOURCE_LOG(msg, ...) MOZ_LOG(gMediaResourceLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
#define CMLOG(msg, ...) \
|
||||
|
@ -113,7 +113,7 @@ MediaShutdownManager::Shutdown()
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(sInstance);
|
||||
|
||||
DECODER_LOG(LogLevel::Debug, ("MediaShutdownManager::Shutdown() start..."));
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("MediaShutdownManager::Shutdown() start..."));
|
||||
|
||||
// Mark that we're shutting down, so that Unregister(*) calls don't remove
|
||||
// hashtable entries. If Unregsiter(*) was to remove from the hash table,
|
||||
@ -139,7 +139,7 @@ MediaShutdownManager::Shutdown()
|
||||
// up after it finishes its notifications.
|
||||
sInstance = nullptr;
|
||||
|
||||
DECODER_LOG(LogLevel::Debug, ("MediaShutdownManager::Shutdown() end."));
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("MediaShutdownManager::Shutdown() end."));
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -68,7 +68,7 @@ MediaStreamGraphImpl::~MediaStreamGraphImpl()
|
||||
{
|
||||
NS_ASSERTION(IsEmpty(),
|
||||
"All streams should have been destroyed by messages from the main thread");
|
||||
STREAM_LOG(LogLevel::Debug, ("MediaStreamGraph %p destroyed", this));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("MediaStreamGraph %p destroyed", this));
|
||||
LIFECYCLE_LOG("MediaStreamGraphImpl::~MediaStreamGraphImpl\n");
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ MediaStreamGraphImpl::FinishStream(MediaStream* aStream)
|
||||
{
|
||||
if (aStream->mFinished)
|
||||
return;
|
||||
STREAM_LOG(LogLevel::Debug, ("MediaStream %p will finish", aStream));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("MediaStream %p will finish", aStream));
|
||||
aStream->mFinished = true;
|
||||
aStream->mBuffer.AdvanceKnownTracksTime(STREAM_TIME_MAX);
|
||||
// Force at least one more iteration of the control loop, since we rely
|
||||
@ -118,11 +118,11 @@ MediaStreamGraphImpl::AddStream(MediaStream* aStream)
|
||||
if (contextSuspended) {
|
||||
aStream->mBufferStartTime = START_TIME_DELAYED;
|
||||
mSuspendedStreams.AppendElement(aStream);
|
||||
STREAM_LOG(LogLevel::Debug, ("Adding media stream %p to the graph, in the suspended stream array", aStream));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Adding media stream %p to the graph, in the suspended stream array", aStream));
|
||||
} else {
|
||||
aStream->mBufferStartTime = IterationEnd();
|
||||
mStreams.AppendElement(aStream);
|
||||
STREAM_LOG(LogLevel::Debug, ("Adding media stream %p to the graph", aStream));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Adding media stream %p to the graph", aStream));
|
||||
}
|
||||
|
||||
SetStreamOrderDirty();
|
||||
@ -151,7 +151,7 @@ MediaStreamGraphImpl::RemoveStream(MediaStream* aStream)
|
||||
|
||||
NS_RELEASE(aStream); // probably destroying it
|
||||
|
||||
STREAM_LOG(LogLevel::Debug, ("Removing media stream %p from the graph", aStream));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Removing media stream %p from the graph", aStream));
|
||||
}
|
||||
|
||||
void
|
||||
@ -185,14 +185,14 @@ MediaStreamGraphImpl::ExtractPendingInput(SourceMediaStream* aStream,
|
||||
StreamTime t =
|
||||
GraphTimeToStreamTime(aStream, CurrentDriver()->StateComputedTime()) +
|
||||
(aDesiredUpToTime - CurrentDriver()->StateComputedTime());
|
||||
STREAM_LOG(LogLevel::Verbose, ("Calling NotifyPull aStream=%p t=%f current end=%f", aStream,
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("Calling NotifyPull aStream=%p t=%f current end=%f", aStream,
|
||||
MediaTimeToSeconds(t),
|
||||
MediaTimeToSeconds(aStream->mBuffer.GetEnd())));
|
||||
if (t > aStream->mBuffer.GetEnd()) {
|
||||
*aEnsureNextIteration = true;
|
||||
#ifdef DEBUG
|
||||
if (aStream->mListeners.Length() == 0) {
|
||||
STREAM_LOG(LogLevel::Error, ("No listeners in NotifyPull aStream=%p desired=%f current end=%f",
|
||||
STREAM_LOG(PR_LOG_ERROR, ("No listeners in NotifyPull aStream=%p desired=%f current end=%f",
|
||||
aStream, MediaTimeToSeconds(t),
|
||||
MediaTimeToSeconds(aStream->mBuffer.GetEnd())));
|
||||
aStream->DumpTrackInfo();
|
||||
@ -220,7 +220,7 @@ MediaStreamGraphImpl::ExtractPendingInput(SourceMediaStream* aStream,
|
||||
}
|
||||
if (data->mCommands & SourceMediaStream::TRACK_CREATE) {
|
||||
MediaSegment* segment = data->mData.forget();
|
||||
STREAM_LOG(LogLevel::Debug, ("SourceMediaStream %p creating track %d, start %lld, initial end %lld",
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("SourceMediaStream %p creating track %d, start %lld, initial end %lld",
|
||||
aStream, data->mID, int64_t(data->mStart),
|
||||
int64_t(segment->GetDuration())));
|
||||
|
||||
@ -233,7 +233,7 @@ MediaStreamGraphImpl::ExtractPendingInput(SourceMediaStream* aStream,
|
||||
notifiedTrackCreated = true;
|
||||
} else if (data->mData->GetDuration() > 0) {
|
||||
MediaSegment* dest = aStream->mBuffer.FindTrack(data->mID)->GetSegment();
|
||||
STREAM_LOG(LogLevel::Verbose, ("SourceMediaStream %p track %d, advancing end from %lld to %lld",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("SourceMediaStream %p track %d, advancing end from %lld to %lld",
|
||||
aStream, data->mID,
|
||||
int64_t(dest->GetDuration()),
|
||||
int64_t(dest->GetDuration() + data->mData->GetDuration())));
|
||||
@ -482,7 +482,7 @@ MediaStreamGraphImpl::UpdateCurrentTimeForStreams(GraphTime aPrevCurrentTime,
|
||||
StreamReadyToFinish(stream);
|
||||
}
|
||||
}
|
||||
STREAM_LOG(LogLevel::Verbose,
|
||||
STREAM_LOG(PR_LOG_DEBUG + 1,
|
||||
("MediaStream %p bufferStartTime=%f blockedTime=%f", stream,
|
||||
MediaTimeToSeconds(stream->mBufferStartTime),
|
||||
MediaTimeToSeconds(blockedTime)));
|
||||
@ -505,7 +505,7 @@ MediaStreamGraphImpl::WillUnderrun(MediaStream* aStream, GraphTime aTime,
|
||||
INCLUDE_TRAILING_BLOCKED_INTERVAL);
|
||||
#ifdef DEBUG
|
||||
if (bufferEnd < IterationEnd()) {
|
||||
STREAM_LOG(LogLevel::Error, ("MediaStream %p underrun, "
|
||||
STREAM_LOG(PR_LOG_ERROR, ("MediaStream %p underrun, "
|
||||
"bufferEnd %f < IterationEnd() %f (%lld < %lld), Streamtime %lld",
|
||||
aStream, MediaTimeToSeconds(bufferEnd), MediaTimeToSeconds(IterationEnd()),
|
||||
bufferEnd, IterationEnd(), aStream->GetBufferEnd()));
|
||||
@ -515,7 +515,7 @@ MediaStreamGraphImpl::WillUnderrun(MediaStream* aStream, GraphTime aTime,
|
||||
#endif
|
||||
// We should block after bufferEnd.
|
||||
if (bufferEnd <= aTime) {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p will block due to data underrun at %ld, "
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p will block due to data underrun at %ld, "
|
||||
"bufferEnd %ld",
|
||||
aStream, aTime, bufferEnd));
|
||||
return true;
|
||||
@ -526,7 +526,7 @@ MediaStreamGraphImpl::WillUnderrun(MediaStream* aStream, GraphTime aTime,
|
||||
// but we might as well remain unblocked and play the data we've got while
|
||||
// we can.
|
||||
if (bufferEnd < aEndBlockingDecisions && aStream->mBlocked.GetBefore(aTime)) {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p will block due to speculative data underrun, "
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p will block due to speculative data underrun, "
|
||||
"bufferEnd %f (end at %ld)",
|
||||
aStream, MediaTimeToSeconds(bufferEnd), bufferEnd));
|
||||
return true;
|
||||
@ -813,7 +813,7 @@ MediaStreamGraphImpl::RecomputeBlocking(GraphTime aEndBlockingDecisions)
|
||||
{
|
||||
bool blockingDecisionsWillChange = false;
|
||||
|
||||
STREAM_LOG(LogLevel::Verbose, ("Media graph %p computing blocking for time %f",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("Media graph %p computing blocking for time %f",
|
||||
this, MediaTimeToSeconds(CurrentDriver()->StateComputedTime())));
|
||||
nsTArray<MediaStream*>* runningAndSuspendedPair[2];
|
||||
runningAndSuspendedPair[0] = &mStreams;
|
||||
@ -847,7 +847,7 @@ MediaStreamGraphImpl::RecomputeBlocking(GraphTime aEndBlockingDecisions)
|
||||
}
|
||||
}
|
||||
}
|
||||
STREAM_LOG(LogLevel::Verbose, ("Media graph %p computed blocking for interval %f to %f",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("Media graph %p computed blocking for interval %f to %f",
|
||||
this, MediaTimeToSeconds(CurrentDriver()->StateComputedTime()),
|
||||
MediaTimeToSeconds(aEndBlockingDecisions)));
|
||||
|
||||
@ -925,13 +925,13 @@ MediaStreamGraphImpl::RecomputeBlockingAt(const nsTArray<MediaStream*>& aStreams
|
||||
GraphTime endTime = StreamTimeToGraphTime(stream,
|
||||
stream->GetStreamBuffer().GetAllTracksEnd());
|
||||
if (endTime <= aTime) {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p is blocked due to being finished", stream));
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p is blocked due to being finished", stream));
|
||||
// We'll block indefinitely
|
||||
MarkStreamBlocking(stream);
|
||||
*aEnd = std::min(*aEnd, aEndBlockingDecisions);
|
||||
continue;
|
||||
} else {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p is finished, but not blocked yet (end at %f, with blocking at %f)",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p is finished, but not blocked yet (end at %f, with blocking at %f)",
|
||||
stream, MediaTimeToSeconds(stream->GetBufferEnd()),
|
||||
MediaTimeToSeconds(endTime)));
|
||||
*aEnd = std::min(*aEnd, endTime);
|
||||
@ -942,7 +942,7 @@ MediaStreamGraphImpl::RecomputeBlockingAt(const nsTArray<MediaStream*>& aStreams
|
||||
bool explicitBlock = stream->mExplicitBlockerCount.GetAt(aTime, &end) > 0;
|
||||
*aEnd = std::min(*aEnd, end);
|
||||
if (explicitBlock) {
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p is blocked due to explicit blocker", stream));
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p is blocked due to explicit blocker", stream));
|
||||
MarkStreamBlocking(stream);
|
||||
continue;
|
||||
}
|
||||
@ -1091,7 +1091,7 @@ MediaStreamGraphImpl::PlayAudio(MediaStream* aStream,
|
||||
if (blocked) {
|
||||
output.InsertNullDataAtStart(toWrite);
|
||||
ticksWritten += toWrite;
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p writing %ld blocking-silence samples for %f to %f (%ld to %ld)\n",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p writing %ld blocking-silence samples for %f to %f (%ld to %ld)\n",
|
||||
aStream, toWrite, MediaTimeToSeconds(t), MediaTimeToSeconds(end),
|
||||
offset, offset + toWrite));
|
||||
} else {
|
||||
@ -1099,7 +1099,7 @@ MediaStreamGraphImpl::PlayAudio(MediaStream* aStream,
|
||||
StreamTime endTicksAvailable = audio->GetDuration();
|
||||
|
||||
if (endTicksNeeded <= endTicksAvailable) {
|
||||
STREAM_LOG(LogLevel::Verbose,
|
||||
STREAM_LOG(PR_LOG_DEBUG + 1,
|
||||
("MediaStream %p writing %ld samples for %f to %f "
|
||||
"(samples %ld to %ld)\n",
|
||||
aStream, toWrite, MediaTimeToSeconds(t),
|
||||
@ -1114,7 +1114,7 @@ MediaStreamGraphImpl::PlayAudio(MediaStream* aStream,
|
||||
if (endTicksNeeded > endTicksAvailable &&
|
||||
offset < endTicksAvailable) {
|
||||
output.AppendSlice(*audio, offset, endTicksAvailable);
|
||||
STREAM_LOG(LogLevel::Verbose,
|
||||
STREAM_LOG(PR_LOG_DEBUG + 1,
|
||||
("MediaStream %p writing %ld samples for %f to %f "
|
||||
"(samples %ld to %ld)\n",
|
||||
aStream, toWrite, MediaTimeToSeconds(t),
|
||||
@ -1125,7 +1125,7 @@ MediaStreamGraphImpl::PlayAudio(MediaStream* aStream,
|
||||
offset = endTicksAvailable;
|
||||
}
|
||||
output.AppendNullData(toWrite);
|
||||
STREAM_LOG(LogLevel::Verbose,
|
||||
STREAM_LOG(PR_LOG_DEBUG + 1,
|
||||
("MediaStream %p writing %ld padding slsamples for %f to "
|
||||
"%f (samples %ld to %ld)\n",
|
||||
aStream, toWrite, MediaTimeToSeconds(t),
|
||||
@ -1214,7 +1214,7 @@ MediaStreamGraphImpl::PlayVideo(MediaStream* aStream)
|
||||
if (!frame || *frame == aStream->mLastPlayedVideoFrame)
|
||||
return;
|
||||
|
||||
STREAM_LOG(LogLevel::Verbose, ("MediaStream %p writing video frame %p (%dx%d)",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("MediaStream %p writing video frame %p (%dx%d)",
|
||||
aStream, frame->GetImage(), frame->GetIntrinsicSize().width,
|
||||
frame->GetIntrinsicSize().height));
|
||||
GraphTime startTime = StreamTimeToGraphTime(aStream,
|
||||
@ -1521,7 +1521,7 @@ MediaStreamGraphImpl::OneIteration(GraphTime aFrom, GraphTime aTo,
|
||||
if (finalUpdate) {
|
||||
// Enter shutdown mode. The stable-state handler will detect this
|
||||
// and complete shutdown. Destroy any streams immediately.
|
||||
STREAM_LOG(LogLevel::Debug, ("MediaStreamGraph %p waiting for main thread cleanup", this));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("MediaStreamGraph %p waiting for main thread cleanup", this));
|
||||
// We'll shut down this graph object if it does not get restarted.
|
||||
mLifecycleState = LIFECYCLE_WAITING_FOR_MAIN_THREAD_CLEANUP;
|
||||
// No need to Destroy streams here. The main-thread owner of each
|
||||
@ -1562,7 +1562,7 @@ void
|
||||
MediaStreamGraphImpl::ForceShutDown()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Must be called on main thread");
|
||||
STREAM_LOG(LogLevel::Debug, ("MediaStreamGraph %p ForceShutdown", this));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("MediaStreamGraph %p ForceShutdown", this));
|
||||
{
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
mForceShutDown = true;
|
||||
@ -2767,7 +2767,7 @@ SourceMediaStream::NeedsMixing()
|
||||
void
|
||||
MediaInputPort::Init()
|
||||
{
|
||||
STREAM_LOG(LogLevel::Debug, ("Adding MediaInputPort %p (from %p to %p) to the graph",
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Adding MediaInputPort %p (from %p to %p) to the graph",
|
||||
this, mSource, mDest));
|
||||
mSource->AddConsumer(this);
|
||||
mDest->AddInput(this);
|
||||
@ -3045,7 +3045,7 @@ MediaStreamGraph::GetInstance(bool aStartWithAudioDriver,
|
||||
graph = new MediaStreamGraphImpl(true, CubebUtils::PreferredSampleRate(), aStartWithAudioDriver, aChannel);
|
||||
gGraphs.Put(channel, graph);
|
||||
|
||||
STREAM_LOG(LogLevel::Debug, ("Starting up MediaStreamGraph %p", graph));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Starting up MediaStreamGraph %p", graph));
|
||||
}
|
||||
|
||||
return graph;
|
||||
@ -3058,7 +3058,7 @@ MediaStreamGraph::CreateNonRealtimeInstance(TrackRate aSampleRate)
|
||||
|
||||
MediaStreamGraphImpl* graph = new MediaStreamGraphImpl(false, aSampleRate);
|
||||
|
||||
STREAM_LOG(LogLevel::Debug, ("Starting up Offline MediaStreamGraph %p", graph));
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Starting up Offline MediaStreamGraph %p", graph));
|
||||
|
||||
return graph;
|
||||
}
|
||||
@ -3363,7 +3363,7 @@ MediaStreamGraphImpl::MoveStreams(AudioContextOperation aAudioContextOperation,
|
||||
|
||||
stream->remove();
|
||||
}
|
||||
STREAM_LOG(LogLevel::Debug, ("Moving streams between suspended and running"
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("Moving streams between suspended and running"
|
||||
"state: mStreams: %d, mSuspendedStreams: %d\n", mStreams.Length(),
|
||||
mSuspendedStreams.Length()));
|
||||
#ifdef DEBUG
|
||||
|
@ -23,7 +23,7 @@ extern PRLogModuleInfo* gMediaTimerLog;
|
||||
|
||||
#define TIMER_LOG(x, ...) \
|
||||
MOZ_ASSERT(gMediaTimerLog); \
|
||||
MOZ_LOG(gMediaTimerLog, LogLevel::Debug, ("[MediaTimer=%p relative_t=%lld]" x, this, \
|
||||
MOZ_LOG(gMediaTimerLog, PR_LOG_DEBUG, ("[MediaTimer=%p relative_t=%lld]" x, this, \
|
||||
RelativeMicroseconds(TimeStamp::Now()), ##__VA_ARGS__))
|
||||
|
||||
// This promise type is only exclusive because so far there isn't a reason for
|
||||
|
@ -21,7 +21,7 @@
|
||||
using namespace mozilla::net;
|
||||
|
||||
PRLogModuleInfo* gRtspMediaResourceLog;
|
||||
#define RTSP_LOG(msg, ...) MOZ_LOG(gRtspMediaResourceLog, mozilla::LogLevel::Debug, \
|
||||
#define RTSP_LOG(msg, ...) MOZ_LOG(gRtspMediaResourceLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
#define RTSPMLOG(msg, ...) \
|
||||
|
@ -50,7 +50,7 @@ namespace mozilla {
|
||||
// the same log module.
|
||||
#define MIRROR_LOG(x, ...) \
|
||||
MOZ_ASSERT(gStateWatchingLog); \
|
||||
MOZ_LOG(gStateWatchingLog, LogLevel::Debug, (x, ##__VA_ARGS__))
|
||||
MOZ_LOG(gStateWatchingLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
|
||||
|
||||
template<typename T> class AbstractMirror;
|
||||
|
||||
|
@ -60,7 +60,7 @@ extern PRLogModuleInfo* gStateWatchingLog;
|
||||
|
||||
#define WATCH_LOG(x, ...) \
|
||||
MOZ_ASSERT(gStateWatchingLog); \
|
||||
MOZ_LOG(gStateWatchingLog, LogLevel::Debug, (x, ##__VA_ARGS__))
|
||||
MOZ_LOG(gStateWatchingLog, PR_LOG_DEBUG, (x, ##__VA_ARGS__))
|
||||
|
||||
/*
|
||||
* AbstractWatcher is a superclass from which all watchers must inherit.
|
||||
|
@ -16,13 +16,13 @@ extern PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
void
|
||||
StreamBuffer::DumpTrackInfo() const
|
||||
{
|
||||
STREAM_LOG(LogLevel::Info, ("DumpTracks: mTracksKnownTime %lld", mTracksKnownTime));
|
||||
STREAM_LOG(PR_LOG_ALWAYS, ("DumpTracks: mTracksKnownTime %lld", mTracksKnownTime));
|
||||
for (uint32_t i = 0; i < mTracks.Length(); ++i) {
|
||||
Track* track = mTracks[i];
|
||||
if (track->IsEnded()) {
|
||||
STREAM_LOG(LogLevel::Info, ("Track[%d] %d: ended", i, track->GetID()));
|
||||
STREAM_LOG(PR_LOG_ALWAYS, ("Track[%d] %d: ended", i, track->GetID()));
|
||||
} else {
|
||||
STREAM_LOG(LogLevel::Info, ("Track[%d] %d: %lld", i, track->GetID(),
|
||||
STREAM_LOG(PR_LOG_ALWAYS, ("Track[%d] %d: %lld", i, track->GetID(),
|
||||
track->GetEnd()));
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ TrackUnionStream::TrackUnionStream(DOMMediaStream* aWrapper) :
|
||||
segment->AppendNullData(outputStart);
|
||||
StreamBuffer::Track* track =
|
||||
&mBuffer.AddTrack(id, outputStart, segment.forget());
|
||||
STREAM_LOG(LogLevel::Debug, ("TrackUnionStream %p adding track %d for input stream %p track %d, start ticks %lld",
|
||||
STREAM_LOG(PR_LOG_DEBUG, ("TrackUnionStream %p adding track %d for input stream %p track %d, start ticks %lld",
|
||||
this, id, aPort->GetSource(), aTrack->GetID(),
|
||||
(long long)outputStart));
|
||||
|
||||
@ -264,7 +264,7 @@ TrackUnionStream::TrackUnionStream(DOMMediaStream* aWrapper) :
|
||||
if (interval.mInputIsBlocked) {
|
||||
// Maybe the input track ended?
|
||||
segment->AppendNullData(ticks);
|
||||
STREAM_LOG(LogLevel::Verbose, ("TrackUnionStream %p appending %lld ticks of null data to track %d",
|
||||
STREAM_LOG(PR_LOG_DEBUG+1, ("TrackUnionStream %p appending %lld ticks of null data to track %d",
|
||||
this, (long long)ticks, outputTrack->GetID()));
|
||||
} else if (InMutedCycle()) {
|
||||
segment->AppendNullData(ticks);
|
||||
|
@ -29,7 +29,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(WebVTTListener)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(WebVTTListener)
|
||||
|
||||
PRLogModuleInfo* gTextTrackLog;
|
||||
# define VTT_LOG(...) MOZ_LOG(gTextTrackLog, LogLevel::Debug, (__VA_ARGS__))
|
||||
# define VTT_LOG(...) MOZ_LOG(gTextTrackLog, PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
WebVTTListener::WebVTTListener(HTMLTrackElement* aElement)
|
||||
: mElement(aElement)
|
||||
|
@ -22,9 +22,9 @@
|
||||
namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* 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__))
|
||||
#define LOGE(...) MOZ_LOG(gMediaDecoderLog, PR_LOG_ERROR, (__VA_ARGS__))
|
||||
#define LOGW(...) MOZ_LOG(gMediaDecoderLog, PR_LOG_WARNING, (__VA_ARGS__))
|
||||
#define LOGD(...) MOZ_LOG(gMediaDecoderLog, PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
#define PROPERTY_ID_FORMAT "%c%c%c%c"
|
||||
#define PROPERTY_ID_PRINT(x) ((x) >> 24), \
|
||||
|
@ -24,7 +24,7 @@ using namespace mozilla::media;
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
AudioSinkFilter::AudioSinkFilter(const wchar_t* aObjectName, HRESULT* aOutResult)
|
||||
: BaseFilter(aObjectName, CLSID_MozAudioSinkFilter),
|
||||
|
@ -16,7 +16,7 @@ using namespace mozilla::media;
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
AudioSinkInputPin::AudioSinkInputPin(wchar_t* aObjectName,
|
||||
AudioSinkFilter* aFilter,
|
||||
|
@ -26,7 +26,7 @@ GetDirectShowLog() {
|
||||
return log;
|
||||
}
|
||||
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
DirectShowReader::DirectShowReader(AbstractMediaDecoder* aDecoder)
|
||||
: MediaDecoderReader(aDecoder),
|
||||
|
@ -15,7 +15,7 @@ using namespace mozilla::media;
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
SampleSink::SampleSink()
|
||||
: mMonitor("SampleSink"),
|
||||
@ -65,7 +65,7 @@ SampleSink::Receive(IMediaSample* aSample)
|
||||
mon.Wait();
|
||||
}
|
||||
|
||||
if (MOZ_LOG_TEST(GetDirectShowLog(), LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(GetDirectShowLog(), PR_LOG_DEBUG)) {
|
||||
REFERENCE_TIME start = 0, end = 0;
|
||||
HRESULT hr = aSample->GetMediaTime(&start, &end);
|
||||
LOG("SampleSink::Receive() [%4.2lf-%4.2lf]",
|
||||
@ -102,7 +102,7 @@ SampleSink::Extract(RefPtr<IMediaSample>& aOutSample)
|
||||
}
|
||||
aOutSample = mSample;
|
||||
|
||||
if (MOZ_LOG_TEST(GetDirectShowLog(), LogLevel::Debug)) {
|
||||
if (PR_LOG_TEST(GetDirectShowLog(), PR_LOG_DEBUG)) {
|
||||
int64_t start = 0, end = 0;
|
||||
mSample->GetMediaTime(&start, &end);
|
||||
LOG("SampleSink::Extract() [%4.2lf-%4.2lf]",
|
||||
|
@ -21,7 +21,7 @@ namespace mozilla {
|
||||
|
||||
#if defined (DEBUG_SOURCE_TRACE)
|
||||
PRLogModuleInfo* GetDirectShowLog();
|
||||
#define DIRECTSHOW_LOG(...) MOZ_LOG(GetDirectShowLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define DIRECTSHOW_LOG(...) MOZ_LOG(GetDirectShowLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#define DIRECTSHOW_LOG(...)
|
||||
#endif
|
||||
|
@ -14,13 +14,13 @@ namespace mozilla {
|
||||
|
||||
#ifndef EME_LOG
|
||||
PRLogModuleInfo* GetEMELog();
|
||||
#define EME_LOG(...) MOZ_LOG(GetEMELog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define EME_LOG_ENABLED() MOZ_LOG_TEST(GetEMELog(), mozilla::LogLevel::Debug)
|
||||
#define EME_LOG(...) MOZ_LOG(GetEMELog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#define EME_LOG_ENABLED() PR_LOG_TEST(GetEMELog(), PR_LOG_DEBUG)
|
||||
#endif
|
||||
|
||||
#ifndef EME_VERBOSE_LOG
|
||||
PRLogModuleInfo* GetEMEVerboseLog();
|
||||
#define EME_VERBOSE_LOG(...) MOZ_LOG(GetEMEVerboseLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define EME_VERBOSE_LOG(...) MOZ_LOG(GetEMEVerboseLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#else
|
||||
#ifndef EME_LOG
|
||||
#define EME_LOG(...)
|
||||
|
@ -62,7 +62,7 @@ MediaEncoder::NotifyEvent(MediaStreamGraph* aGraph,
|
||||
MediaStreamListener::MediaStreamGraphEvent event)
|
||||
{
|
||||
// In case that MediaEncoder does not receive a TRACK_EVENT_ENDED event.
|
||||
LOG(LogLevel::Debug, ("NotifyRemoved in [MediaEncoder]."));
|
||||
LOG(PR_LOG_DEBUG, ("NotifyRemoved in [MediaEncoder]."));
|
||||
if (mAudioEncoder) {
|
||||
mAudioEncoder->NotifyEvent(aGraph, event);
|
||||
}
|
||||
@ -87,7 +87,7 @@ MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes)
|
||||
nsRefPtr<MediaEncoder> encoder;
|
||||
nsString mimeType;
|
||||
if (!aTrackTypes) {
|
||||
LOG(LogLevel::Error, ("NO TrackTypes!!!"));
|
||||
LOG(PR_LOG_ERROR, ("NO TrackTypes!!!"));
|
||||
return nullptr;
|
||||
}
|
||||
#ifdef MOZ_WEBM_ENCODER
|
||||
@ -138,10 +138,10 @@ MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes)
|
||||
mimeType = NS_LITERAL_STRING(AUDIO_OGG);
|
||||
}
|
||||
else {
|
||||
LOG(LogLevel::Error, ("Can not find any encoder to record this media stream"));
|
||||
LOG(PR_LOG_ERROR, ("Can not find any encoder to record this media stream"));
|
||||
return nullptr;
|
||||
}
|
||||
LOG(LogLevel::Debug, ("Create encoder result:a[%d] v[%d] w[%d] mimeType = %s.",
|
||||
LOG(PR_LOG_DEBUG, ("Create encoder result:a[%d] v[%d] w[%d] mimeType = %s.",
|
||||
audioEncoder != nullptr, videoEncoder != nullptr,
|
||||
writer != nullptr, mimeType.get()));
|
||||
encoder = new MediaEncoder(writer.forget(), audioEncoder.forget(),
|
||||
@ -187,15 +187,15 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
|
||||
while (reloop) {
|
||||
switch (mState) {
|
||||
case ENCODE_METADDATA: {
|
||||
LOG(LogLevel::Debug, ("ENCODE_METADDATA TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
LOG(PR_LOG_DEBUG, ("ENCODE_METADDATA TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
nsresult rv = CopyMetadataToMuxer(mAudioEncoder.get());
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error, ("Error! Fail to Set Audio Metadata"));
|
||||
LOG(PR_LOG_ERROR, ("Error! Fail to Set Audio Metadata"));
|
||||
break;
|
||||
}
|
||||
rv = CopyMetadataToMuxer(mVideoEncoder.get());
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error, ("Error! Fail to Set Video Metadata"));
|
||||
LOG(PR_LOG_ERROR, ("Error! Fail to Set Video Metadata"));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -205,31 +205,31 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
|
||||
mSizeOfBuffer = aOutputBufs->SizeOfExcludingThis(MallocSizeOf);
|
||||
}
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error,("Error! writer fail to generate header!"));
|
||||
LOG(PR_LOG_ERROR,("Error! writer fail to generate header!"));
|
||||
mState = ENCODE_ERROR;
|
||||
break;
|
||||
}
|
||||
LOG(LogLevel::Debug, ("Finish ENCODE_METADDATA TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
LOG(PR_LOG_DEBUG, ("Finish ENCODE_METADDATA TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
mState = ENCODE_TRACK;
|
||||
break;
|
||||
}
|
||||
|
||||
case ENCODE_TRACK: {
|
||||
LOG(LogLevel::Debug, ("ENCODE_TRACK TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
LOG(PR_LOG_DEBUG, ("ENCODE_TRACK TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
EncodedFrameContainer encodedData;
|
||||
nsresult rv = NS_OK;
|
||||
rv = WriteEncodedDataToMuxer(mAudioEncoder.get());
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error, ("Error! Fail to write audio encoder data to muxer"));
|
||||
LOG(PR_LOG_ERROR, ("Error! Fail to write audio encoder data to muxer"));
|
||||
break;
|
||||
}
|
||||
LOG(LogLevel::Debug, ("Audio encoded TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
LOG(PR_LOG_DEBUG, ("Audio encoded TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
rv = WriteEncodedDataToMuxer(mVideoEncoder.get());
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error, ("Fail to write video encoder data to muxer"));
|
||||
LOG(PR_LOG_ERROR, ("Fail to write video encoder data to muxer"));
|
||||
break;
|
||||
}
|
||||
LOG(LogLevel::Debug, ("Video encoded TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
LOG(PR_LOG_DEBUG, ("Video encoded TimeStamp = %f", GetEncodeTimeStamp()));
|
||||
// In audio only or video only case, let unavailable track's flag to be true.
|
||||
bool isAudioCompleted = (mAudioEncoder && mAudioEncoder->IsEncodingComplete()) || !mAudioEncoder;
|
||||
bool isVideoCompleted = (mVideoEncoder && mVideoEncoder->IsEncodingComplete()) || !mVideoEncoder;
|
||||
@ -244,7 +244,7 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
|
||||
reloop = false;
|
||||
}
|
||||
mState = (mWriter->IsWritingComplete()) ? ENCODE_DONE : ENCODE_TRACK;
|
||||
LOG(LogLevel::Debug, ("END ENCODE_TRACK TimeStamp = %f "
|
||||
LOG(PR_LOG_DEBUG, ("END ENCODE_TRACK TimeStamp = %f "
|
||||
"mState = %d aComplete %d vComplete %d",
|
||||
GetEncodeTimeStamp(), mState, isAudioCompleted, isVideoCompleted));
|
||||
break;
|
||||
@ -252,7 +252,7 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
|
||||
|
||||
case ENCODE_DONE:
|
||||
case ENCODE_ERROR:
|
||||
LOG(LogLevel::Debug, ("MediaEncoder has been shutdown."));
|
||||
LOG(PR_LOG_DEBUG, ("MediaEncoder has been shutdown."));
|
||||
mSizeOfBuffer = 0;
|
||||
mShutdown = true;
|
||||
reloop = false;
|
||||
@ -280,7 +280,7 @@ MediaEncoder::WriteEncodedDataToMuxer(TrackEncoder *aTrackEncoder)
|
||||
nsresult rv = aTrackEncoder->GetEncodedTrack(encodedVideoData);
|
||||
if (NS_FAILED(rv)) {
|
||||
// Encoding might be canceled.
|
||||
LOG(LogLevel::Error, ("Error! Fail to get encoded data from video encoder."));
|
||||
LOG(PR_LOG_ERROR, ("Error! Fail to get encoded data from video encoder."));
|
||||
mState = ENCODE_ERROR;
|
||||
return rv;
|
||||
}
|
||||
@ -288,7 +288,7 @@ MediaEncoder::WriteEncodedDataToMuxer(TrackEncoder *aTrackEncoder)
|
||||
aTrackEncoder->IsEncodingComplete() ?
|
||||
ContainerWriter::END_OF_STREAM : 0);
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error, ("Error! Fail to write encoded video track to the media container."));
|
||||
LOG(PR_LOG_ERROR, ("Error! Fail to write encoded video track to the media container."));
|
||||
mState = ENCODE_ERROR;
|
||||
}
|
||||
return rv;
|
||||
@ -306,14 +306,14 @@ MediaEncoder::CopyMetadataToMuxer(TrackEncoder *aTrackEncoder)
|
||||
|
||||
nsRefPtr<TrackMetadataBase> meta = aTrackEncoder->GetMetadata();
|
||||
if (meta == nullptr) {
|
||||
LOG(LogLevel::Error, ("Error! metadata = null"));
|
||||
LOG(PR_LOG_ERROR, ("Error! metadata = null"));
|
||||
mState = ENCODE_ERROR;
|
||||
return NS_ERROR_ABORT;
|
||||
}
|
||||
|
||||
nsresult rv = mWriter->SetMetadata(meta);
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error, ("Error! SetMetadata fail"));
|
||||
LOG(PR_LOG_ERROR, ("Error! SetMetadata fail"));
|
||||
mState = ENCODE_ERROR;
|
||||
}
|
||||
return rv;
|
||||
|
@ -58,7 +58,7 @@ AudioTrackEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph,
|
||||
// Check and initialize parameters for codec encoder.
|
||||
if (!mInitialized) {
|
||||
mAudioInitCounter++;
|
||||
TRACK_LOG(LogLevel::Debug, ("Init the audio encoder %d times", mAudioInitCounter));
|
||||
TRACK_LOG(PR_LOG_DEBUG, ("Init the audio encoder %d times", mAudioInitCounter));
|
||||
AudioSegment::ChunkIterator iter(const_cast<AudioSegment&>(audio));
|
||||
while (!iter.IsEnded()) {
|
||||
AudioChunk chunk = *iter;
|
||||
@ -184,7 +184,7 @@ VideoTrackEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph,
|
||||
// Check and initialize parameters for codec encoder.
|
||||
if (!mInitialized) {
|
||||
mVideoInitCounter++;
|
||||
TRACK_LOG(LogLevel::Debug, ("Init the video encoder %d times", mVideoInitCounter));
|
||||
TRACK_LOG(PR_LOG_DEBUG, ("Init the video encoder %d times", mVideoInitCounter));
|
||||
VideoSegment::ChunkIterator iter(const_cast<VideoSegment&>(video));
|
||||
while (!iter.IsEnded()) {
|
||||
VideoChunk chunk = *iter;
|
||||
|
@ -16,7 +16,7 @@
|
||||
namespace mozilla {
|
||||
|
||||
PRLogModuleInfo* gVP8TrackEncoderLog;
|
||||
#define VP8LOG(msg, ...) MOZ_LOG(gVP8TrackEncoderLog, mozilla::LogLevel::Debug, \
|
||||
#define VP8LOG(msg, ...) MOZ_LOG(gVP8TrackEncoderLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
// Debug logging macro with object pointer and class name.
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace mozilla {
|
||||
|
||||
#undef LOG
|
||||
PRLogModuleInfo* gVorbisTrackEncoderLog;
|
||||
#define VORBISLOG(msg, ...) MOZ_LOG(gVorbisTrackEncoderLog, mozilla::LogLevel::Debug, \
|
||||
#define VORBISLOG(msg, ...) MOZ_LOG(gVorbisTrackEncoderLog, PR_LOG_DEBUG, \
|
||||
(msg, ##__VA_ARGS__))
|
||||
|
||||
VorbisTrackEncoder::VorbisTrackEncoder()
|
||||
|
@ -40,8 +40,8 @@ PRLogModuleInfo* GetDemuxerLog() {
|
||||
}
|
||||
return log;
|
||||
}
|
||||
#define LOG(arg, ...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define VLOG(arg, ...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define LOG(arg, ...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define VLOG(arg, ...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, ("MP4Reader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
using namespace mp4_demuxer;
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
namespace gmp {
|
||||
|
@ -47,7 +47,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* 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__)
|
||||
#define LOGD(x, ...) LOG(PR_LOG_DEBUG, "GMPChild[pid=%d] " x, (int)base::GetCurrentProcId(), ##__VA_ARGS__)
|
||||
|
||||
namespace gmp {
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
#ifdef __CLASS__
|
||||
|
@ -44,7 +44,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* 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__)
|
||||
#define LOGD(x, ...) LOG(PR_LOG_DEBUG, "GMPParent[%p|childPid=%d] " x, this, mChildPid, ##__VA_ARGS__)
|
||||
|
||||
#ifdef __CLASS__
|
||||
#undef __CLASS__
|
||||
|
@ -52,7 +52,7 @@ GetGMPLog()
|
||||
return sLog;
|
||||
}
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
#ifdef __CLASS__
|
||||
|
@ -20,7 +20,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
#ifdef __CLASS__
|
||||
|
@ -41,7 +41,7 @@ namespace mozilla {
|
||||
#undef LOG
|
||||
#endif
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
#ifdef __CLASS__
|
||||
|
@ -28,7 +28,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
#ifdef __CLASS__
|
||||
|
@ -15,7 +15,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
#ifdef __CLASS__
|
||||
|
@ -23,7 +23,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
namespace gmp {
|
||||
@ -245,7 +245,7 @@ GMPVideoDecoderParent::RecvDecoded(const GMPVideoi420FrameData& aDecodedFrame)
|
||||
}
|
||||
|
||||
if (!GMPVideoi420FrameImpl::CheckFrameData(aDecodedFrame)) {
|
||||
LOG(LogLevel::Error, ("%s: Decoded frame corrupt, ignoring", __FUNCTION__));
|
||||
LOG(PR_LOG_ERROR, ("%s: Decoded frame corrupt, ignoring", __FUNCTION__));
|
||||
return false;
|
||||
}
|
||||
auto f = new GMPVideoi420FrameImpl(aDecodedFrame, &mVideoHost);
|
||||
@ -361,7 +361,7 @@ GMPVideoDecoderParent::AnswerNeedShmem(const uint32_t& aFrameBufferSize,
|
||||
aFrameBufferSize,
|
||||
ipc::SharedMemory::TYPE_BASIC, &mem))
|
||||
{
|
||||
LOG(LogLevel::Error, ("%s: Failed to get a shared mem buffer for Child! size %u",
|
||||
LOG(PR_LOG_ERROR, ("%s: Failed to get a shared mem buffer for Child! size %u",
|
||||
__FUNCTION__, aFrameBufferSize));
|
||||
return false;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ namespace mozilla {
|
||||
|
||||
extern PRLogModuleInfo* GetGMPLog();
|
||||
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
|
||||
#define LOGD(msg) MOZ_LOG(GetGMPLog(), PR_LOG_DEBUG, msg)
|
||||
#define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
|
||||
|
||||
#ifdef __CLASS__
|
||||
@ -352,7 +352,7 @@ GMPVideoEncoderParent::AnswerNeedShmem(const uint32_t& aEncodedBufferSize,
|
||||
aEncodedBufferSize,
|
||||
ipc::SharedMemory::TYPE_BASIC, &mem))
|
||||
{
|
||||
LOG(LogLevel::Error, ("%s::%s: Failed to get a shared mem buffer for Child! size %u",
|
||||
LOG(PR_LOG_ERROR, ("%s::%s: Failed to get a shared mem buffer for Child! size %u",
|
||||
__CLASS__, __FUNCTION__, aEncodedBufferSize));
|
||||
return false;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ nsresult GStreamerReader::Init(MediaDecoderReader* aCloneDonor)
|
||||
mPlayBin = gst_element_factory_make("playbin2", nullptr);
|
||||
#endif
|
||||
if (!mPlayBin) {
|
||||
LOG(LogLevel::Error, "couldn't create playbin");
|
||||
LOG(PR_LOG_ERROR, "couldn't create playbin");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
g_object_set(mPlayBin, "buffer-size", 0, nullptr);
|
||||
@ -294,12 +294,12 @@ void GStreamerReader::PlayBinSourceSetup(GstAppSrc* aSource)
|
||||
/* let the demuxer work in pull mode for local files (or very short files)
|
||||
* so that we get optimal seeking accuracy/performance
|
||||
*/
|
||||
LOG(LogLevel::Debug, "configuring random access, len %lld", resourceLength);
|
||||
LOG(PR_LOG_DEBUG, "configuring random access, len %lld", resourceLength);
|
||||
gst_app_src_set_stream_type(mSource, GST_APP_STREAM_TYPE_RANDOM_ACCESS);
|
||||
} else {
|
||||
/* make the demuxer work in push mode so that seeking is kept to a minimum
|
||||
*/
|
||||
LOG(LogLevel::Debug, "configuring push mode, len %lld", resourceLength);
|
||||
LOG(PR_LOG_DEBUG, "configuring push mode, len %lld", resourceLength);
|
||||
gst_app_src_set_stream_type(mSource, GST_APP_STREAM_TYPE_SEEKABLE);
|
||||
}
|
||||
|
||||
@ -416,9 +416,9 @@ nsresult GStreamerReader::ReadMetadata(MediaInfo* aInfo,
|
||||
gst_object_unref(filter);
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, "starting metadata pipeline");
|
||||
LOG(PR_LOG_DEBUG, "starting metadata pipeline");
|
||||
if (gst_element_set_state(mPlayBin, GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) {
|
||||
LOG(LogLevel::Debug, "metadata pipeline state change failed");
|
||||
LOG(PR_LOG_DEBUG, "metadata pipeline state change failed");
|
||||
ret = NS_ERROR_FAILURE;
|
||||
continue;
|
||||
}
|
||||
@ -429,19 +429,19 @@ nsresult GStreamerReader::ReadMetadata(MediaInfo* aInfo,
|
||||
message = gst_bus_timed_pop_filtered(mBus, GST_CLOCK_TIME_NONE,
|
||||
(GstMessageType)(GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR | GST_MESSAGE_EOS));
|
||||
if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_ASYNC_DONE) {
|
||||
LOG(LogLevel::Debug, "read metadata pipeline prerolled");
|
||||
LOG(PR_LOG_DEBUG, "read metadata pipeline prerolled");
|
||||
gst_message_unref(message);
|
||||
ret = NS_OK;
|
||||
break;
|
||||
} else {
|
||||
LOG(LogLevel::Debug, "read metadata pipeline failed to preroll: %s",
|
||||
LOG(PR_LOG_DEBUG, "read metadata pipeline failed to preroll: %s",
|
||||
gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
|
||||
|
||||
if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_ERROR) {
|
||||
GError* error;
|
||||
gchar* debug;
|
||||
gst_message_parse_error(message, &error, &debug);
|
||||
LOG(LogLevel::Error, "read metadata error: %s: %s", error->message, debug);
|
||||
LOG(PR_LOG_ERROR, "read metadata error: %s: %s", error->message, debug);
|
||||
g_error_free(error);
|
||||
g_free(debug);
|
||||
}
|
||||
@ -471,7 +471,7 @@ nsresult GStreamerReader::ReadMetadata(MediaInfo* aInfo,
|
||||
mLastParserDuration = mMP3FrameParser.GetDuration();
|
||||
mDecoder->SetMediaDuration(mLastParserDuration);
|
||||
} else {
|
||||
LOG(LogLevel::Debug, "querying duration");
|
||||
LOG(PR_LOG_DEBUG, "querying duration");
|
||||
// Otherwise use the gstreamer duration.
|
||||
#if GST_VERSION_MAJOR >= 1
|
||||
if (gst_element_query_duration(GST_ELEMENT(mPlayBin),
|
||||
@ -482,7 +482,7 @@ nsresult GStreamerReader::ReadMetadata(MediaInfo* aInfo,
|
||||
&format, &duration) && format == GST_FORMAT_TIME) {
|
||||
#endif
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
LOG(LogLevel::Debug, "have duration %" GST_TIME_FORMAT, GST_TIME_ARGS(duration));
|
||||
LOG(PR_LOG_DEBUG, "have duration %" GST_TIME_FORMAT, GST_TIME_ARGS(duration));
|
||||
duration = GST_TIME_AS_USECONDS (duration);
|
||||
mDecoder->SetMediaDuration(duration);
|
||||
}
|
||||
@ -614,7 +614,7 @@ nsresult GStreamerReader::ResetDecode()
|
||||
{
|
||||
nsresult res = NS_OK;
|
||||
|
||||
LOG(LogLevel::Debug, "reset decode");
|
||||
LOG(PR_LOG_DEBUG, "reset decode");
|
||||
|
||||
if (NS_FAILED(MediaDecoderReader::ResetDecode())) {
|
||||
res = NS_ERROR_FAILURE;
|
||||
@ -631,7 +631,7 @@ nsresult GStreamerReader::ResetDecode()
|
||||
mConfigureAlignment = true;
|
||||
#endif
|
||||
|
||||
LOG(LogLevel::Debug, "reset decode done");
|
||||
LOG(PR_LOG_DEBUG, "reset decode done");
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -794,7 +794,7 @@ bool GStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip,
|
||||
duration = gst_util_uint64_scale(GST_USECOND, fpsDen, fpsNum);
|
||||
|
||||
if (timestamp < aTimeThreshold) {
|
||||
LOG(LogLevel::Debug, "skipping frame %" GST_TIME_FORMAT
|
||||
LOG(PR_LOG_DEBUG, "skipping frame %" GST_TIME_FORMAT
|
||||
" threshold %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS(timestamp * 1000),
|
||||
GST_TIME_ARGS(aTimeThreshold * 1000));
|
||||
@ -847,7 +847,7 @@ GStreamerReader::Seek(int64_t aTarget, int64_t aEndTime)
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
|
||||
gint64 seekPos = aTarget * GST_USECOND;
|
||||
LOG(LogLevel::Debug, "%p About to seek to %" GST_TIME_FORMAT,
|
||||
LOG(PR_LOG_DEBUG, "%p About to seek to %" GST_TIME_FORMAT,
|
||||
mDecoder, GST_TIME_ARGS(seekPos));
|
||||
|
||||
int flags = GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT;
|
||||
@ -855,14 +855,14 @@ GStreamerReader::Seek(int64_t aTarget, int64_t aEndTime)
|
||||
GST_FORMAT_TIME,
|
||||
static_cast<GstSeekFlags>(flags),
|
||||
seekPos)) {
|
||||
LOG(LogLevel::Error, "seek failed");
|
||||
LOG(PR_LOG_ERROR, "seek failed");
|
||||
return SeekPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
|
||||
}
|
||||
LOG(LogLevel::Debug, "seek succeeded");
|
||||
LOG(PR_LOG_DEBUG, "seek succeeded");
|
||||
GstMessage* message = gst_bus_timed_pop_filtered(mBus, GST_CLOCK_TIME_NONE,
|
||||
(GstMessageType)(GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR));
|
||||
gst_message_unref(message);
|
||||
LOG(LogLevel::Debug, "seek completed");
|
||||
LOG(PR_LOG_DEBUG, "seek completed");
|
||||
|
||||
return SeekPromise::CreateAndResolve(aTarget, __func__);
|
||||
}
|
||||
@ -890,7 +890,7 @@ media::TimeIntervals GStreamerReader::GetBuffered()
|
||||
duration = mDecoder->GetMediaDuration();
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, "complete range [0, %f] for [0, %li]",
|
||||
LOG(PR_LOG_DEBUG, "complete range [0, %f] for [0, %li]",
|
||||
(double) duration / GST_MSECOND, GetDataLength());
|
||||
buffered +=
|
||||
media::TimeInterval(media::TimeUnit::FromMicroseconds(0),
|
||||
@ -919,7 +919,7 @@ media::TimeIntervals GStreamerReader::GetBuffered()
|
||||
continue;
|
||||
#endif
|
||||
|
||||
LOG(LogLevel::Debug, "adding range [%f, %f] for [%li %li] size %li",
|
||||
LOG(PR_LOG_DEBUG, "adding range [%f, %f] for [%li %li] size %li",
|
||||
(double) GST_TIME_AS_USECONDS (startTime) / GST_MSECOND,
|
||||
(double) GST_TIME_AS_USECONDS (endTime) / GST_MSECOND,
|
||||
startOffset, endOffset, GetDataLength());
|
||||
@ -969,16 +969,16 @@ void GStreamerReader::ReadAndPushData(guint aLength)
|
||||
|
||||
GstFlowReturn ret = gst_app_src_push_buffer(mSource, gst_buffer_ref(buffer));
|
||||
if (ret != GST_FLOW_OK) {
|
||||
LOG(LogLevel::Error, "ReadAndPushData push ret %s(%d)", gst_flow_get_name(ret), ret);
|
||||
LOG(PR_LOG_ERROR, "ReadAndPushData push ret %s(%d)", gst_flow_get_name(ret), ret);
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
/* Terminate the stream if there is an error in reading */
|
||||
LOG(LogLevel::Error, "ReadAndPushData read error, rv=%x", rv);
|
||||
LOG(PR_LOG_ERROR, "ReadAndPushData read error, rv=%x", rv);
|
||||
gst_app_src_end_of_stream(mSource);
|
||||
} else if (bytesRead < aLength) {
|
||||
/* If we read less than what we wanted, we reached the end */
|
||||
LOG(LogLevel::Warning, "ReadAndPushData read underflow, "
|
||||
LOG(PR_LOG_WARNING, "ReadAndPushData read underflow, "
|
||||
"bytesRead=%u, aLength=%u, offset(%lld,%lld)",
|
||||
bytesRead, aLength, offset1, offset2);
|
||||
gst_app_src_end_of_stream(mSource);
|
||||
@ -1047,7 +1047,7 @@ gboolean GStreamerReader::SeekData(GstAppSrc* aSrc, guint64 aOffset)
|
||||
}
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG(LogLevel::Error, "seek at %lu failed", aOffset);
|
||||
LOG(PR_LOG_ERROR, "seek at %lu failed", aOffset);
|
||||
} else {
|
||||
MOZ_ASSERT(aOffset == static_cast<guint64>(resource->Tell()));
|
||||
}
|
||||
@ -1070,7 +1070,7 @@ GstFlowReturn GStreamerReader::NewPrerollCb(GstAppSink* aSink,
|
||||
void GStreamerReader::AudioPreroll()
|
||||
{
|
||||
/* The first audio buffer has reached the audio sink. Get rate and channels */
|
||||
LOG(LogLevel::Debug, "Audio preroll");
|
||||
LOG(PR_LOG_DEBUG, "Audio preroll");
|
||||
GstPad* sinkpad = gst_element_get_static_pad(GST_ELEMENT(mAudioAppSink), "sink");
|
||||
#if GST_VERSION_MAJOR >= 1
|
||||
GstCaps *caps = gst_pad_get_current_caps(sinkpad);
|
||||
@ -1092,7 +1092,7 @@ void GStreamerReader::AudioPreroll()
|
||||
void GStreamerReader::VideoPreroll()
|
||||
{
|
||||
/* The first video buffer has reached the video sink. Get width and height */
|
||||
LOG(LogLevel::Debug, "Video preroll");
|
||||
LOG(PR_LOG_DEBUG, "Video preroll");
|
||||
GstPad* sinkpad = gst_element_get_static_pad(GST_ELEMENT(mVideoAppSink), "sink");
|
||||
int PARNumerator, PARDenominator;
|
||||
#if GST_VERSION_MAJOR >= 1
|
||||
@ -1126,7 +1126,7 @@ void GStreamerReader::VideoPreroll()
|
||||
gst_structure_get_fraction(structure, "framerate", &fpsNum, &fpsDen);
|
||||
mInfo.mVideo.mDisplay = displaySize;
|
||||
} else {
|
||||
LOG(LogLevel::Debug, "invalid video region");
|
||||
LOG(PR_LOG_DEBUG, "invalid video region");
|
||||
Eos();
|
||||
}
|
||||
gst_caps_unref(caps);
|
||||
@ -1360,7 +1360,7 @@ GstPadProbeReturn GStreamerReader::EventProbe(GstPad *aPad, GstEvent *aEvent)
|
||||
{
|
||||
GstElement* parent = GST_ELEMENT(gst_pad_get_parent(aPad));
|
||||
|
||||
LOG(LogLevel::Debug, "event probe %s", GST_EVENT_TYPE_NAME (aEvent));
|
||||
LOG(PR_LOG_DEBUG, "event probe %s", GST_EVENT_TYPE_NAME (aEvent));
|
||||
|
||||
switch(GST_EVENT_TYPE(aEvent)) {
|
||||
case GST_EVENT_SEGMENT:
|
||||
|
@ -15,7 +15,7 @@ namespace mozilla {
|
||||
|
||||
#ifndef IC_LOG
|
||||
PRLogModuleInfo* GetICLog();
|
||||
#define IC_LOG(...) MOZ_LOG(GetICLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define IC_LOG(...) MOZ_LOG(GetICLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#endif
|
||||
|
||||
namespace dom {
|
||||
|
@ -26,7 +26,7 @@ extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
#define MSE_DEBUG(name, arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, (TOSTRING(name) "(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(name, arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, (TOSTRING(name) "(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -57,8 +57,8 @@ PRLogModuleInfo* GetMediaSourceAPILog()
|
||||
return sLogModule;
|
||||
}
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), mozilla::LogLevel::Debug, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("MediaSource(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
// Arbitrary limit.
|
||||
static const unsigned int MAX_SOURCE_BUFFERS = 16;
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
extern PRLogModuleInfo* 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__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceDecoder(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Verbose, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("MediaSourceReader(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
// 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
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("MediaSourceResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("MediaSourceResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
#define UNIMPLEMENTED() MSE_DEBUG("UNIMPLEMENTED FUNCTION at %s:%d", __FILE__, __LINE__)
|
||||
|
||||
|
@ -15,8 +15,8 @@ extern PRLogModuleInfo* GetSourceBufferResourceLog();
|
||||
#define __func__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
#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__))
|
||||
#define SBR_DEBUG(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define SBR_DEBUGV(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("ResourceQueue(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -29,9 +29,9 @@ class JSObject;
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern PRLogModuleInfo* 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__))
|
||||
#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), mozilla::LogLevel::Debug, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUGV(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG + 1, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -16,7 +16,7 @@ extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
#define __func__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("SourceBufferDecoder(%p:%s)::%s: " arg, this, mResource->GetContentType().get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferDecoder(%p:%s)::%s: " arg, this, mResource->GetContentType().get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
extern PRLogModuleInfo* 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__))
|
||||
#define MSE_API(arg, ...) MOZ_LOG(GetMediaSourceAPILog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("SourceBufferList(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
|
||||
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
|
@ -22,8 +22,8 @@ PRLogModuleInfo* GetSourceBufferResourceLog()
|
||||
return sLogModule;
|
||||
}
|
||||
|
||||
#define SBR_DEBUG(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), mozilla::LogLevel::Debug, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define SBR_DEBUGV(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), mozilla::LogLevel::Verbose, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define SBR_DEBUG(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define SBR_DEBUGV(arg, ...) MOZ_LOG(GetSourceBufferResourceLog(), PR_LOG_DEBUG+1, ("SourceBufferResource(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
extern PRLogModuleInfo* GetMediaSourceLog();
|
||||
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, ("TrackBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
#define MSE_DEBUG(arg, ...) MOZ_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, ("TrackBuffer(%p:%s)::%s: " arg, this, mType.get(), __func__, ##__VA_ARGS__))
|
||||
|
||||
// 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
|
||||
|
@ -117,18 +117,18 @@ bool OggCodecState::AddVorbisComment(MetadataTags* aTags,
|
||||
{
|
||||
const char* div = (const char*)memchr(aComment, '=', aLength);
|
||||
if (!div) {
|
||||
LOG(LogLevel::Debug, ("Skipping comment: no separator"));
|
||||
LOG(PR_LOG_DEBUG, ("Skipping comment: no separator"));
|
||||
return false;
|
||||
}
|
||||
nsCString key = nsCString(aComment, div-aComment);
|
||||
if (!IsValidVorbisTagName(key)) {
|
||||
LOG(LogLevel::Debug, ("Skipping comment: invalid tag name"));
|
||||
LOG(PR_LOG_DEBUG, ("Skipping comment: invalid tag name"));
|
||||
return false;
|
||||
}
|
||||
uint32_t valueLength = aLength - (div-aComment);
|
||||
nsCString value = nsCString(div + 1, valueLength);
|
||||
if (!IsUTF8(value)) {
|
||||
LOG(LogLevel::Debug, ("Skipping comment: invalid UTF-8 in value"));
|
||||
LOG(PR_LOG_DEBUG, ("Skipping comment: invalid UTF-8 in value"));
|
||||
return false;
|
||||
}
|
||||
aTags->Put(key, value);
|
||||
@ -835,7 +835,7 @@ nsresult OpusState::Reset(bool aStart)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("Opus decoder reset, to skip %d", mSkip));
|
||||
LOG(PR_LOG_DEBUG, ("Opus decoder reset, to skip %d", mSkip));
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -858,7 +858,7 @@ bool OpusState::Init(void)
|
||||
|
||||
mSkip = mParser->mPreSkip;
|
||||
|
||||
LOG(LogLevel::Debug, ("Opus decoder init, to skip %d", mSkip));
|
||||
LOG(PR_LOG_DEBUG, ("Opus decoder init, to skip %d", mSkip));
|
||||
|
||||
return error == OPUS_OK;
|
||||
}
|
||||
@ -1187,7 +1187,7 @@ bool SkeletonState::DecodeIndex(ogg_packet* aPacket)
|
||||
|
||||
int64_t timeDenom = LittleEndian::readInt64(aPacket->packet + INDEX_TIME_DENOM_OFFSET);
|
||||
if (timeDenom == 0) {
|
||||
LOG(LogLevel::Debug, ("Ogg Skeleton Index packet for stream %u has 0 "
|
||||
LOG(PR_LOG_DEBUG, ("Ogg Skeleton Index packet for stream %u has 0 "
|
||||
"timestamp denominator.", serialno));
|
||||
return (mActive = false);
|
||||
}
|
||||
@ -1230,7 +1230,7 @@ bool SkeletonState::DecodeIndex(ogg_packet* aPacket)
|
||||
// possibly contain as many packets as it claims to, so the numKeyPoints
|
||||
// field is possibly malicious. Don't try decoding this index, we may run
|
||||
// out of memory.
|
||||
LOG(LogLevel::Debug, ("Possibly malicious number of key points reported "
|
||||
LOG(PR_LOG_DEBUG, ("Possibly malicious number of key points reported "
|
||||
"(%lld) in index packet for stream %u.",
|
||||
numKeyPoints,
|
||||
serialno));
|
||||
@ -1278,7 +1278,7 @@ bool SkeletonState::DecodeIndex(ogg_packet* aPacket)
|
||||
mIndex.Put(serialno, keyPoints.forget());
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("Loaded %d keypoints for Skeleton on stream %u",
|
||||
LOG(PR_LOG_DEBUG, ("Loaded %d keypoints for Skeleton on stream %u",
|
||||
keyPointsRead, serialno));
|
||||
return true;
|
||||
}
|
||||
@ -1342,7 +1342,7 @@ nsresult SkeletonState::IndexedSeekTarget(int64_t aTarget,
|
||||
if (r.IsNull()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
LOG(LogLevel::Debug, ("Indexed seek target for time %lld is offset %lld",
|
||||
LOG(PR_LOG_DEBUG, ("Indexed seek target for time %lld is offset %lld",
|
||||
aTarget, r.mKeyPoint.mOffset));
|
||||
aResult = r;
|
||||
return NS_OK;
|
||||
@ -1482,7 +1482,7 @@ bool SkeletonState::DecodeHeader(ogg_packet* aPacket)
|
||||
// Extract the segment length.
|
||||
mLength = LittleEndian::readInt64(aPacket->packet + SKELETON_FILE_LENGTH_OFFSET);
|
||||
|
||||
LOG(LogLevel::Debug, ("Skeleton segment length: %lld", mLength));
|
||||
LOG(PR_LOG_DEBUG, ("Skeleton segment length: %lld", mLength));
|
||||
|
||||
// Initialize the serialno-to-index map.
|
||||
return true;
|
||||
|
@ -291,7 +291,7 @@ void OggReader::SetupTargetSkeleton(SkeletonState* aSkeletonState)
|
||||
if (NS_SUCCEEDED(aSkeletonState->GetDuration(tracks, duration))) {
|
||||
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||
mDecoder->SetMediaDuration(duration);
|
||||
LOG(LogLevel::Debug, ("Got duration from Skeleton index %lld", duration));
|
||||
LOG(PR_LOG_DEBUG, ("Got duration from Skeleton index %lld", duration));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -492,7 +492,7 @@ nsresult OggReader::ReadMetadata(MediaInfo* aInfo,
|
||||
}
|
||||
if (endTime != -1) {
|
||||
mDecoder->SetMediaEndTime(endTime);
|
||||
LOG(LogLevel::Debug, ("Got Ogg duration from seeking to end %lld", endTime));
|
||||
LOG(PR_LOG_DEBUG, ("Got Ogg duration from seeking to end %lld", endTime));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -613,7 +613,7 @@ nsresult OggReader::DecodeOpus(ogg_packet* aPacket) {
|
||||
if (skipFrames == frames) {
|
||||
// discard the whole packet
|
||||
mOpusState->mSkip -= frames;
|
||||
LOG(LogLevel::Debug, ("Opus decoder skipping %d frames"
|
||||
LOG(PR_LOG_DEBUG, ("Opus decoder skipping %d frames"
|
||||
" (whole packet)", frames));
|
||||
return NS_OK;
|
||||
}
|
||||
@ -628,7 +628,7 @@ nsresult OggReader::DecodeOpus(ogg_packet* aPacket) {
|
||||
buffer = trimBuffer;
|
||||
|
||||
mOpusState->mSkip -= skipFrames;
|
||||
LOG(LogLevel::Debug, ("Opus decoder skipping %d frames", skipFrames));
|
||||
LOG(PR_LOG_DEBUG, ("Opus decoder skipping %d frames", skipFrames));
|
||||
}
|
||||
// Save this packet's granule position in case we need to perform end
|
||||
// trimming on the next packet.
|
||||
@ -659,7 +659,7 @@ nsresult OggReader::DecodeOpus(ogg_packet* aPacket) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, ("Opus decoder pushing %d frames", frames));
|
||||
LOG(PR_LOG_DEBUG, ("Opus decoder pushing %d frames", frames));
|
||||
int64_t startTime = mOpusState->Time(startFrame);
|
||||
int64_t endTime = mOpusState->Time(endFrame);
|
||||
mAudioQueue.Push(new AudioData(mDecoder->GetResource()->Tell(),
|
||||
@ -787,7 +787,7 @@ bool OggReader::ReadOggChain()
|
||||
(mVorbisState->mInfo.channels == newVorbisState->mInfo.channels)) {
|
||||
|
||||
SetupTargetVorbis(newVorbisState);
|
||||
LOG(LogLevel::Debug, ("New vorbis ogg link, serial=%d\n", mVorbisSerial));
|
||||
LOG(PR_LOG_DEBUG, ("New vorbis ogg link, serial=%d\n", mVorbisSerial));
|
||||
|
||||
if (msgInfo) {
|
||||
InitTrack(TrackInfo::kAudioTrack, msgInfo, &mInfo.mAudio, true);
|
||||
@ -1292,7 +1292,7 @@ OggReader::IndexedSeekResult OggReader::SeekToKeyframeUsingIndex(int64_t aTarget
|
||||
// Index must be invalid.
|
||||
return RollbackIndexedSeek(tell);
|
||||
}
|
||||
LOG(LogLevel::Debug, ("Seeking using index to keyframe at offset %lld\n",
|
||||
LOG(PR_LOG_DEBUG, ("Seeking using index to keyframe at offset %lld\n",
|
||||
keyframe.mKeyPoint.mOffset));
|
||||
nsresult res = resource->Seek(nsISeekableStream::NS_SEEK_SET,
|
||||
keyframe.mKeyPoint.mOffset);
|
||||
@ -1315,7 +1315,7 @@ OggReader::IndexedSeekResult OggReader::SeekToKeyframeUsingIndex(int64_t aTarget
|
||||
skippedBytes);
|
||||
NS_ENSURE_TRUE(syncres != PAGE_SYNC_ERROR, SEEK_FATAL_ERROR);
|
||||
if (syncres != PAGE_SYNC_OK || skippedBytes != 0) {
|
||||
LOG(LogLevel::Debug, ("Indexed-seek failure: Ogg Skeleton Index is invalid "
|
||||
LOG(PR_LOG_DEBUG, ("Indexed-seek failure: Ogg Skeleton Index is invalid "
|
||||
"or sync error after seek"));
|
||||
return RollbackIndexedSeek(tell);
|
||||
}
|
||||
@ -1344,7 +1344,7 @@ nsresult OggReader::SeekInBufferedRange(int64_t aTarget,
|
||||
const nsTArray<SeekRange>& aRanges,
|
||||
const SeekRange& aRange)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("%p Seeking in buffered data to %lld using bisection search", mDecoder, aTarget));
|
||||
LOG(PR_LOG_DEBUG, ("%p Seeking in buffered data to %lld using bisection search", mDecoder, aTarget));
|
||||
nsresult res = NS_OK;
|
||||
if (HasVideo() || aAdjustedTarget >= aTarget) {
|
||||
// We know the exact byte range in which the target must lie. It must
|
||||
@ -1377,7 +1377,7 @@ nsresult OggReader::SeekInBufferedRange(int64_t aTarget,
|
||||
int shift = mTheoraState->mInfo.keyframe_granule_shift;
|
||||
int64_t keyframeGranulepos = (video->mTimecode >> shift) << shift;
|
||||
int64_t keyframeTime = mTheoraState->StartTime(keyframeGranulepos);
|
||||
SEEK_LOG(LogLevel::Debug, ("Keyframe for %lld is at %lld, seeking back to it",
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Keyframe for %lld is at %lld, seeking back to it",
|
||||
video->mTime, keyframeTime));
|
||||
aAdjustedTarget = std::min(aAdjustedTarget, keyframeTime);
|
||||
}
|
||||
@ -1398,7 +1398,7 @@ nsresult OggReader::SeekInUnbuffered(int64_t aTarget,
|
||||
int64_t aEndTime,
|
||||
const nsTArray<SeekRange>& aRanges)
|
||||
{
|
||||
LOG(LogLevel::Debug, ("%p Seeking in unbuffered data to %lld using bisection search", mDecoder, aTarget));
|
||||
LOG(PR_LOG_DEBUG, ("%p Seeking in unbuffered data to %lld using bisection search", mDecoder, aTarget));
|
||||
|
||||
// If we've got an active Theora bitstream, determine the maximum possible
|
||||
// time in usecs which a keyframe could be before a given interframe. We
|
||||
@ -1443,7 +1443,7 @@ nsresult OggReader::SeekInternal(int64_t aTarget, int64_t aEndTime)
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
if (mIsChained)
|
||||
return NS_ERROR_FAILURE;
|
||||
LOG(LogLevel::Debug, ("%p About to seek to %lld", mDecoder, aTarget));
|
||||
LOG(PR_LOG_DEBUG, ("%p About to seek to %lld", mDecoder, aTarget));
|
||||
nsresult res;
|
||||
MediaResource* resource = mDecoder->GetResource();
|
||||
NS_ENSURE_TRUE(resource != nullptr, NS_ERROR_FAILURE);
|
||||
@ -1657,7 +1657,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
// Our interval is empty, we've found the optimal seek point, as the
|
||||
// page at the start offset is before the seek target, and the page
|
||||
// at the end offset is after the seek target.
|
||||
SEEK_LOG(LogLevel::Debug, ("Interval narrowed, terminating bisection."));
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Interval narrowed, terminating bisection."));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1672,7 +1672,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
// probably because we ran out of data to decode. This usually happens
|
||||
// when we guess very close to the end offset. So reduce the guess
|
||||
// offset using an exponential backoff until we determine the time.
|
||||
SEEK_LOG(LogLevel::Debug, ("Backing off %d bytes, backsteps=%d",
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Backing off %d bytes, backsteps=%d",
|
||||
static_cast<int32_t>(PAGE_STEP * pow(2.0, backsteps)), backsteps));
|
||||
guess -= PAGE_STEP * static_cast<ogg_int64_t>(pow(2.0, backsteps));
|
||||
|
||||
@ -1695,7 +1695,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
}
|
||||
guess = std::max(guess, startOffset + startLength);
|
||||
|
||||
SEEK_LOG(LogLevel::Debug, ("Seek loop start[o=%lld..%lld t=%lld] "
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Seek loop start[o=%lld..%lld t=%lld] "
|
||||
"end[o=%lld t=%lld] "
|
||||
"interval=%lld target=%lf guess=%lld",
|
||||
startOffset, (startOffset+startLength), startTime,
|
||||
@ -1725,7 +1725,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
// page. Backoff exponentially from the end point, in case the last
|
||||
// page/frame/sample is huge.
|
||||
mustBackoff = true;
|
||||
SEEK_LOG(LogLevel::Debug, ("Hit the end of range, backing off"));
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Hit the end of range, backing off"));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1808,7 +1808,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
if (interval == 0) {
|
||||
// Seek termination condition; we've found the page boundary of the
|
||||
// last page before the target, and the first page after the target.
|
||||
SEEK_LOG(LogLevel::Debug, ("Terminating seek at offset=%lld", startOffset));
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Terminating seek at offset=%lld", startOffset));
|
||||
NS_ASSERTION(startTime < aTarget, "Start time must always be less than target");
|
||||
res = resource->Seek(nsISeekableStream::NS_SEEK_SET, startOffset);
|
||||
NS_ENSURE_SUCCESS(res,res);
|
||||
@ -1818,7 +1818,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
break;
|
||||
}
|
||||
|
||||
SEEK_LOG(LogLevel::Debug, ("Time at offset %lld is %lld", guess, granuleTime));
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Time at offset %lld is %lld", guess, granuleTime));
|
||||
if (granuleTime < seekTarget && granuleTime > seekLowerBound) {
|
||||
// We're within the fuzzy region in which we want to terminate the search.
|
||||
res = resource->Seek(nsISeekableStream::NS_SEEK_SET, pageOffset);
|
||||
@ -1826,7 +1826,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
if (NS_FAILED(ResetDecode())) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
SEEK_LOG(LogLevel::Debug, ("Terminating seek at offset=%lld", pageOffset));
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Terminating seek at offset=%lld", pageOffset));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1847,7 +1847,7 @@ nsresult OggReader::SeekBisection(int64_t aTarget,
|
||||
NS_ASSERTION(endTime >= seekTarget, "End must be after seek target");
|
||||
}
|
||||
|
||||
SEEK_LOG(LogLevel::Debug, ("Seek complete in %d bisections.", hops));
|
||||
SEEK_LOG(PR_LOG_DEBUG, ("Seek complete in %d bisections.", hops));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1984,14 +1984,14 @@ VideoData* OggReader::FindStartTime(int64_t& aOutStartTime)
|
||||
videoData = DecodeToFirstVideoData();
|
||||
if (videoData) {
|
||||
videoStartTime = videoData->mTime;
|
||||
LOG(LogLevel::Debug, ("OggReader::FindStartTime() video=%lld", videoStartTime));
|
||||
LOG(PR_LOG_DEBUG, ("OggReader::FindStartTime() video=%lld", videoStartTime));
|
||||
}
|
||||
}
|
||||
if (HasAudio()) {
|
||||
AudioData* audioData = DecodeToFirstAudioData();
|
||||
if (audioData) {
|
||||
audioStartTime = audioData->mTime;
|
||||
LOG(LogLevel::Debug, ("OggReader::FindStartTime() audio=%lld", audioStartTime));
|
||||
LOG(PR_LOG_DEBUG, ("OggReader::FindStartTime() audio=%lld", audioStartTime));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ OpusParser::OpusParser():
|
||||
bool OpusParser::DecodeHeader(unsigned char* aData, size_t aLength)
|
||||
{
|
||||
if (aLength < 19 || memcmp(aData, "OpusHead", 8)) {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: unrecognized header"));
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: unrecognized header"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -54,13 +54,13 @@ bool OpusParser::DecodeHeader(unsigned char* aData, size_t aLength)
|
||||
int version = aData[8];
|
||||
// Accept file format versions 0.x.
|
||||
if ((version & 0xf0) != 0) {
|
||||
OPUS_LOG(LogLevel::Debug, ("Rejecting unknown Opus file version %d", version));
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Rejecting unknown Opus file version %d", version));
|
||||
return false;
|
||||
}
|
||||
|
||||
mChannels = aData[9];
|
||||
if (mChannels<1) {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: Number of channels %d", mChannels));
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: Number of channels %d", mChannels));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ bool OpusParser::DecodeHeader(unsigned char* aData, size_t aLength)
|
||||
if (mChannelMapping == 0) {
|
||||
// Mapping family 0 only allows two channels
|
||||
if (mChannels>2) {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: too many channels (%d) for"
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: too many channels (%d) for"
|
||||
" mapping family 0.", mChannels));
|
||||
return false;
|
||||
}
|
||||
@ -89,7 +89,7 @@ bool OpusParser::DecodeHeader(unsigned char* aData, size_t aLength)
|
||||
} else if (mChannelMapping == 1) {
|
||||
// Currently only up to 8 channels are defined for mapping family 1
|
||||
if (mChannels>8) {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: too many channels (%d) for"
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: too many channels (%d) for"
|
||||
" mapping family 1.", mChannels));
|
||||
return false;
|
||||
}
|
||||
@ -100,34 +100,34 @@ bool OpusParser::DecodeHeader(unsigned char* aData, size_t aLength)
|
||||
for (i=0; i<mChannels; i++)
|
||||
mMappingTable[i] = aData[21+i];
|
||||
} else {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: channel mapping %d,"
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: channel mapping %d,"
|
||||
" but no channel mapping table", mChannelMapping));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: unsupported channel mapping "
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: unsupported channel mapping "
|
||||
"family %d", mChannelMapping));
|
||||
return false;
|
||||
}
|
||||
if (mStreams < 1) {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: no streams"));
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: no streams"));
|
||||
return false;
|
||||
}
|
||||
if (mCoupledStreams > mStreams) {
|
||||
OPUS_LOG(LogLevel::Debug, ("Invalid Opus file: more coupled streams (%d) than "
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Invalid Opus file: more coupled streams (%d) than "
|
||||
"total streams (%d)", mCoupledStreams, mStreams));
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
OPUS_LOG(LogLevel::Debug, ("Opus stream header:"));
|
||||
OPUS_LOG(LogLevel::Debug, (" channels: %d", mChannels));
|
||||
OPUS_LOG(LogLevel::Debug, (" preskip: %d", mPreSkip));
|
||||
OPUS_LOG(LogLevel::Debug, (" original: %d Hz", mNominalRate));
|
||||
OPUS_LOG(LogLevel::Debug, (" gain: %.2f dB", gain_dB));
|
||||
OPUS_LOG(LogLevel::Debug, ("Channel Mapping:"));
|
||||
OPUS_LOG(LogLevel::Debug, (" family: %d", mChannelMapping));
|
||||
OPUS_LOG(LogLevel::Debug, (" streams: %d", mStreams));
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Opus stream header:"));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" channels: %d", mChannels));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" preskip: %d", mPreSkip));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" original: %d Hz", mNominalRate));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" gain: %.2f dB", gain_dB));
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Channel Mapping:"));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" family: %d", mChannelMapping));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" streams: %d", mStreams));
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
@ -180,10 +180,10 @@ bool OpusParser::DecodeTags(unsigned char* aData, size_t aLength)
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
OPUS_LOG(LogLevel::Debug, ("Opus metadata header:"));
|
||||
OPUS_LOG(LogLevel::Debug, (" vendor: %s", mVendorString.get()));
|
||||
OPUS_LOG(PR_LOG_DEBUG, ("Opus metadata header:"));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" vendor: %s", mVendorString.get()));
|
||||
for (uint32_t i = 0; i < mTags.Length(); i++) {
|
||||
OPUS_LOG(LogLevel::Debug, (" %s", mTags[i].get()));
|
||||
OPUS_LOG(PR_LOG_DEBUG, (" %s", mTags[i].get()));
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
|
@ -135,7 +135,7 @@ status_t AudioOffloadPlayer::Start(bool aSourceAlreadyStarted)
|
||||
}
|
||||
|
||||
if (mapMimeToAudioFormat(audioFormat, mime) != OK) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Error, ("Couldn't map mime type \"%s\" to a valid "
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_ERROR, ("Couldn't map mime type \"%s\" to a valid "
|
||||
"AudioSystem::audio_format", mime));
|
||||
audioFormat = AUDIO_FORMAT_INVALID;
|
||||
}
|
||||
@ -149,7 +149,7 @@ status_t AudioOffloadPlayer::Start(bool aSourceAlreadyStarted)
|
||||
offloadInfo.has_video = false;
|
||||
offloadInfo.is_streaming = false;
|
||||
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("isOffloadSupported: SR=%u, CM=0x%x, "
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("isOffloadSupported: SR=%u, CM=0x%x, "
|
||||
"Format=0x%x, StreamType=%d, BitRate=%u, duration=%lld us, has_video=%d",
|
||||
offloadInfo.sample_rate, offloadInfo.channel_mask, offloadInfo.format,
|
||||
offloadInfo.stream_type, offloadInfo.bit_rate, offloadInfo.duration_us,
|
||||
@ -210,7 +210,7 @@ status_t AudioOffloadPlayer::ChangeState(MediaDecoder::PlayState aState)
|
||||
|
||||
static void ResetCallback(nsITimer* aTimer, void* aClosure)
|
||||
{
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("%s", __FUNCTION__));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("%s", __FUNCTION__));
|
||||
AudioOffloadPlayer* player = static_cast<AudioOffloadPlayer*>(aClosure);
|
||||
if (player) {
|
||||
player->Reset();
|
||||
@ -291,7 +291,7 @@ void AudioOffloadPlayer::Reset()
|
||||
|
||||
CHECK(mAudioSink.get());
|
||||
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("reset: mPlaying=%d mReachedEOS=%d",
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("reset: mPlaying=%d mReachedEOS=%d",
|
||||
mPlaying, mReachedEOS));
|
||||
|
||||
mAudioSink->Stop();
|
||||
@ -313,7 +313,7 @@ void AudioOffloadPlayer::Reset()
|
||||
// source is able to stop().
|
||||
|
||||
if (mInputBuffer) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Releasing input buffer"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Releasing input buffer"));
|
||||
|
||||
mInputBuffer->release();
|
||||
mInputBuffer = nullptr;
|
||||
@ -349,7 +349,7 @@ status_t AudioOffloadPlayer::DoSeek()
|
||||
MOZ_ASSERT(mSeekTarget.IsValid());
|
||||
CHECK(mAudioSink.get());
|
||||
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("DoSeek ( %lld )", mSeekTarget.mTime));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("DoSeek ( %lld )", mSeekTarget.mTime));
|
||||
|
||||
mReachedEOS = false;
|
||||
mPositionTimeMediaUs = -1;
|
||||
@ -375,7 +375,7 @@ status_t AudioOffloadPlayer::DoSeek()
|
||||
}
|
||||
|
||||
if (!mSeekPromise.IsEmpty()) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Fake seek complete during pause"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Fake seek complete during pause"));
|
||||
// We do not reset mSeekTarget here.
|
||||
MediaDecoder::SeekResolveValue val(mReachedEOS, mSeekTarget.mEventVisibility);
|
||||
mSeekPromise.Resolve(val, __func__);
|
||||
@ -468,23 +468,23 @@ size_t AudioOffloadPlayer::AudioSinkCallback(GonkAudioSink* aAudioSink,
|
||||
switch (aEvent) {
|
||||
|
||||
case GonkAudioSink::CB_EVENT_FILL_BUFFER:
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Notify Audio position changed"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Notify Audio position changed"));
|
||||
me->NotifyPositionChanged();
|
||||
return me->FillBuffer(aBuffer, aSize);
|
||||
|
||||
case GonkAudioSink::CB_EVENT_STREAM_END:
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Notify Audio EOS"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Notify Audio EOS"));
|
||||
me->mReachedEOS = true;
|
||||
me->NotifyAudioEOS();
|
||||
break;
|
||||
|
||||
case GonkAudioSink::CB_EVENT_TEAR_DOWN:
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Notify Tear down event"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Notify Tear down event"));
|
||||
me->NotifyAudioTearDown();
|
||||
break;
|
||||
|
||||
default:
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Error, ("Unknown event %d from audio sink",
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_ERROR, ("Unknown event %d from audio sink",
|
||||
aEvent));
|
||||
break;
|
||||
}
|
||||
@ -532,7 +532,7 @@ size_t AudioOffloadPlayer::FillBuffer(void* aData, size_t aSize)
|
||||
if (mSeekTarget.IsValid()) {
|
||||
mSeekTarget.Reset();
|
||||
}
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Error, ("Error while reading media source %d "
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_ERROR, ("Error while reading media source %d "
|
||||
"Ok to receive EOS error at end", err));
|
||||
if (!mReachedEOS) {
|
||||
// After seek there is a possible race condition if
|
||||
@ -544,8 +544,8 @@ size_t AudioOffloadPlayer::FillBuffer(void* aData, size_t aSize)
|
||||
// there will be an unnecessary call to the parser
|
||||
// after parser signalled EOS.
|
||||
if (sizeDone > 0) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("send Partial buffer down"));
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("skip calling stop till next"
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("send Partial buffer down"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("skip calling stop till next"
|
||||
" fillBuffer"));
|
||||
break;
|
||||
}
|
||||
@ -565,12 +565,12 @@ size_t AudioOffloadPlayer::FillBuffer(void* aData, size_t aSize)
|
||||
MOZ_ASSERT(mSeekTarget.IsValid());
|
||||
mSeekTarget.Reset();
|
||||
if (!mSeekPromise.IsEmpty()) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("FillBuffer posting SEEK_COMPLETE"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("FillBuffer posting SEEK_COMPLETE"));
|
||||
MediaDecoder::SeekResolveValue val(mReachedEOS, mSeekTarget.mEventVisibility);
|
||||
mSeekPromise.Resolve(val, __func__);
|
||||
}
|
||||
} else if (mSeekTarget.IsValid()) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("seek is updated during unlocking mLock"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("seek is updated during unlocking mLock"));
|
||||
}
|
||||
|
||||
if (refreshSeekTime) {
|
||||
@ -579,7 +579,7 @@ size_t AudioOffloadPlayer::FillBuffer(void* aData, size_t aSize)
|
||||
// need to adjust the mStartPosUs for offload decoding since parser
|
||||
// might not be able to get the exact seek time requested.
|
||||
mStartPosUs = mPositionTimeMediaUs;
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Adjust seek time to: %.2f",
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Adjust seek time to: %.2f",
|
||||
mStartPosUs / 1E6));
|
||||
}
|
||||
}
|
||||
@ -613,7 +613,7 @@ void AudioOffloadPlayer::SetElementVisibility(bool aIsVisible)
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mIsElementVisible = aIsVisible;
|
||||
if (mIsElementVisible) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Element is visible. Start time update"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Element is visible. Start time update"));
|
||||
StartTimeUpdate();
|
||||
}
|
||||
}
|
||||
@ -709,7 +709,7 @@ void AudioOffloadPlayer::SendMetaDataToHal(sp<GonkAudioSink>& aSink,
|
||||
param.addInt(String8(AUDIO_OFFLOAD_CODEC_PADDING_SAMPLES), paddingSamples);
|
||||
}
|
||||
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("SendMetaDataToHal: bitRate %d,"
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("SendMetaDataToHal: bitRate %d,"
|
||||
" sampleRate %d, chanMask %d, delaySample %d, paddingSample %d", bitRate,
|
||||
sampleRate, channelMask, delaySamples, paddingSamples));
|
||||
|
||||
@ -727,7 +727,7 @@ void AudioOffloadPlayer::SetVolume(double aVolume)
|
||||
void AudioOffloadPlayer::WakeLockCreate()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("%s", __FUNCTION__));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("%s", __FUNCTION__));
|
||||
if (!mWakeLock) {
|
||||
nsRefPtr<dom::power::PowerManagerService> pmService =
|
||||
dom::power::PowerManagerService::GetInstance();
|
||||
@ -741,7 +741,7 @@ void AudioOffloadPlayer::WakeLockCreate()
|
||||
void AudioOffloadPlayer::WakeLockRelease()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("%s", __FUNCTION__));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("%s", __FUNCTION__));
|
||||
if (mWakeLock) {
|
||||
ErrorResult rv;
|
||||
mWakeLock->Unlock(rv);
|
||||
|
@ -96,13 +96,13 @@ status_t AudioOutput::Open(uint32_t aSampleRate,
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("open(%u, %d, 0x%x, 0x%x, %d 0x%x)",
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("open(%u, %d, 0x%x, 0x%x, %d 0x%x)",
|
||||
aSampleRate, aChannelCount, aChannelMask, aFormat, mSessionId, aFlags));
|
||||
|
||||
if (aChannelMask == CHANNEL_MASK_USE_CHANNEL_ORDER) {
|
||||
aChannelMask = audio_channel_out_mask_from_count(aChannelCount);
|
||||
if (0 == aChannelMask) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Error, ("open() error, can\'t derive mask for"
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_ERROR, ("open() error, can\'t derive mask for"
|
||||
" %d audio channels", aChannelCount));
|
||||
return NO_INIT;
|
||||
}
|
||||
@ -127,7 +127,7 @@ status_t AudioOutput::Open(uint32_t aSampleRate,
|
||||
mUid);
|
||||
|
||||
if ((!t.get()) || (t->initCheck() != NO_ERROR)) {
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Error, ("Unable to create audio track"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_ERROR, ("Unable to create audio track"));
|
||||
delete newcbd;
|
||||
return NO_INIT;
|
||||
}
|
||||
@ -141,7 +141,7 @@ status_t AudioOutput::Open(uint32_t aSampleRate,
|
||||
|
||||
status_t AudioOutput::Start()
|
||||
{
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("%s", __PRETTY_FUNCTION__));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("%s", __PRETTY_FUNCTION__));
|
||||
if (!mTrack.get()) {
|
||||
return NO_INIT;
|
||||
}
|
||||
@ -151,7 +151,7 @@ status_t AudioOutput::Start()
|
||||
|
||||
void AudioOutput::Stop()
|
||||
{
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("%s", __PRETTY_FUNCTION__));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("%s", __PRETTY_FUNCTION__));
|
||||
if (mTrack.get()) {
|
||||
mTrack->stop();
|
||||
}
|
||||
@ -173,7 +173,7 @@ void AudioOutput::Pause()
|
||||
|
||||
void AudioOutput::Close()
|
||||
{
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("%s", __PRETTY_FUNCTION__));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("%s", __PRETTY_FUNCTION__));
|
||||
mTrack.clear();
|
||||
|
||||
delete mCallbackData;
|
||||
@ -215,19 +215,19 @@ void AudioOutput::CallbackWrapper(int aEvent, void* aCookie, void* aInfo)
|
||||
} break;
|
||||
|
||||
case AudioTrack::EVENT_STREAM_END:
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Callback wrapper: EVENT_STREAM_END"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Callback wrapper: EVENT_STREAM_END"));
|
||||
(*me->mCallback)(me, nullptr /* buffer */, 0 /* size */,
|
||||
me->mCallbackCookie, CB_EVENT_STREAM_END);
|
||||
break;
|
||||
|
||||
case AudioTrack::EVENT_NEW_IAUDIOTRACK :
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("Callback wrapper: EVENT_TEAR_DOWN"));
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("Callback wrapper: EVENT_TEAR_DOWN"));
|
||||
(*me->mCallback)(me, nullptr /* buffer */, 0 /* size */,
|
||||
me->mCallbackCookie, CB_EVENT_TEAR_DOWN);
|
||||
break;
|
||||
|
||||
default:
|
||||
AUDIO_OFFLOAD_LOG(LogLevel::Debug, ("received unknown event type: %d in"
|
||||
AUDIO_OFFLOAD_LOG(PR_LOG_DEBUG, ("received unknown event type: %d in"
|
||||
" Callback wrapper!", aEvent));
|
||||
break;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
PRLogModuleInfo *gI420ColorConverterHelperLog;
|
||||
#define LOG(msg...) MOZ_LOG(gI420ColorConverterHelperLog, mozilla::LogLevel::Warning, (msg))
|
||||
#define LOG(msg...) MOZ_LOG(gI420ColorConverterHelperLog, PR_LOG_WARNING, (msg))
|
||||
|
||||
namespace android {
|
||||
|
||||
|
@ -65,7 +65,7 @@ MediaOmxCommonDecoder::FirstFrameLoaded(nsAutoPtr<MediaInfo> aInfo,
|
||||
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
if (!CheckDecoderCanOffloadAudio()) {
|
||||
DECODER_LOG(LogLevel::Debug, ("In %s Offload Audio check failed",
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("In %s Offload Audio check failed",
|
||||
__PRETTY_FUNCTION__));
|
||||
return;
|
||||
}
|
||||
@ -82,7 +82,7 @@ MediaOmxCommonDecoder::FirstFrameLoaded(nsAutoPtr<MediaInfo> aInfo,
|
||||
if (err != OK) {
|
||||
mAudioOffloadPlayer = nullptr;
|
||||
mFallbackToStateMachine = true;
|
||||
DECODER_LOG(LogLevel::Debug, ("In %s Unable to start offload audio %d."
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("In %s Unable to start offload audio %d."
|
||||
"Switching to normal mode", __PRETTY_FUNCTION__, err));
|
||||
return;
|
||||
}
|
||||
@ -105,7 +105,7 @@ MediaOmxCommonDecoder::PauseStateMachine()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
GetReentrantMonitor().AssertCurrentThreadIn();
|
||||
DECODER_LOG(LogLevel::Debug, ("%s", __PRETTY_FUNCTION__));
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("%s", __PRETTY_FUNCTION__));
|
||||
|
||||
if (mShuttingDown) {
|
||||
return;
|
||||
@ -128,7 +128,7 @@ MediaOmxCommonDecoder::ResumeStateMachine()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
|
||||
DECODER_LOG(LogLevel::Debug, ("%s current time %f", __PRETTY_FUNCTION__, mLogicalPosition));
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("%s current time %f", __PRETTY_FUNCTION__, mLogicalPosition));
|
||||
|
||||
if (mShuttingDown) {
|
||||
return;
|
||||
@ -167,7 +167,7 @@ void
|
||||
MediaOmxCommonDecoder::AudioOffloadTearDown()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
DECODER_LOG(LogLevel::Debug, ("%s", __PRETTY_FUNCTION__));
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("%s", __PRETTY_FUNCTION__));
|
||||
|
||||
// mAudioOffloadPlayer can be null here if ResumeStateMachine was called
|
||||
// just before because of some other error.
|
||||
|
@ -60,13 +60,13 @@ void MediaOmxCommonReader::CheckAudioOffload()
|
||||
// aren't supported and also duration would be less than a minute
|
||||
bool isTypeMusic = mAudioChannel == dom::AudioChannel::Content;
|
||||
|
||||
DECODER_LOG(LogLevel::Debug, ("%s meta %p, no video %d, no streaming %d,"
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("%s meta %p, no video %d, no streaming %d,"
|
||||
" channel type %d", __FUNCTION__, meta.get(), hasNoVideo,
|
||||
isNotStreaming, mAudioChannel));
|
||||
|
||||
if ((meta.get()) && hasNoVideo && isNotStreaming && isTypeMusic &&
|
||||
canOffloadStream(meta, false, false, AUDIO_STREAM_MUSIC)) {
|
||||
DECODER_LOG(LogLevel::Debug, ("Can offload this audio stream"));
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("Can offload this audio stream"));
|
||||
mDecoder->SetPlatformCanOffloadAudio(true);
|
||||
}
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ bool OmxDecoder::SetVideoFormat() {
|
||||
NS_WARNING("rotation not available, assuming 0");
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, "display width: %d display height %d width: %d height: %d component: %s format: %d stride: %d sliceHeight: %d rotation: %d",
|
||||
LOG(PR_LOG_DEBUG, "display width: %d display height %d width: %d height: %d component: %s format: %d stride: %d sliceHeight: %d rotation: %d",
|
||||
mDisplayWidth, mDisplayHeight, mVideoWidth, mVideoHeight, componentName,
|
||||
mVideoColorFormat, mVideoStride, mVideoSliceHeight, mVideoRotation);
|
||||
|
||||
@ -454,7 +454,7 @@ bool OmxDecoder::SetAudioFormat() {
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG(LogLevel::Debug, "channelCount: %d sampleRate: %d",
|
||||
LOG(PR_LOG_DEBUG, "channelCount: %d sampleRate: %d",
|
||||
mAudioChannels, mAudioSampleRate);
|
||||
|
||||
return true;
|
||||
@ -535,7 +535,7 @@ bool OmxDecoder::ToVideoFrame(VideoFrame *aFrame, int64_t aTimeUs, void *aData,
|
||||
SemiPlanarYVU420Frame(aFrame, aTimeUs, aData, aSize, aKeyFrame);
|
||||
break;
|
||||
default:
|
||||
LOG(LogLevel::Debug, "Unknown video color format %08x", mVideoColorFormat);
|
||||
LOG(PR_LOG_DEBUG, "Unknown video color format %08x", mVideoColorFormat);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -668,7 +668,7 @@ bool OmxDecoder::ReadVideo(VideoFrame *aFrame, int64_t aTimeUs,
|
||||
char *data = static_cast<char *>(mVideoBuffer->data()) + mVideoBuffer->range_offset();
|
||||
|
||||
if (unreadable) {
|
||||
LOG(LogLevel::Debug, "video frame is unreadable");
|
||||
LOG(PR_LOG_DEBUG, "video frame is unreadable");
|
||||
}
|
||||
|
||||
if (!ToVideoFrame(aFrame, timeUs, data, length, keyFrame)) {
|
||||
@ -692,13 +692,13 @@ bool OmxDecoder::ReadVideo(VideoFrame *aFrame, int64_t aTimeUs,
|
||||
return false;
|
||||
}
|
||||
else if (err == -ETIMEDOUT) {
|
||||
LOG(LogLevel::Debug, "OmxDecoder::ReadVideo timed out, will retry");
|
||||
LOG(PR_LOG_DEBUG, "OmxDecoder::ReadVideo timed out, will retry");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
// UNKNOWN_ERROR is sometimes is used to mean "out of memory", but
|
||||
// regardless, don't keep trying to decode if the decoder doesn't want to.
|
||||
LOG(LogLevel::Debug, "OmxDecoder::ReadVideo failed, err=%d", err);
|
||||
LOG(PR_LOG_DEBUG, "OmxDecoder::ReadVideo failed, err=%d", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -753,11 +753,11 @@ bool OmxDecoder::ReadAudio(AudioFrame *aFrame, int64_t aSeekTimeUs)
|
||||
}
|
||||
}
|
||||
else if (err == -ETIMEDOUT) {
|
||||
LOG(LogLevel::Debug, "OmxDecoder::ReadAudio timed out, will retry");
|
||||
LOG(PR_LOG_DEBUG, "OmxDecoder::ReadAudio timed out, will retry");
|
||||
return true;
|
||||
}
|
||||
else if (err != OK) {
|
||||
LOG(LogLevel::Debug, "OmxDecoder::ReadAudio failed, err=%d", err);
|
||||
LOG(PR_LOG_DEBUG, "OmxDecoder::ReadAudio failed, err=%d", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#define FourCC2Str(n) ((char[5]){(char)(n >> 24), (char)(n >> 16), (char)(n >> 8), (char)(n), 0})
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "nsDebug.h"
|
||||
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
//#define LOG_MEDIA_SHA1
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "nsDebug.h"
|
||||
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
//#define LOG_MEDIA_SHA1
|
||||
|
||||
#ifdef LOG_MEDIA_SHA1
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "nsDebug.h"
|
||||
|
||||
PRLogModuleInfo* GetAppleMediaLog();
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetAppleMediaLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -8,6 +8,6 @@
|
||||
#define __FFmpegLog_h__
|
||||
|
||||
extern PRLogModuleInfo* GetFFmpegDecoderLog();
|
||||
#define FFMPEG_LOG(...) MOZ_LOG(GetFFmpegDecoderLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define FFMPEG_LOG(...) MOZ_LOG(GetFFmpegDecoderLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
#endif // __FFmpegLog_h__
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define GADM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkAudioDecoderManager", __VA_ARGS__)
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
#define READ_OUTPUT_BUFFER_TIMEOUT_US 3000
|
||||
|
||||
using namespace android;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define GMDD_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkMediaDataDecoder", __VA_ARGS__)
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
using namespace android;
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define GVDM_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "GonkVideoDecoderManager", __VA_ARGS__)
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
using namespace mozilla::layers;
|
||||
using namespace android;
|
||||
typedef android::MediaCodecProxy MediaCodecProxy;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
|
||||
PRLogModuleInfo* GetDemuxerLog();
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
|
||||
#define LOG(...) MOZ_LOG(GetDemuxerLog(), PR_LOG_DEBUG, (__VA_ARGS__))
|
||||
|
||||
using mozilla::layers::Image;
|
||||
using mozilla::layers::IMFYCbCrImage;
|
||||
|
@ -21,8 +21,8 @@
|
||||
PRLogModuleInfo *gLoadManagerLog = nullptr;
|
||||
#undef LOG
|
||||
#undef LOG_ENABLED
|
||||
#define LOG(args) MOZ_LOG(gLoadManagerLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gLoadManagerLog, mozilla::LogLevel::Verbose)
|
||||
#define LOG(args) MOZ_LOG(gLoadManagerLog, PR_LOG_DEBUG, args)
|
||||
#define LOG_ENABLED() PR_LOG_TEST(gLoadManagerLog, 5)
|
||||
|
||||
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