3
我已经下载了ffmpeg lib文件,并将其编译为armv7。我在我的项目中成功添加了ffmpeg库文件。我能够使用AVFoundation获得iPhone摄像头的实况流。iPhone摄像头直播蒸汽
现在的问题是我将如何将iPhone摄像头流输出转换为ffmpeg解码输入?检查我的代码
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
CMBlockBufferRef bufferData = CMSampleBufferGetDataBuffer(sampleBuffer);
size_t lengthAtOffset;
size_t totalLength; char* data;
如果(CMBlockBufferGetDataPointer(bufferData,0,& lengthAtOffset,& totalLength,&数据)=诺尔!){ 的NSLog(@ “错误!”); } }
请建议我其中的ffmpeg IIb的功能是用于解码和如何将我把CMBlockBufferRef
作为其输入?
感谢
先生看到了这个问题,这是pravi(Nikhil的朋友)http://stackoverflow.com/questions/11986313/http-即时串流换iphone和 - 为什么 - 我们使用-M3U8文件 – 2012-08-17 07:53:09