Any clues about MediaPlayer Info/Warning 950?

久未见 提交于 2019-12-24 11:33:43

问题


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


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



来源:https://stackoverflow.com/questions/32586035/any-clues-about-mediaplayer-info-warning-950

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!