LiveKit Swift Client SDK Documentation

Class Buffer​Capturer

public class BufferCapturer: VideoCapturer  

A VideoCapturer that can capture CMSampleBuffers.

Repeatedly call capture(_:) to capture a stream of CMSampleBuffers. The pixel format must be one of VideoCapturer/supportedPixelFormats. If an unsupported pixel format is used, the SDK will skip the capture. BufferCapturer can be used to provide video buffers from ReplayKit.

Note: At least one frame must be captured before publishing the track or the publish will timeout, since dimensions must be resolved at the time of publishing (to compute video parameters).

%437 BufferCapturer BufferCapturer VideoCapturer VideoCapturer BufferCapturer->VideoCapturer BroadcastScreenCapturer BroadcastScreenCapturer BroadcastScreenCapturer->BufferCapturer

Superclass

VideoCapturer

Properties

options

public var options: BufferCaptureOptions

The BufferCaptureOptions used for this capturer.

Methods

capture(_:​)

public func capture(_ sampleBuffer: CMSampleBuffer)  

Capture a CMSampleBuffer.

capture(_:​time​Stamp​Ns:​rotation:​)

public func capture(_ pixelBuffer: CVPixelBuffer,
                        timeStampNs: Int64 = VideoCapturer.createTimeStampNs(),
                        rotation: RTCVideoRotation = ._0)  

Capture a CVPixelBuffer.