android - Libjingle Android VideoCall 断开连接但连续看到日志
问题描述
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
I/org.webrtc.Logging: VideoCapturerAndroid: Camera fps: 0.
在 android 应用程序中使用 libjingle 进行 webrtc 视频通话,通话结束后释放所有资源,但仍然可以在 logcat 中看到日志。我认为对象没有被释放并持有这个过程。
fun freeAllResources() {
if (localVideoTrack != null) {
localVideoTrack?.setEnabled(false)
localVideoTrack?.removeRenderer(localVideoRenderer)
localVideoTrack?.dispose()
localVideoTrack = null
}
if (localAudioTrack != null) {
localAudioTrack?.setEnabled(false)
localAudioTrack?.dispose()
localAudioTrack = null
}
localVideoSource?.stop()
peerConnection?.removeStream(localMediaStream)
peerConnection?.close()
peerConnection = null
Log.d(TAG, "videoCaptureAndroid is Disposing starts")
videoCapturerAndroid?.dispose()
Log.d(TAG, "videoCaptureAndroid Release ${videoCapturerAndroid?.isReleased}")
videoCapturerAndroid = null
localMediaStream = null
localVideoSource = null
remoteVideoRenderer = null
peerConnectionFactory = null
}
任何解决方案?
解决方案
推荐阅读
- javascript - 从客户端 PC 下载 blob 文件时出现未经授权的访问错误
- python - Python 错误没有找到带有标签的句柄以使用 matplotlib 放入图例
- html - React Image Container Div 切断
- python - 如何使用 wait_for
- java - 无法使用 java swing 从类路径渲染图像?
- android - android撰写文本字段如何在触摸外部时关闭键盘
- c - 如何更新现有应用的 Lua 库?
- node.js - 有没有办法将音频和视频流合并到一个文件中并将其通过管道传输到 res
- r - 获取R中每对直接连接节点之间的相互连接节点列表
- java - snakeyaml 如何将对象列表写回 yaml 文件,而不以“!!”开头的行