зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1810498 - Enable webrtc logging from CamerasParent (parent process). r=ng
Differential Revision: https://phabricator.services.mozilla.com/D196806
This commit is contained in:
Родитель
5a544bfeed
Коммит
3022f19dd2
|
@ -12,6 +12,7 @@
|
||||||
#include "PerformanceRecorder.h"
|
#include "PerformanceRecorder.h"
|
||||||
#include "VideoFrameUtils.h"
|
#include "VideoFrameUtils.h"
|
||||||
|
|
||||||
|
#include "common/browser_logging/WebRtcLog.h"
|
||||||
#include "mozilla/AppShutdown.h"
|
#include "mozilla/AppShutdown.h"
|
||||||
#include "mozilla/Assertions.h"
|
#include "mozilla/Assertions.h"
|
||||||
#include "mozilla/BasePrincipal.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");
|
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);
|
MOZ_ASSERT(mEngines);
|
||||||
|
|
||||||
mShutdownBlocker->ShutdownPromise()
|
mShutdownBlocker->ShutdownPromise()
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "modules/video_capture/video_capture_defines.h"
|
#include "modules/video_capture/video_capture_defines.h"
|
||||||
#include "video/render/incoming_video_stream.h"
|
#include "video/render/incoming_video_stream.h"
|
||||||
|
|
||||||
|
class WebrtcLogSinkHandle;
|
||||||
class nsIThread;
|
class nsIThread;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -175,6 +176,10 @@ class CamerasParent final : public PCamerasParent,
|
||||||
|
|
||||||
std::map<nsCString, std::map<uint32_t, webrtc::VideoCaptureCapability>>
|
std::map<nsCString, std::map<uint32_t, webrtc::VideoCaptureCapability>>
|
||||||
mAllCandidateCapabilities;
|
mAllCandidateCapabilities;
|
||||||
|
|
||||||
|
// While alive, ensure webrtc logging is hooked up to MOZ_LOG. Main thread
|
||||||
|
// only.
|
||||||
|
nsMainThreadPtrHandle<WebrtcLogSinkHandle> mLogHandle;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla::camera
|
} // namespace mozilla::camera
|
||||||
|
|
Загрузка…
Ссылка в новой задаче