在iOS中播放ogg流 [英] Playing an ogg stream in iOS
问题描述
有没有人在iOS上播放过ogg流?无需编写自己的解码器即可使用什么?
Has anyone played an ogg stream from iOS? What can I use without having to write my own decoder?
我正在使用Apple的AVPlayer播放流。
I'm using Apple's AVPlayer to play the stream.
此问题已作为此主题的一部分提出:
iOS在线广播流问题但尚未得到解答。
This question has been asked as part of this thread: iOS online radio streaming questions but it hasn't been answered.
推荐答案
没有内置支持播放ogg文件但是,iOS可以轻松获得ogg压缩/解压缩的源代码(来自 xiph.com )。编译iOS代码并在应用程序中使用它是相当简单的。
There is no built-in support for playing ogg files in iOS, however, the source code for ogg compression/decompression is readily available (from xiph.com). It is fairly straightforward to compile this code for iOS and use it in an app.
我有机会编译库并使它们可用:预编译的Ogg Vorbis Libraries for iOS。
I had a chance to compile the libraries and have made them available: "Precompiled Ogg Vorbis Libraries for iOS".
我还在GitHub上提供了一些示例源代码,展示了如何在iOS上播放解码的Ogg Vorbis音频: IDZAQAudioPlayer
I have also made some sample source code available on GitHub that shows how to play decoded Ogg Vorbis audio on iOS: IDZAQAudioPlayer
这篇关于在iOS中播放ogg流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!