Contents

consumeSampleBuffer(from:completionHandler:)

Consumes a sample buffer from a client.

Declaration

func consumeSampleBuffer(from client: CMIOExtensionClient, completionHandler: @escaping  @Sendable (CMSampleBuffer?, UInt64, CMIOExtensionStream.DiscontinuityFlags, Bool, (any Error)?) -> Void)
func consumeSampleBuffer(from client: CMIOExtensionClient) async throws -> (CMSampleBuffer, UInt64, CMIOExtensionStream.DiscontinuityFlags, Bool)

Parameters

  • client:

    The client with a sample to process.

  • completionHandler:

    A callback the system invokes with the following data:

    sampleBuffer

    A sample buffer that contains the media sample to consume, or nil if an error occurs.

    sampleBufferSequenceNumber

    The sequence number of the current sample.

    discontinuity

    A flag that indicates if there’s a discontinuity in the stream.

    hasMoreSampleBuffers

    A Boolean value that indicates whether there are more buffers available.

    error

    An optional error. If an error occurs, it contains the details of the failure.

See Also

Processing Data