mtsahakis / MediaProjectionDemo

One Activity sample app of using Android Lollipop MediaProjection API to capture device screenshots
Other
210 stars 76 forks source link

Question: Any way to get Frames as per FPS #13

Closed Nik2505 closed 3 years ago

Nik2505 commented 6 years ago

Is there any way to get frames or images as per frame per second?

ShaheryarMalik007 commented 6 years ago

use a boolean like takeImage = false:

on start record make it true,

and on imageAvailable check it if its true,

once you have taken and image make it false and stopRecording()

mtsahakis commented 3 years ago

This is a bit tricky, as the ImageReader might stop returning images, so your FPS might drop to zero if nothing is going on on the screen.