PlanetKitVideoBuffer

public class PlanetKitVideoBuffer : NSObject

A class that represents a video buffer.

  • The sample buffer associated with the video buffer.

    Declaration

    Swift

    @objc
    public var sampleBuffer: CMSampleBuffer?
  • The timestamp of the video buffer.

    Declaration

    Swift

    @objc
    public var timestamp: CMTime
  • The rotation of the video buffer.

    Declaration

    Swift

    @objc
    public var rotation: PlanetKitVideoRotation
  • The position of the video buffer.

    Declaration

    Swift

    @objc
    public var position: PlanetKitCameraPosition
  • The sender of the video buffer.

    Note

    When providing a video buffer for the local user, the sender is nil.

    Declaration

    Swift

    @objc
    public var sender: PlanetKitUserId?
  • The source of the video buffer.

    Declaration

    Swift

    @objc
    public var source: PlanetKitVideoSource
  • Initializes a new PlanetKitVideoBuffer instance with the given parameters.

    Declaration

    Swift

    @objc
    public init(sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, position: PlanetKitCameraPosition, sender: PlanetKitUserId?, source: PlanetKitVideoSource)

    Parameters

    sampleBuffer

    The sample buffer associated with the video buffer.

    timestamp

    The timestamp of the video buffer.

    rotation

    The rotation of the video buffer.

    position

    The position of the video buffer.

    sender

    The sender of the video buffer. When providing a video buffer for the local user, the sender is nil.

    source

    The source of the video buffer.

  • Initializes a new PlanetKitVideoBuffer instance with the given parameters.

    Declaration

    Swift

    @objc
    public init(pixelBuffer: CVPixelBuffer?, sampleBuffer: CMSampleBuffer?, timestamp: CMTime, rotation: PlanetKitVideoRotation, position: PlanetKitCameraPosition, sender: PlanetKitUserId?, source: PlanetKitVideoSource)

    Parameters

    pixelBuffer

    The pixel buffer associated with the video buffer.

    sampleBuffer

    The sample buffer associated with the video buffer.

    timestamp

    The timestamp of the video buffer.

    rotation

    The rotation of the video buffer.

    position

    The position of the video buffer.

    sender

    The sender of the video buffer. When providing a video buffer for the local user, the sender is nil.

    source

    The source of the video buffer.

Conversion

  • Returns the preferred sample buffer from the given CMSampleBuffer.

    Declaration

    Swift

    @objc
    public static func getPreferredSampleBuffer(_ buffer: CMSampleBuffer) -> CMSampleBuffer?