I use MediaPlayer to play videos that may be slowed down and broken, and I'm trying to figure out if there is a performance difference between using SurfaceView and TextureView to exit the player.
For TextureView I used SurfaceTextureListener.onSurfaceTextureUpdated() to find out when the frame is displayed and thus calculate the FPS.
However, I cannot find a way to do something similar when using SurfaceView . I tried to create my own class that extends SurfaceView and overloads onDraw() , but it looks like onDraw() never called when the movie is playing.
Any idea if and how this can be achieved?
source share