alexeyvasilyev / rtsp-client-android

Lightweight low-latency RTSP client library for Android
Apache License 2.0
250 stars 69 forks source link

RtspDataListener callback failed #94

Open FaceAI2025 opened 2 days ago

FaceAI2025 commented 2 days ago

Successful run demo on Android Device , but

RtspDataListener,onRtspDataApplicationDataReceived never call back;

    private val rtspDataListener = object: RtspDataListener {
        override fun onRtspDataApplicationDataReceived(data: ByteArray, offset: Int, length: Int, timestamp: Long) {
                // nerver call back
        }
    }

we need call back data for real time AI analysis, what the best way? thank you.

alexeyvasilyev commented 2 days ago

onRtspDataApplicationDataReceived() is called only for RTSP devices which support application data. Usually application data contains metadata, e.g. GPS coordinates and so on. Majority of RTSP cameras do not support it.

If you want image processing, you need to use RtspImageView class which allows obtaining bitmap data.