Question

I was wondering - is there a way to get the frame rate at which an Android videoView is currently playing. I looked into the documentation of the VideoView class but it was to no avail. Is there some other way to do this?

Thanks.

Was it helpful?

Solution

Yes you can.

VideoView extends View, so you'd make your own YourVideoView class which extends VideoView, implement onDraw method, call super.onDraw there, and also performing your FPS computation there.

So you can count yourself how many times in secound onDraw is called for VideoView. Display it wherever you need (on screen / logcat / ...).

Counting framerate is another story, you can look for simple example here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top