microsoft / MixedReality-WebRTC

MixedReality-WebRTC is a collection of components to help mixed reality app developers integrate audio and video real-time communication into their application and improve their collaborative experience
https://microsoft.github.io/MixedReality-WebRTC/
MIT License
898 stars 278 forks source link

Unity Crashed When Playing Local Video #804

Closed xuhaozheng closed 2 years ago

xuhaozheng commented 2 years ago

When I follow the unity tutorial in this link: https://microsoft.github.io/MixedReality-WebRTC/manual/unity/helloworld-unity-localvideo.html. I strictly follow the steps, including creating peerconnection, nodedsssingaler, adding local video sources and transceivers. When I try to play in unity, the unity will always crash. The only difference between me and tutorial is about the Video Renderer. Since tutorial maybe out-of-date, there's no source option in the current video renderer. I followed some links to attach video render event to Webcam Source. I think there may be a mismatch between the current code and the tutorial. I think this will cause some misleading to the new one for unity and WebRTC image

In addition, I didn't put any data in the node-dss server.

BTW, the unity is integrated with the MRTK simulator for Hololens, I'm not sure whether this will take some effect.

Environment Please fill the information for each peer if different

Additional context Here's the log file I found in Unity AppData: Initializing WebRTC plugin... UnityEngine.StackTraceUtility:ExtractStackTrace () UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) UnityEngine.Logger:Log (UnityEngine.LogType,object) UnityEngine.Debug:Log (object) Microsoft.MixedReality.WebRTC.Unity.PeerConnection:InitializePluginAsync (System.Threading.CancellationToken) (at Library/PackageCache/com.microsoft.mixedreality.webrtc@02411541ec41-1629190184526/Runtime/Scripts/PeerConnection.cs:731) Microsoft.MixedReality.WebRTC.Unity.PeerConnection:RequestAccessAndInitAsync (System.Threading.CancellationToken) (at Library/PackageCache/com.microsoft.mixedreality.webrtc@02411541ec41-1629190184526/Runtime/Scripts/PeerConnection.cs:722) Microsoft.MixedReality.WebRTC.Unity.PeerConnection:InitializeAsync (System.Threading.CancellationToken) (at Library/PackageCache/com.microsoft.mixedreality.webrtc@02411541ec41-1629190184526/Runtime/Scripts/PeerConnection.cs:292) Microsoft.MixedReality.WebRTC.Unity.PeerConnection:OnEnable () (at Library/PackageCache/com.microsoft.mixedreality.webrtc@02411541ec41-1629190184526/Runtime/Scripts/PeerConnection.cs:631)

(Filename: Library/PackageCache/com.microsoft.mixedreality.webrtc@02411541ec41-1629190184526/Runtime/Scripts/PeerConnection.cs Line: 731)

Loaded scene 'Temp/__Backupscenes/0.backup' Deserialize: 1.694 ms Integration: 176.954 ms Integration of assets: 0.002 ms Thread Wait Time: 0.046 ms Total Operation Time: 178.697 ms First video frame not zero: 4 (0.166833s). Result may be out of sync. Please make sure tracks all start at 0 in E:/AR/MRTK Tutorial/Assets/Demo.mp4

Fatal error in: ../../media/engine/webrtcvoiceengine.cc, line 253 last system error: 0 Check failed: adm()