webrtc-java icon indicating copy to clipboard operation
webrtc-java copied to clipboard

Disable Media Input Source of Peer.

Open Gamer08YT opened this issue 2 years ago • 2 comments

Describe the bug As soon as a peer connection is created via the factory, the Lib uses the default audio inputs. I write a master->many server, with too many peers Windows terminates the task.

Is there a way to create a peer without input and output sources?

To Reproduce Steps to reproduce the behavior:

  1. Create some Peer Connections
  2. Sometimes Windows kills the Process with Error (EXCEPTION_ACCESS_VIOLATION (0xc0000005))

Expected behavior I think Windows is killing the process because too many processes/threads are trying to access the same device.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 22H2 / 22624.1537

Gamer08YT avatar Apr 07 '23 12:04 Gamer08YT

Hello I have the same issue and i dont create a extra audiooutput just an input with AudioOptions audioOptions = new AudioOptions(); AudioTrackSource audioTrackSource = peerConnectionFactory.createAudioSource(audioOptions); AudioTrack audioTrack = peerConnectionFactory.createAudioTrack("audio",audioTrackSource); Error occurs after around 1 minute.

SFX123456 avatar May 09 '24 17:05 SFX123456

Ok so i found a fix thats working at least for me @Gamer08YT . When i compile it to a jar using maven shade plugin and run it via powershell or cmd the error disappears for me. Currently i have 3 peers connected but just one is sending audio.

SFX123456 avatar May 09 '24 18:05 SFX123456