我有一个 mime 类型 video/h264 的视频流,它从安全摄像头流式传输实时 h.264 视频。我正在尝试实时流式传输并解码 h.264 帧(最好是硬件解码)并将它们显示在视图中。我已经广泛寻找支持这一点的库或框架,但不确定哪种方法是正确的。我看了一点 AVFoundation 但不确定如何处理视频/h264 流。我是否应该从流中抓取每一帧(I 帧/P 帧)并将其传递给 AVAssetReader?任何方向/示例代码/库参考都会非常有帮助!
HTTP/1.1 200 OK
Date: {date}
Connection: keep-alive
Cache-Control: no-cache, no-store
Expires: -1
Content-Type: multipart/x-mixed-replace;boundary=myboundary
Set-Cookie: stream={stream-id}; version=1
--myboundary
Content-Type: video/h264
Sync-Point: "yes" or "no"
Pre-roll: "yes" or "no"
Media-Start: "invalid" or {mediastart}
Media-End: "invalid" or {mediaend}
Stream-Start: "invalid" or {stream start time}
Stream-End: "invalid" or {stream end time}
Content-Length: {content-length}
X-Date: {x-date}
{image}