2012-08-15 103 views
0

我想知道什么是使用AVfoundation将视频上传到h264格式的服务器的最佳方法。我将使用NSURL和某种形式的httprequest来每隔30秒发布一次数据。我想知道如果有任何已建立的图书馆来减轻我的生活,上传最好的方法是什么?用AVFoundation上传视频到php服务器的方法?

谢谢。

+0

我想CFNetwork库会很有用,但在ios中的套接字编程对我来说很难,所以我不能给你很多帮助。 – DasBoot 2012-08-15 16:39:34

回答

1

你可以使用NSURLConnection和NSMutableURLRequest。分配NSInputStream使用

- (void)setHTTPBodyStream:(NSInputStream *)inputStream 

方法。

检查文档: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSMutableURLRequest_Class/Reference/Reference.html https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsurlconnection_Class/Reference/Reference.html https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSInputStream_Class/Reference/Reference.html