Sequence Frame Source
Defined in framework ScanditCaptureCore
- SequenceFrameSource
open class SequenceFrameSource : NSObject, FrameSource
Added in version 6.12.0
Emits frames added via add().
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 DataCaptureContext.frameSource and then add frames coming from the camera via add().
Note
The only pixel format type supported is kCVPixelFormatType_420YpCbCr8BiPlanarFullRange.
- init
init()
Added in version 6.12.0
- init
init(captureDevicePosition: AVCaptureDevice.Position, lensPosition: CGFloat)
Added in version 6.12.0
Constructs a new SequenceFrameSource. 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).
- `switch`
open func `switch`(toDesiredState state: FrameSourceState) async ->
BoolAdded in version 6.14.0
Implemented from FrameSource. See FrameSource.`switch`().
- `switch`
open func `switch`(toDesiredState state: FrameSourceState) ->
VoidAdded in version 6.12.0
Convenience method for FrameSource.`switch`(): it is same as calling FrameSource.`switch`() with the second argument set to null.
- add
open func add(_ sampleBuffer: CMSampleBuffer) ->
VoidAdded in version 6.12.0
Add a sample buffer. If this frame source is on and connected to a DataCaptureContext this is the next frame that will be processed. Note that the only pixel format type supported is kCVPixelFormatType_420YpCbCr8BiPlanarFullRange.