0
私はライブアプリを開発中です。ビデオバッファにフィルタを追加する必要があります。 次に、GPUImageフレームワークを使用してフィルタを作成しました。それはうまく見えますが、バッファは 'willOutputSampleBuffer:'関数にフィルタの効果がありません。ここでiOS GPUImageフィルタをビデオバッファに混在させることはできません
は、いくつかのキーコードです:
self.videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:self.sessionPreset cameraPosition:AVCaptureDevicePositionFront];
self.videoCamera.delegate = self;
self.videoCamera.horizontallyMirrorFrontFacingCamera = YES;
self.filterView = [[GPUImageView alloc] init];
GPUImageBeautifyFilter *beautifyFilter = [[GPUImageBeautifyFilter alloc] init];
[self.videoCamera addTarget:beautifyFilter];
[beautifyFilter addTarget:self.filterView];
dispatch_async(dispatch_get_main_queue(), ^{
[self.view insertSubview:self.filterView atIndex:1];
[self.filterView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view);
}];
[self.videoCamera startCameraCapture];
});
は私が無視任意の詳細はありますか?ありがとう!!!