简体   繁体   English

是否可以将AVAssetWriter路由到iOS4中的网络流?

[英]Is it possible to route AVAssetWriter to a network stream in iOS4?

AVAssetWriter takes a file URL as an argument and writes buffers appended to its AVAssetWriterInput to that file. AVAssetWriter将文件URL作为参数,并将附加到其AVAssetWriterInput的缓冲区写入该文件。

AVAssetWriter* assetWriter = [[AVAssetWriter alloc]
    initWithURL:[NSURL URLWithString:@"...fileURL..."]
    fileType:AVFileTypeMPEG4
    error:&error];

If a network URL is specified (ie RTSP - a server expecting a live streaming source), an exception is thrown as a file-based URL is required. 如果指定了网络URL(即RTSP - 期望实时流式传输源的服务器),则会引发异常,因为需要基于文件的URL。

Is there another way of accessing the asset writer output? 是否有另一种访问资产编写器输出的方法? I want to take advantage of the integrated H.264 encoding and just access the encoded data bit by bit to stream it over the network. 我想利用集成的H.264编码,只是逐位访问编码数据,通过网络传输它。

No. 没有。

Capture the raw samples instead. 而是捕获原始样本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM