-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Description
Hi! I have a problem with RTCPeerConnection.
I create two WebRTC clients, estabilish connection between them (offer-answer). Mic capture is in progress, but not data is not trasferred between them (checked peerConnection.stats) - and it seems fine, because i'm actually do not start transfering of any audio/video.
But with such an "empty" peer connection CPU usage is increaased up to 20%. Looks weird. Do you know what could cause such impact?
Sample code is below.
webRtcClientOne = WebRTCClient(peerConnectionFactory: factory)
webRtcClientTwo = WebRTCClient(peerConnectionFactory: factory)
webRtcClientOne.offer { [unowned self] oneSdp in
webRtcClientTwo.set(remoteSdp: oneSdp) { [unowned self] _ in
webRtcClientTwo.answer { [unowned self] twoSdp in
webRtcClientOne.set(remoteSdp: twoSdp) { _ in
}
}
}
}
timer = Timer.scheduledTimer(withTimeInterval: 5, repeats: true, block: { timer in
self.webRtcClientOne.peerConnection.stats(for: nil, statsOutputLevel: .debug) { stats in
print(stats)
}
})Stats show that no bytes sent, but CPU load is increased significantly (+20% on iPhone 7)
Metadata
Metadata
Assignees
Labels
No labels