Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to take snapshot of RTSP streaming using LibVLC for Android

I am using libVLC in an Android application for RTSP streaming. Since video is loaded over SurfaceView in libVLC, we cannot take snapshot directly.

So how to support snapshot functionality with LibVLC for Android?

One solution would be by loading the video over TextureView. We can use getBitmap function to get the snapshot of currently playing video using the function getBitmap(). How to add support for textureView in libVLC?

I have gone through the source code VLC. I found this file snapshot.c. Is it possible to use this to enable snapshot functionality in Android?

like image 403
Jickson Avatar asked Nov 10 '22 23:11

Jickson


1 Answers

libVLC 2.1.12 supports using a TextureView, so you can use getBitmap().

like image 55
Mason Avatar answered Nov 14 '22 22:11

Mason