Skip to navigation

VICustomVideoSource

VoximplantCalls · iOS SDK v3

View as Markdown

Class that represents a custom video source.

@objc final class VICustomVideoSource

Initializers

init(forBroadcast:frameSize:)

@objc init(forBroadcast: Bool, frameSize: CGSize = .zero)

Creates a custom video source instance.

Parameters

forBroadcast Bool

Whether the video source is used for broadcast

frameSize CGSize

Video frame size

Properties

adaptedResolution

@objc var adaptedResolution: CGSize { get }

Video frame size.

type

let type: VISourceType

Local video source type.

Methods

adaptResolutionFor(size:)

@objc func adaptResolutionFor(size: CGSize)

Sets a video frame size.

Parameters

size CGSize

Video frame size

The SDK crops and scales the video frames that it consumes by capture(pixelBuffer:rotation:) to this size.

capture(pixelBuffer:rotation:)

@objc func capture(pixelBuffer: CVPixelBuffer, rotation: VIVideoRotation)

Consumes a video frame in CVPixelBuffer format.

Parameters

pixelBuffer CVPixelBuffer

Video frame pixel buffer. Buffer should have kCVPixelBufferMetalCompatibilityKey

rotation VIVideoRotation

Video frame rotation

Relationships

Inherits From: NSObject

Conforms To: ObjectiveC.NSObjectProtocol, Swift.CVarArg, Swift.CustomDebugStringConvertible, Swift.CustomStringConvertible, Swift.Equatable, Swift.Hashable, VILocalVideoSource