I'm using surfaceView where i'm rendering the video. I have a .mp4 file with video/hevc and video/avc. I made two threads such that they are extracted, decoded and rendered to the surface though the surfaceView. i can choose which video to show in the surface by changing this line in the thread:
decoder.configure(format, null, null, 0);
to
decoder.configure(format, surface, null, 0);
But how to do this dynamically on the fly with a click of a button?