开发者

getting the frame rate of a currently playing video

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 t开发者_Python百科o do this?

Thanks.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜