使用 android MediaPlayer 播放 ogg 流
我的应用程序使用 android 中的 MediaPlayer 类通过 http 播放 OGG 流。 ogg 流在我自己的设备(HTCdesire(带有 HTC sense 的 v2.2.2))上运行良好,但我的许多用户抱怨我无法在他们的设备上工作。
我尝试使用 AVD 在不同的 Android 版本(2.1、2.2、2.3.3、4.0.3)上运行我的应用程序,我成功地复制了错误。
有人知道这里的问题是什么吗?如果是这样,如何进行调解?
LogCat 输出:
W/libutils.threads(33): Thread (this=0x151e0): don't call waitForExit() from this Thread object's thread. It's a guaranteed deadlock!
A/VorbisDecoder(33): frameworks/base/media/libstagefright/codecs/vorbis/dec/VorbisDecoder.cpp:251 numPageSamples >= 0
MediaPlayer: error (-100, 0)
My app plays an OGG stream via http using the MediaPlayer class in android. The ogg stream plays fine on my own device (HTC desire (v2.2.2 with HTC sense)), but many of my users are complaining as i does not work on their devices.
I tried running my app on different android versions (2.1, 2.2, 2.3.3, 4.0.3) using the AVD, where i managed to replicate the error.
Does anybody know what the issue is here? and if so, how can it be mediated?
LogCat output:
W/libutils.threads(33): Thread (this=0x151e0): don't call waitForExit() from this Thread object's thread. It's a guaranteed deadlock!
A/VorbisDecoder(33): frameworks/base/media/libstagefright/codecs/vorbis/dec/VorbisDecoder.cpp:251 numPageSamples >= 0
MediaPlayer: error (-100, 0)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
伙计,我在 Android 上使用流媒体时遇到了很多问题。对我来说,MediaPlayer 不支持 http 流。
唯一对我有用的是 lib Vitamio。非常容易使用,试试这个: http://vov.io/vitamio/
我重复一遍,这是唯一的对我有用的东西。我在下载文件时尝试了 buffer,但它很难处理,所以我放弃了。
Man, I have so many problems with stream on Android. For me, MediaPlayer doesn't support for stream by http.
The only thing that works to me is the lib Vitamio. Very easy to use, try this: http://vov.io/vitamio/
I repeat, that's the only thing that works to me. I tried buffer while downloading the file, but it is so hard to handle that I gave up.