Hi, yup I tried adding the call back (did nothing important in the call back methods though, would like to know what should I do there?) I also set the type of the holder to getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); still the same problem my last try used the asynchronous version of the API which would return with the error (-4,0) after trying to prepare too. i looked for the meaning of the error codes every where but I couldn't find anything :(
Thanks, [EMAIL PROTECTED] On Oct 28, 4:45 am, guna <[EMAIL PROTECTED]> wrote: > Hi, > > Did you included addcallback method of the holder? Try setType of > holder too... > > Thanks, > Guna > > On Oct 26, 12:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I've been trying to play videos obtained as a raw resource, here is > > what I did > > MediaPlayer mp = new MediaPlayer(); > > mp.setDisplay(getHolder()); > > mp.setDataSource(getContext().getResources().openRawResourceFd(R.raw.myvide > > o).getFileDescriptor()); > > mp.setAudioStreamType(2); > > mp.prepare(); > > mp.start(); > > ... > > > this is not the exact code (deleted my last trial after it became > > horrendous)! but thats basically what I did > > > I always got this exception: > > > error: Prepare failed.: status=0xFFFFFFFC > > java.io.IOException: Prepare failed.: status=0xFFFFFFFC > > > note that this worked perfectly with mp3s (without the setDisplay call > > ofc) > > > I Googled the exception, found out that it was a common problem but > > haven't found any clear solutions, the only lead i found was > > a guy saying that it was a file format problem, however i tried this > > with many different 3gp, mp4 files > > > was hoping anyone could help me with this issue... thanks in advance > > and best regards to you all --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

