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. How to start an activity in another package

How about providing more information? :)  What are the package and class
names you are actually supplying?  What is the manifest of the app you are
trying to run?  What is printed in the log when this failure happens?  What
does Package Browser in Dev Tools show that the system knows about this
activity you are trying to launch?

On Sun, Jan 25, 2009 at 3:17 PM, info.sktechnol...@gmail.com <









-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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

2. Motion Events WebView Your Help Needed

Rather than each of us post this question numerous times..

I am dong a web page embedded in webview and using js to gather
evidence in debug view of what events we have accessible via DOM

SO what i need from you is look over my list and if you see nay
missing that you  would like tested add them to this thread..

the ones I have thus far to test:

mouseout
mouseover
mousedown
mouseup

keyup
keydown
keypressed

as you can see I needed the touch events we need to test added to the
list and etc
Basically test and see if object exists and etc as if it does not
exist should get error undefined and if exists but not fired should be
null.

Than when I have results post the video and a text file of the debug
output window in a wiki article so that develpoer can read and use.

This way we are not spinning our wheels each month wondering about the
same damn thing over and over again.

Yes wil even do a Knol article for developers to use..

Thanks to those who are able to answer this thread and add to my list
of events to test..


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

3. getting bitmap from webview

4. ADP1 ONLY instructions for backup, installing from git, then back to backup

5. WebKit/WebView and Focus Highlighting

6. embed external activities using LocalActivityManager

7. Mac OsX 10.5 Installing repo (repo command not found)