如何使用 Objective-C 库连接到 iPhone 上的 RTSP h.264 流
我意识到 iPhone 官方支持的流媒体协议是 HTTP 流式传输。这很棒,但许多设备都实现 RTSP 协议来流视频。我在 Objective C 中寻找 RTSP 库已经有一段时间了,但还没有找到。有人知道这样的图书馆吗?
如果没有,是否有人知道尝试使其工作的人提供的一些演示/代码示例。由于Apple在硬件中支持h264,我假设可以达到低级别,实现流,然后构建视频数据包并将其传递,就像您使用HTTP流进行流传输一样。任何有关如何完成此操作的建议都将受到赞赏。
I realize that the official supported streaming protocol for the iPhone is HTTP streaming . This is great, but many appliances implement the RTSP protocol to stream video. I have looked around for quite some time looking for RTSP libraries in objective c and have not found them. Does anyone know of such libaries?
If not, does anyone know of some demo/code examples from people who have tried to get this to work. Since Apple supports h264 in hardware, I'm assuming it is possible to get low level, implement the stream, then construct the video packet and pass it along as if you have streamed using HTTP streaming. Anyone advice on how this might be done is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看live555。这将处理所有 RTSP 握手并将数据(在您的情况下为 h264)传递给您的应用程序以进行进一步处理/解码。它是一个 C/C++ 库,因此可以在 iOS 上运行。
与可可应用程序集成的选项是:
1)使用作为库的一部分给出的事件循环机制在其自己的线程上运行 live555(请注意,与 live555 直接相关的所有操作都需要在此线程上运行,因为 live555 本身是未设计为线程安全的)。
2)提供“TaskScheduler”的cocoa实现,其中您使用cocoa库进行异步网络回调,计时器等。
在查看live555 doco后,以上几点对您来说会更有意义。
Check out live555. This will handle all the RTSP handshaking and deliver data (in your case, h264) to you application for further processing/decoding. It is a C/C++ library, and hence can run on iOS.
Your options for integration with a cocoa app are:
1) Run live555 on its own thread using the event loop mechanism given as part of the library (note then that all operations directly related to live555 need to be run on this thread as live555 itself is not designed to be thread-safe).
2) Provide a cocoa implementation of "TaskScheduler", in which you use the cocoa library for async network callbacks, timers etc.
The above points will make more sense to you after reviewing the live555 doco.