Class

AVCaptureScreenInput

A capture input for recording from a screen in macOS.

Declaration

class AVCaptureScreenInput : AVCaptureInput

Overview

AVCaptureScreenInput is a concrete subclass of AVCaptureInput that provides an interface for capturing media from a screen or a portion of a screen.

Instances of AVCaptureScreenInput are input sources for AVCaptureSession objects that provide media data from one of the screens connected to the system, represented by CGDirectDisplayIDs.

Topics

Initializing a Capture Screen Input

init?(displayID: CGDirectDisplayID)

Initializes a capture screen input that provides media data from the specified display.

init()

Initializes a capture screen input that provides media data from the main screen.

Setting Video Capture Options

var minFrameDuration: CMTime

The screen input's minimum frame duration.

var cropRect: CGRect

Indicates the bounding rectangle of the screen area to be captured, in pixels.

var scaleFactor: CGFloat

Indicates the factor by which video buffers captured from the screen are to be scaled.

Capturing Mouse Activity

var capturesCursor: Bool

A Boolean value that specifies whether the mouse cursor appears in the captured output.

var capturesMouseClicks: Bool

A Boolean value that specifies whether mouse clicks appear highlighted in the captured output.

Deprecated

var removesDuplicateFrames: Bool

A Boolean value that specifies whether the capture input skips duplicate frames.

Deprecated

Relationships

Inherits From

Conforms To

See Also

Mac Capture Options

class AVCaptureStillImageOutput

A capture output for capturing still photos in macOS.