Contents

captureSampleBuffer(contentFilter:configuration:completionHandler:)

Captures a single frame directly from a stream’s buffer, using a filter.

Declaration

class func captureSampleBuffer(contentFilter: SCContentFilter, configuration config: SCStreamConfiguration, completionHandler: (@Sendable (CMSampleBuffer?, (any Error)?) -> Void)? = nil)
class func captureSampleBuffer(contentFilter: SCContentFilter, configuration config: SCStreamConfiguration) async throws -> CMSampleBuffer

Parameters

  • contentFilter:

    The content filter used to select the stream.

  • config:

    Configuration information for how to record the stream buffer.

  • completionHandler:

    Closure that processes the capture taken from streaming content.

See Also

Individual frame capture