alexeyvasilyev / rtsp-client-android

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

raw frames to bitmap #31

Closed sam21abc closed 2 years ago

sam21abc commented 2 years ago

I want generate bitmap/image from raw(h264/h265) frames. without using surface.

alexeyvasilyev commented 2 years ago

It is not possible. Surface is used for decoding raw H264.

yxdragon commented 2 months ago

so how can i get the image from rtspsurface?

alexeyvasilyev commented 2 months ago

@yxdragon Use Android's PixelCopy class

val pixelCopyListener = PixelCopy.OnPixelCopyFinishedListener {
 ....
}

PixelCopy.request(
    surface,
    surfaceBitmap,
    pixelCopyListener,
    handler
)