Any clues about MediaPlayer Info/Warning 950?
Asked Answered
C

1

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

Communard answered 15/9, 2015 at 12:24 Comment(0)
D
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.

Disruptive answered 7/10, 2015 at 6:18 Comment(7)
Thank you, sure thing is an additional info to help. If I find anything related to that I'll post here.Communard
The core problem lies within using: MediaPlayer.create(activity, uri);Disruptive
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.Disruptive
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.Communard
If you are looking for reliability, here is the mechanism I use: 1- keep a list of players I need Hashmap<playerId, MediaPlayerObject> 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 :-DDisruptive
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.Communard
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.Disruptive

© 2022 - 2024 — McMap. All rights reserved.