3

ffmpeg lib ファイルをダウンロードし、armv7 用にコンパイルしました。プロジェクトにffmpeg libファイルを正常に追加しました。AVFoundation を使用して 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; 

if(CMBlockBufferGetDataPointer(bufferData, 0, &lengthAtOffset, &totalLength, &data ) != noErr ){ NSLog(@"エラー!"); } }

デコードに使用されるffmpeg libの機能とCMBlockBufferRef、これを入力としてどのように配置するかを教えてください??

ありがとう

4

1 に答える 1

0

OPenTokをライブビデオストラミングに使用できます

https://github.com/opentok/opentok-ios-sdk

于 2012-06-15T05:13:47.320 に答える