Class
BufferCapturer
public class BufferCapturer: VideoCapturer
A VideoCapturer
that can capture CMSampleBuffer
s.
Repeatedly call capture(_:)
to capture a stream of CMSampleBuffer
s.
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).
Relationships
Superclass
VideoCapturer
Properties
Methods
capture(_:timeStampNs:rotation:)
public func capture(_ pixelBuffer: CVPixelBuffer,
timeStampNs: Int64 = VideoCapturer.createTimeStampNs(),
rotation: RTCVideoRotation = ._0)
Capture a CVPixelBuffer
.