5. Camera
// Sample Code. Example of Passing sampleBuffer and metadataObjects to ARGSession
ARGSession *argSession = [[ARGSession alloc] initWithARGConfig:argConfig error:&error];
// AVCaptureVideoDataOutput Delegate
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection {
[argSession updateSampleBuffer:sampleBuffer fromConnection:connection];
}// Sample Code. Example of Passing sampleBuffer and metadataObjects to ARGSession
// AVCaptureVideoDataOutput Delegate
func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
argSession?.update(sampleBuffer, from: connection)
}Last updated
Was this helpful?