How to connect to RTSP h.264 stream on iPhone using objective-c library

I understand that the official supported streaming protocol for iPhone is HTTP streaming . This is great, but many devices implement the RTSP protocol for streaming video. I searched for RTSP libraries in lens c for quite some time and did not find them. Does anyone know about such libraries?

If not, does anyone know demo / code examples from people who tried to get this to work. Since Apple supports h264 in hardware, I assume that you can get a low level, implement a stream, and then build a video package and transmit it as if you were streaming using HTTP streaming. Any advice on how to do this is appreciated.

+4
source share
1 answer

Check out live555 . This will allow you to process all RTSP messages and provide data (in your case, h264) to your application for further processing / decoding. This is a C / C ++ library and therefore can work on iOS.

Your integration options with the cocoa app:

1) Run live555 in your thread using the event loop mechanism given as part of the library (note that all operations directly related to live555 should be performed in this thread, since live555 itself is not designed for thread safety).

2) Provide the cocoa "TaskScheduler" implementation in which you use the cocoa library for asynchronous callbacks, timers, etc.

The above items will make more sense to you after watching doco live555.

+7
source

Source: https://habr.com/ru/post/1340374/


All Articles