2

I'm trying to play a video (by a uri) in a VideoView and sometimes get the following errors:

E/MediaPlayer(15861): error (1, -2147483648)
D/MediaPlayer(15861): Couldn't open file on client side, trying server side
W/MediaPlayer(15861): mediaplayer went away with unhandled events

I found that the "list" of codes can be found in the following source code: https://github.com/android/platform_external_opencore/blob/master/pvmi/pvmf/include/pvmf_return_codes.h
(thanks to the thread Complete list of MediaPlayer error codes)

But that does not make things more clear, there's nothing there about -2147483648, and the 1 I get is positive and in this source it says that error codes are negative.

Same thing was reported in this thread: Playing youtube video in a videoview, though he did not ask about what this error means (nor did he get any helping answer).

Anyone has an idea of the meaning of this error?
Thanks.


Edit

I'm trying to show youtube videos, the url of the stream is taken from http://www.youtube.com/get_video_info?&video_id=VIDEO_ID and it's being done asynchronously. When the result gets back, this is the code I'm using:

activity.runOnUiThread(new Runnable() {
    @Override
    public void run() {
        setVideoURI(videoStream);
    }
});

This is being executed by a class which extends VideoView.

Community
  • 1
  • 1
Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299

1 Answers1

0

1 stand for MEDIA_ERROR_UNKNOWN. and -2147483648 is a myth
Refer to the documentation for further details.
This kind of error occurs when trying to play an invalid url. Assuming you are not using third party libraries.

Lazy Ninja
  • 22,342
  • 9
  • 83
  • 103
  • Thanks for that reference, but what makes a url to be invalid? And how is it that the same exact url can work just fine one time and then produce this kind of error on a 2nd try? – Nitzan Tomer Jan 09 '13 at 10:31
  • Is your connection stable? Is your server stable? If you can post some code maybe we could help. I am familiar with this error. And I am assuming you are not using third party libs. – Lazy Ninja Jan 09 '13 at 10:34