SequenceFrameSource

Defined in framework ScanditDataCaptureCore

SDCSequenceFrameSource
@interface SDCSequenceFrameSource : NSObject <SDCFrameSource>

Added in version 6.12.0

Emits frames added via addSampleBuffer:.

This class can be used if the camera is not handled by Scandit Data Capture SDK (i.e., when using another framework handling the camera, like ARKit). Register an instance of this class as the data source via SDCDataCaptureContext.frameSource and then add frames coming from the camera via addSampleBuffer:.

Note

The only pixel format type supported is kCVPixelFormatType_420YpCbCr8BiPlanarFullRange.

- initWithCaptureDevicePosition:lensPosition:
- (instancetype)initWithCaptureDevicePosition:(AVCaptureDevicePosition)captureDevicePosition
                                 lensPosition:(CGFloat)lensPosition

Added in version 6.12.0

Constructs a new SDCSequenceFrameSource. It requires the position of the capture device (https://developer.apple.com/documentation/avfoundation/avcapturedeviceposition) and the lens position (https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624643-lensposition).

- switchToDesiredState:
- (void)switchToDesiredState:(SDCFrameSourceState)state

Added in version 6.12.0

Convenience method for SDCFrameSource.switchToDesiredState:completionHandler:: it is same as calling SDCFrameSource.switchToDesiredState:completionHandler: with the second argument set to nil.

- addSampleBuffer:
- (void)addSampleBuffer:(CMSampleBufferRef)sampleBuffer

Added in version 6.12.0

Add a sample buffer. If this frame source is SDCFrameSourceStateOn and connected to a SDCDataCaptureContext this is the next frame that will be processed. Note that the only pixel format type supported is kCVPixelFormatType_420YpCbCr8BiPlanarFullRange.