-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi, I am using this plugin in my project to capture images from rtsp stream and do some process on it. I followed the sample code in readme.md like the following:
var rtsp = Rtsp()
rtsp.init(uri.toString(), timeout = 10000)
rtsp.setStatusListener(object : RtspStatusListener {
override fun onConnecting() {}
override fun onConnected(sdpInfo: SdpInfo) {
println("connected")
}
override fun onDisconnected() {
println("disconnected")
}
override fun onUnauthorized() {
print("unauthorized")
}
override fun onFailed(message: String?) {
println("failed ${message.orEmpty()}")
}
})
rtsp.setFrameListener(object :RtspFrameListener {
override fun onVideoNalUnitReceived(frame: Frame?) {
println("video nal received ${frame?.offset} ${frame?.timestamp} ${frame?.length}")
}
override fun onVideoFrameReceived(width: Int, height: Int, mediaImage: Image?, yuv420Bytes: ByteArray?, bitmap: Bitmap?) {
println("video frame received ${width} ${height} ")
}
override fun onAudioSampleReceived(frame: Frame?) {
}
})
rtsp.setRequestBitmap(true)
rtsp.start(autoPlayAudio = false)My problem is that the onVideoFrameReceived method is never called. Can you help me fix this?
Metadata
Metadata
Assignees
Labels
No labels