Discussion:
Media Player Error -38,0
for android
2008-10-24 13:11:17 UTC
Permalink
When i am streaming a Mp3 and playing it after sufficint data is there to
play I get an errir as below and the media player is paused,without any
reason.

How can this problem be solved?What does this error mean ?
for android
2008-10-25 15:30:40 UTC
Permalink
Any help? I would at least like to know when does the error (-38,0)
comes..Atleast that would help i guess..Thanks for ur time
Post by for android
When i am streaming a Mp3 and playing it after sufficint data is there to
play I get an errir as below and the media player is paused,without any
reason.
How can this problem be solved?What does this error mean ?
10-24 18:36:22.399: ERROR/MediaPlayer(634): Error (-38,0)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers-***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---
guna
2008-10-26 04:28:28 UTC
Permalink
Hi,
Coding is better enough to reply for your thread. Because that line
is not sufficient to answer by a developer until they met with that
same problem. Otherwise google employee should answer for that.

Thanks,
guna
Mr Chaloo
2008-12-01 02:28:36 UTC
Permalink
Hi,
Have you found the solution of this error?
I am getting the same problem with mid sound playing.
Please reply me asap.


Thanks
Post by for android
When i am streaming a Mp3 and playing it after sufficint data is there to
play I get an errir as below and the media player is paused,without any
reason.
How can this problem be solved?What does this error mean ?
10-24 18:36:22.399: ERROR/MediaPlayer(634): Error (-38,0)
David Given
2008-12-01 12:12:08 UTC
Permalink
Post by Mr Chaloo
Hi,
Have you found the solution of this error?
I am getting the same problem with mid sound playing.
Please reply me asap.
This is the generic 'I'm confused, help me' error code. -38 corresponds
in the source code to 'unknown error'. It seems to appear for a whole
variety of reasons. There's no real way of figuring out what's going on
other than to examine your code and make sure you're doing everything in
the right order. Even then the error appear now and again on stream
start, for me; I catch it and reinitialise the MediaPlayer, and the next
time round it usually works.
--
David Given
***@cowlark.com
for android
2008-12-01 12:52:16 UTC
Permalink
David is right.I was getting this error,when in one of the conditions,I was
pausing the player,when the player was not playing..
Post by David Given
Post by Mr Chaloo
Hi,
Have you found the solution of this error?
I am getting the same problem with mid sound playing.
Please reply me asap.
This is the generic 'I'm confused, help me' error code. -38 corresponds
in the source code to 'unknown error'. It seems to appear for a whole
variety of reasons. There's no real way of figuring out what's going on
other than to examine your code and make sure you're doing everything in
the right order. Even then the error appear now and again on stream
start, for me; I catch it and reinitialise the MediaPlayer, and the next
time round it usually works.
--
David Given
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers-***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---
Peter Jeffe
2008-12-02 19:25:23 UTC
Permalink
Post by David Given
This is the generic 'I'm confused, help me' error code. -38 corresponds
in the source code to 'unknown error'. It seems to appear for a whole
Any idea what the -17 error from MediaPlayer means? It occurs when
I'm streaming mp3s, and then every song thereafter gets it. Errors.h
says it's ALREADY_EXISTS (-EEXIST), and I can see where
AudioFlinger::addTrack() returns it if the track is already in
mActiveTracks, but I can't see why that would be the case. I'm not
trying to open the same stream twice, and even if I was that shouldn't
be an error, should it?

-- Peter
Brian
2008-12-03 16:43:07 UTC
Permalink
I am also getting the Error (-17,0) when trying to play a video
file...here's my code. I cannot see anything in here that would cause
a problem. Any insight? The video file *should* play fine.

public class VideoActivity extends Activity {

private String _videoPath;
private MediaPlayer _mp;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

_videoPath = getIntent().getStringExtra("video_path");

getWindow().setFormat(PixelFormat.TRANSLUCENT);

LinearLayout layout = new LinearLayout(getBaseContext());
layout.setLayoutParams(new LinearLayout.LayoutParams
(LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.FILL_PARENT));

SurfaceView sview = new SurfaceView(getBaseContext());
sview.setLayoutParams(new LinearLayout.LayoutParams(320,
180));
sview.getHolder().addCallback(new surfaceHolderCallback());

layout.addView(sview);
setContentView(layout);
}

class surfaceHolderCallback implements SurfaceHolder.Callback {
public void surfaceCreated(SurfaceHolder holder) {
try {
_mp = new MediaPlayer();
_mp.setDataSource(_videoPath);
_mp.setDisplay(holder);

_mp.setOnPreparedListener(new
MediaPlayer.OnPreparedListener() {
public void onPrepared(MediaPlayer mediaPlayer) {
mediaPlayer.start();
}
});

_mp.setOnErrorListener(new MediaPlayer.OnErrorListener
() {
public boolean onError(MediaPlayer mediaPlayer,
int i, int i1) {
Log.e(Constants.TAG, Integer.toString(i));
return false;
}
});

_mp.prepareAsync();

} catch (Exception ex) {
Log.e(Constants.TAG, ex.getMessage());
}
}

public void surfaceChanged(SurfaceHolder surfaceHolder, int i,
int i1, int i2) {
}

public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
_mp.stop();
_mp.release();
}
}


}

Continue reading on narkive:
Loading...