mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 829314, enable webrtc_trace logging for getUserMedia's VideoEngine, r=jesup
This commit is contained in:
parent
d34cee3383
commit
5af872649d
@ -42,5 +42,6 @@ ifdef MOZ_WEBRTC
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(topsrcdir)/media/webrtc/trunk/src \
|
||||
-I$(topsrcdir)/media/webrtc/signaling/src/common \
|
||||
-I$(topsrcdir)/media/webrtc/signaling/src/common/browser_logging \
|
||||
$(NULL)
|
||||
endif
|
||||
|
@ -10,7 +10,8 @@
|
||||
#error "This file must be #included before any IPDL-generated files or other files that #include prlog.h"
|
||||
#endif
|
||||
|
||||
#include "prlog.h"
|
||||
#include "CSFLog.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo*
|
||||
@ -45,6 +46,22 @@ MediaEngineWebRTC::EnumerateVideoDevices(nsTArray<nsRefPtr<MediaEngineVideoSourc
|
||||
}
|
||||
}
|
||||
|
||||
PRLogModuleInfo *logs = GetWebRTCLogInfo();
|
||||
if (!gWebrtcTraceLoggingOn && logs && logs->level > 0) {
|
||||
// no need to a critical section or lock here
|
||||
gWebrtcTraceLoggingOn = 1;
|
||||
|
||||
const char *file = PR_GetEnv("WEBRTC_TRACE_FILE");
|
||||
if (!file) {
|
||||
file = "WebRTC.log";
|
||||
}
|
||||
|
||||
LOG(("Logging webrtc to %s level %d", __FUNCTION__, file, logs->level));
|
||||
|
||||
mVideoEngine->SetTraceFilter(logs->level);
|
||||
mVideoEngine->SetTraceFile(file);
|
||||
}
|
||||
|
||||
ptrViEBase = webrtc::ViEBase::GetInterface(mVideoEngine);
|
||||
if (!ptrViEBase) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user