You cannot get this information from SurfaceView, because SurfaceView itself does not know.
The task of SurfaceView is to customize Surface and create a hole in the View layout that you can view. Once he has done this, he is no longer involved in the process of displaying the video. Content is transferred from the decoder to the surface, which is controlled by SurfaceFlinger (system graphics layout).
This, for example, is how DRM video works. The application that plays the video does not have access to DRM-protected video frames. (Neither SurfaceFlinger, actually, but it's a longer story.)
The best way to find out if the content still reaches is to ask the source of the video if it still sends you the content. Another approach would be to change the SurfaceView to a TextureView and provide the onSurfaceTextureUpdated() callback method.
fadden
source share