mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1810498 - Enable webrtc logging from CamerasParent (parent process). r=ng
Differential Revision: https://phabricator.services.mozilla.com/D196806
This commit is contained in:
parent
5a544bfeed
commit
3022f19dd2
@ -12,6 +12,7 @@
|
||||
#include "PerformanceRecorder.h"
|
||||
#include "VideoFrameUtils.h"
|
||||
|
||||
#include "common/browser_logging/WebRtcLog.h"
|
||||
#include "mozilla/AppShutdown.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
@ -1288,6 +1289,12 @@ ipc::IPCResult CamerasParent::RecvPCamerasConstructor() {
|
||||
return Send__delete__(this) ? IPC_OK() : IPC_FAIL(this, "Failed to send");
|
||||
}
|
||||
|
||||
NS_DispatchToMainThread(
|
||||
NS_NewRunnableFunction(__func__, [this, self = RefPtr(this)] {
|
||||
mLogHandle = new nsMainThreadPtrHolder<WebrtcLogSinkHandle>(
|
||||
"CamerasParent::mLogHandle", EnsureWebrtcLogging());
|
||||
}));
|
||||
|
||||
MOZ_ASSERT(mEngines);
|
||||
|
||||
mShutdownBlocker->ShutdownPromise()
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "modules/video_capture/video_capture_defines.h"
|
||||
#include "video/render/incoming_video_stream.h"
|
||||
|
||||
class WebrtcLogSinkHandle;
|
||||
class nsIThread;
|
||||
|
||||
namespace mozilla {
|
||||
@ -175,6 +176,10 @@ class CamerasParent final : public PCamerasParent,
|
||||
|
||||
std::map<nsCString, std::map<uint32_t, webrtc::VideoCaptureCapability>>
|
||||
mAllCandidateCapabilities;
|
||||
|
||||
// While alive, ensure webrtc logging is hooked up to MOZ_LOG. Main thread
|
||||
// only.
|
||||
nsMainThreadPtrHandle<WebrtcLogSinkHandle> mLogHandle;
|
||||
};
|
||||
|
||||
} // namespace mozilla::camera
|
||||
|
Loading…
Reference in New Issue
Block a user