Media Player Error -38,0

by for android » Fri, 24 Oct 2008 21:11:39 GMT


Sponsored Links
 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)

--~--~---------~--~----~------------~-------~--~----~



Media Player Error -38,0

by for android » Sat, 25 Oct 2008 23:31:01 GMT


 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





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Media Player Error -38,0

by guna » Sun, 26 Oct 2008 12:28:37 GMT


 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
--~--~---------~--~----~------------~-------~--~----~



Media Player Error -38,0

by Mr Chaloo » Mon, 01 Dec 2008 10:28:50 GMT


 Hi,
Have you found the solution of this error?
I am getting the same problem with mid sound playing.
Please reply me asap.


Thanks



--~--~---------~--~----~------------~-------~--~----~



Media Player Error -38,0

by David Given » Mon, 01 Dec 2008 20:12:20 GMT


 


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
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~



Media Player Error -38,0

by for android » Mon, 01 Dec 2008 20:52:34 GMT


 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..






--~--~---------~--~----~------------~-------~--~----~



Media Player Error -38,0

by Peter Jeffe » Wed, 03 Dec 2008 03:26:59 GMT


 


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
--~--~---------~--~----~------------~-------~--~----~



Media Player Error -38,0

by Brian » Thu, 04 Dec 2008 00:56:20 GMT


 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();
        }
    }


}

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Sending MMS

hi guys,

Could somebody tell me how to send MMS pro grammatically in android.

i'm successfully sending text messages but MMS couldn't figure it out.

this should not use a Intent to send mms.

i have used a Intent bt it's not wring properly.
even couldn't find a permission to send MMS.

regards,
Mike

-- 

2. Call start time

I need to know the time of calls start.
I have extended PhoneStateListener and done this:

public void onCallStateChanged (int state, String incomingNumber){
        if(state==TelephonyManager.CALL_STATE_OFFHOOK)
                start=System.currentTimeMillis();
}

But this gets the time of when I push the call button, while I need
the time of when the other phone answers.
Is there a way to do that?
Thanks
Simone

-- 

3. (WTA) best android phone under 3,5 jt

4. HELP: charger saya mati

5. Free and paid version share same data

6. Testing activity which uses Intent.CATEGORY_INFO

7. Android access to Google calendar - supported method