C $ CS的Andr​​oid MediaPlayer的错误$?错误、Andr、CS、MediaPlayer

2023-09-05 06:14:49 作者:sad(痛心)

我挣扎得到一个电台直播流工作的机器人。我现在用的是的MediaPlayer 类,只是在设置URL和播放。它在大多数情况下的伟大工程,但5-30分钟后,它不可避免地死亡。在2.1手机(更具体的英雄)我得到这个日志输出

I am struggling with getting a live radio stream to work on android. I am using the MediaPlayer class and just setting the URL and playing it. It works great for the most part, but after 5-30 minutes it inevitably dies. On 2.1 phones (more specifically a hero) I get this log output

W/MediaPlayer( 7919): info/warning (1, 26)
I/MediaPlayer( 7919): Info (1,26)
I/MediaStreamService( 7919): mPlayer info code:1  extra:26
E/MediaPlayer( 7919): error (1, -11)
E/MediaPlayer( 7919): Error (1,-11)

其中, MediaStreamService 是包含的MediaPlayer我的服务输出从 OnInfoListener未来

在2.2的手机我不要了 OnInfoListener 回调以往任何时候都流刚刚去世。但我确实看到在logcat中

On 2.2 phones I don't get the OnInfoListener callback ever, the stream just dies. But I do see this in the logcat

E/HTTPStream( 1020): recv failed, errno = 11 (Try again)
E/HTTPDataSource( 1020): retrying connection failed

好像在我的1.6手机完美的工作尽管不断logcat的垃圾邮件

Seems to work flawlessly on my 1.6 phone despite the constant logcat spam of

E/PlayerDriver( 82): Invalid percentage value <big growing number>

我的问题是,你有什么C $ CS错误$(1,26)是什么意思?是什么原因造成我的媒体播放器崩溃?是所有与2.2问题2.1问题? 谢谢, 内森

My question is, what do the error codes (1, 26) mean? What is causing my mediaPlayer to crash? Is the 2.1 problem at all related to the 2.2 problem? Thanks, Nathan

编辑:我一直在寻找在源$ C ​​$ C到 OnInfoListener ,发现公共静态最终诠释MEDIA_INFO_UNKNOWN = 1; 我不知道到底是什么意思,能不能寻找到这些额外保持要么..任何有识之士在什么媒体信息未知的手段?或者是这个26看台的将是非常美联社preciated。

I was looking in the source code to OnInfoListener and found public static final int MEDIA_INFO_UNKNOWN = 1; I'm not sure exactly what it means, and can't find where these extras are kept either.. Any insight on to what Media info unknown means? or what this 26 stands for would be very appreciated.

推荐答案

我的问题是,做什么错误codeS(1,26)是什么意思?

My question is, what do the error codes (1, 26) mean?

26意味着PVMFInfoErrorHandlingStart,只是一个错误提示

的误差是-11,这意味着PVMFErrTimeout。您可以检查出的定义文件,在这里link文字

The error is -11, which means PVMFErrTimeout. You can check out the definition files here link text