Prepare fail status=0XFFFFFFFFF

All your problems with Audio, Video and Images.

Prepare fail status=0XFFFFFFFFF

Postby edwinkcw » Sat Feb 21, 2009 11:02 am

I implemented the following code, but I got a exception about prepare fail. Can any one tell me why?

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. package test.test;
  3.  
  4.  
  5.  
  6. import android.app.Activity;
  7.  
  8. import android.media.MediaPlayer;
  9.  
  10. import android.os.Bundle;
  11.  
  12. import android.widget.Toast;
  13.  
  14. import android.widget.VideoView;
  15.  
  16.  
  17.  
  18. public class Player extends Activity {
  19.  
  20.  
  21.  
  22.     private String path = "http://10.0.2.2/abc.mp3";
  23.  
  24.     private VideoView mVideoView;
  25.  
  26.  
  27.  
  28.     @Override
  29.  
  30.     public void onCreate(Bundle icicle) {
  31.  
  32.         super.onCreate(icicle);
  33.  
  34.         setContentView(R.layout.videoview);
  35.  
  36.         mVideoView = (VideoView) findViewById(R.id.surface_view);
  37.  
  38.  
  39.  
  40.         MediaPlayer mp = new MediaPlayer();
  41.  
  42.         try {
  43.  
  44.          mp.setDataSource(path);
  45.  
  46.          mp.prepare();
  47.  
  48.  
  49.  
  50.          mp.start();
  51.  
  52.         } catch (Exception e) {
  53.  
  54.           Toast.makeText(this,  e.getMessage().toString(), Toast.LENGTH_SHORT).show();
  55.  
  56.         }
  57.  
  58.  
  59.  
  60.     }
  61.  
  62. }
  63.  
  64.  
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
edwinkcw
Developer
Developer
 
Posts: 38
Joined: Wed Feb 18, 2009 2:04 pm

Top

Postby MrSnowflake » Sat Feb 21, 2009 11:05 am

Your log might give some more info.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby edwinkcw » Sat Feb 21, 2009 1:56 pm

I capture the error message and hope to have more solutons.


02-21 20:54:22.669: WARN/System.err(316): java.io.IOException: Prepare failed.: status=0xFFFFFFFF
02-21 20:54:23.052: WARN/System.err(316): at android.media.MediaPlayer.prepare(Native Method)
02-21 20:54:23.070: WARN/System.err(316): at test.test.Player.onCreate(StreamPlayer.java:24)
02-21 20:54:23.080: WARN/System.err(316): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122)
02-21 20:54:23.080: WARN/System.err(316): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2103)
02-21 20:54:23.080: WARN/System.err(316): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2156)
02-21 20:54:23.080: WARN/System.err(316): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
02-21 20:54:23.080: WARN/System.err(316): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
02-21 20:54:23.080: WARN/System.err(316): at android.os.Handler.dispatchMessage(Handler.java:88)
02-21 20:54:23.080: WARN/System.err(316): at android.os.Looper.loop(Looper.java:123)
02-21 20:54:23.130: WARN/System.err(316): at android.app.ActivityThread.main(ActivityThread.java:3742)
02-21 20:54:23.130: WARN/System.err(316): at java.lang.reflect.Method.invokeNative(Native Method)
02-21 20:54:23.130: WARN/System.err(316): at java.lang.reflect.Method.invoke(Method.java:515)
02-21 20:54:23.130: WARN/System.err(316): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
02-21 20:54:23.130: WARN/System.err(316): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
02-21 20:54:23.130: WARN/System.err(316): at dalvik.system.NativeStart.main(Native Method)
edwinkcw
Developer
Developer
 
Posts: 38
Joined: Wed Feb 18, 2009 2:04 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 28 guests