使用 android MediaPlayer 播放 ogg 流

发布于 2024-12-29 08:18:05 字数 573 浏览 4 评论 0原文

我的应用程序使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幻梦 2025-01-05 08:18:05

伙计,我在 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文