open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
385 stars 180 forks source link

Windows上 发送和接收消息时 报错 ADM 初始化错误如何解决? #608

Closed yy-tayu closed 1 year ago

yy-tayu commented 1 year ago

native client send receive and send crash as ADM initialization failed

Console Log:

(peerconnectionchannel.cc:28): Initialize PeerConnection. (peerconnectiondependencyfactory.cc:297): PeerConnectionDependencyFactory::CreatePeerConnectionFactory() (peerconnectiondependencyfactory.cc:127): CreatePeerConnectionOnCurrentThread (field_trial.cc:140): Setting field trial string:WebRTC-H264HighProfile/Enabled/OWT-EchoCanceller3/Enabled/OWT-H264TemporalLayers/1/ (mediacapabilities.cc:303): Johny---H265 query result:0 (scoped_com_initializer.cc:22): Multi-Threaded Apartment (MTA) COM thread (scoped_com_initializer.cc:46): The COM library was initialized successfully on this thread (audio_device_factory.cc:30): webrtc::CreateWindowsCoreAudioAudioDeviceModule (audio_device_factory.cc:39): webrtc::CreateWindowsCoreAudioAudioDeviceModuleForTest (core_audio_utility_win.cc:672): IsSupported (core_audio_utility_win.cc:208): C:\WINDOWS\system32\audioses.dll (core_audio_base_win.cc:168): webrtc::webrtc_win::CoreAudioBase::CoreAudioBase[Output] (core_audio_base_win.cc:169): Automatic restart: 1 (core_audio_base_win.cc:170): Windows version: 5 (core_audio_utility_win.cc:716): CreateDeviceEnumerator (core_audio_base_win.cc:188): webrtc::webrtc_win::CoreAudioBase::CoreAudioBase:Registered endpoint notification callback. (core_audio_output_win.cc:33): webrtc::webrtc_win::CoreAudioOutput::CoreAudioOutput (core_audio_base_win.cc:168): webrtc::webrtc_win::CoreAudioBase::CoreAudioBase[Input] (core_audio_base_win.cc:169): Automatic restart: 1 (core_audio_base_win.cc:170): Windows version: 5 (core_audio_utility_win.cc:716): CreateDeviceEnumerator (core_audio_base_win.cc:188): webrtc::webrtc_win::CoreAudioBase::CoreAudioBase:Registered endpoint notification callback. (core_audio_input_win.cc:36): webrtc::webrtc_win::CoreAudioInput::CoreAudioInput (audio_device_module_win.cc:516): webrtc::webrtc_win::CreateWindowsCoreAudioAudioDeviceModuleFromInputAndOutput (audio_device_module_win.cc:98): webrtc::webrtc_win::`anonymous-namespace'::WindowsAudioDeviceModule::WindowsAudioDeviceModule (audio_processing_impl.cc:274): Injected APM submodules: Echo control factory: 0 Echo detector: 0 Capture analyzer: 0 Capture post processor: 0 Render pre processor: 0 (webrtc_voice_engine.cc:263): WebRtcVoiceEngine::WebRtcVoiceEngine (webrtc_video_engine.cc:588): WebRtcVideoEngine::WebRtcVideoEngine() (webrtc_voice_engine.cc:285): WebRtcVoiceEngine::Init (audio_device_module_win.cc:128): webrtc::webrtc_win::anonymous-namespace'::WindowsAudioDeviceModule::Init

Fatal error in: ../../third_party/webrtc/modules/audio_device/win/audio_device_module_win.cc, line 129 last system error: 0 Check failed: (&threadchecker)->IsCurrent()

image

Any ideia?

Thanks! Yu

yy-tayu commented 1 year ago

it is working, I modified the file test-owt\src\third_party\webrtc\rtc_base\synchronization\sequence_checker.h

#define RTC_DCHECK_RUN_ON(x)
#if 0
  webrtc::webrtc_seq_check_impl::SequenceCheckerScope seq_check_scope(x); \
  RTC_DCHECK((x)->IsCurrent()) << webrtc::ExpectationToString(x)          
#endif
#endif  // RTC_BASE_SYNCHRONIZATION_SEQUENCE_CHECKER_H_