I\'ve been really banging my head against the table trying to get the MediaPlayer class to try to play h.264-encoded videos on Android 2.1. My code is rather simple:
<
first thanks for your code, the open raw ressource helped me with my problem.
I'm sorry I don't have a definite answer to your problem but based on the api media example in the SDK and my media player in my project I would suggest checking that the file opens correctly.
otherwise maybe you need to set the display before preparing as such:
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setDataSource(fileDescriptor.getFileDescriptor(), fileDescriptor.getStartOffset(), fileDescriptor.getDeclaredLength());
mMediaPlayer.setDisplay(holder);
mMediaPlayer.prepare();
those are the only ideas I have
hope it helps
Jason