1

I've been playing some mp4 videos through the VideoView, which apparently uses/is a wrapper for the MediaPlayer.

As usual I see the typical ones in the logcat:

I/MediaPlayer﹕ Info (701,0)
I/MediaPlayer﹕ Info (702,0)

But then I see that one as well:

I/MediaPlayer﹕ Info (950,0)

As stated in this answer and others questions, most 9XX MediaPlayer Info/Warning/Error codes aren't officially documented in the SDK docs, but probably is related with "timed text tracks" (subtitles), since the only references to 9XX are MEDIA_INFO_UNSUPPORTED_SUBTITLE (901) and MEDIA_INFO_SUBTITLE_TIMED_OUT (902).

The thing is, I don't use any subtitles or external/extra resources while playing the video, so that would be strange.

Does anyone know any additional information about the 950 or the 9XX codes?

(I'm trying to track a bug that could be related to that since it's the last info I have going in the logcat - just exploring all the possibilities.)

Community
  • 1
  • 1
EduardoVaz
  • 43
  • 7

1 Answers1

1

Am facing the same warning but with a different scenario. In the following code, resetting the mediaplayer after onCompletion generates this warning. After it I have problems with the track and trying to restart it.

soundMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
                    @Override
                    public void onCompletion(MediaPlayer mediaPlayer) {
                        mediaPlayer.reset();
                mediaPlayer = MediaPlayer.create(MainActivity.this, soundUri);
                mediaPlayer.start();
                    }
                });

Hope it gives you a clue.

hannunehg
  • 318
  • 2
  • 12
  • Thank you, sure thing is an additional info to help. If I find anything related to that I'll post here. – EduardoVaz Oct 07 '15 at 12:21
  • The core problem lies within using: MediaPlayer.create(activity, uri); – hannunehg Oct 21 '15 at 07:20
  • 1
    This method consumes the Audio Service and needs time to complete though it returns instantly. I solved my problem by moving the creation code to another singleton class working on its own thread (not the main UI thread), give it background priority, deliberately added Thread.sleep(500); Should your problem be in this are I would be more than happy to share details with code. – hannunehg Oct 21 '15 at 07:28
  • Thanks, for the time being I'll try to experiment creating/playing in another threads to see what gives, although I think I'm already doing that. – EduardoVaz Oct 21 '15 at 13:49
  • 1
    If you are looking for reliability, here is the mechanism I use: 1- keep a list of players I need Hashmap 2- if an error occurs with the mediaplayer, reset, remove from list, release 3- when calling the player via the list and it is not found, run a createPlayeThread More interesting is that, the service death "W/IMediaDeathNotifier﹕ media server died" is followed by "E/MediaPlayer﹕ error (100, 0)" for all my players. Looking forward to reading how you solve this :-D – hannunehg Oct 26 '15 at 07:10
  • Sorry being so late to reply, I was busy with another project and had to put this on a halt. What you suggested is actually very similar with what I _somewhat_ had in the code already - the application is a Media carousel kind of player, and had to try some alternatives until I see the best one was to initially create the Views/Containers for each media, and hide/show them as needed. If they already have been created I would only reset the playing. I found the most stable class to work with that flow being the [VideoView](http://developer.android.com/reference/android/widget/VideoView.html). – EduardoVaz Nov 11 '15 at 12:15
  • that said, my problem turned out to be with audio format "mp3" converted files to "ogg" and all is perfect. I did learn however to handle error in two locations. One is while creating the player and the other is setOnErrorListener. – hannunehg Nov 12 '15 at 08:59