I have a media player instance running in the background. In my main activity I have a surface survey.
When the action starts and the surface view is created, I contact the service and set the display surface of the media planner to the surface view from my main action. I do this with mPlayer.setSurface(sv.getHolder().getSurface());
The video is displayed, and everything still works. When my surface vision is destroyed, in the surfaceDestroyed() I try to separate the surface image from the media mPlayer.setSurface(null); calling mPlayer.setSurface(null); . The problem is that when I do this, I get an error message from the media player (error code 1).
So my question is that after I created the MediaPlayer object and I set the viewview with mPlayer.setSurface(sv.getHolder().getSurface()); Is there a way to free or separate this surface representation without stopping or reinitializing the media planner object?
Thanks in advance.
source share