Platforms to show: All Mac Windows Linux Cross-Platform

Back to AVCaptureSessionMBS class.

AVCaptureSessionMBS.addConnection(connection as AVCaptureConnectionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds a given capture connection to the session.

connection: The capture connection to add to the session.

You can only add an AVCaptureConnection instance to a session using this method if canAddConnection returns true.
When using addInput or addOutput, connections are formed automatically between all compatible inputs and outputs. Manually adding connections is only necessary when adding an input or output with no connections.

Some examples using this method:

AVCaptureSessionMBS.addInput(connection as AVCaptureInputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds a given input to the session.

input: An input to add to the session.

You can only add an input to a session using this method if canAddInput returns true.
You can invoke this method while the session is running.

AVCaptureSessionMBS.addInputWithNoConnections(input as AVCaptureInputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds an capture input to the session without forming any connections.

input: The capture input to add to the session.
You can invoke this method while the session is running.
Typically you should use addInput to add an input to a session. You use this method if you need fine-grained control over which inputs are connected to which outputs.

Some examples using this method:

AVCaptureSessionMBS.addOutput(connection as AVCaptureOutputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds a given output to the session.

output: An output to add to the session.
You can only add an output to a session using this method if canAddOutput returns true.
You can invoke this method while the session is running.

AVCaptureSessionMBS.addOutputWithNoConnections(output as AVCaptureOutputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds an capture output to the session without forming any connections.

output: The capture output to add to the session.

You can invoke this method while the session is running.
Typically you should use addOutput to add an output to a session. You use this method if you need fine-grained control over which inputs are connected to which outputs.

AVCaptureSessionMBS.beginConfiguration

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates the start of a set of configuration changes to be made atomically.

You use beginConfiguration and commitConfiguration to batch multiple configuration operations on a running session into an atomic update.

After calling beginConfiguration, you can for example add or remove outputs, alter the sessionPreset, or configure individual capture input or output properties. No changes are actually made until you invoke commitConfiguration, at which time they are applied together.

Some examples using this method:

AVCaptureSessionMBS.canAddConnection(connection as AVCaptureConnectionMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given connection can be added to the receiver.

connection: An AVCaptureConnection instance.
Returns true if connection can be added to the receiver, otherwise false.

AVCaptureSessionMBS.canAddInput(input as AVCaptureInputMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given input can be added to the session.

input: An input that you want to add to the session.
Returns true if input can be added to the session, otherwise false.

AVCaptureSessionMBS.canAddOutput(input as AVCaptureOutputMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given output can be added to the session.

output: An output that you want to add to the session.
Returns true if output can be added to the session, otherwise false.

AVCaptureSessionMBS.canSetSessionPreset(preset as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether the receiver can use the given preset.

preset: A preset you would like to set for the receiver. For possible values, see AVFoundationMBS.
Returns true if the receiver can use preset, otherwise false.

Some examples using this method:

AVCaptureSessionMBS.commitConfiguration

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Commits a set of configuration changes.

For discussion, see beginConfiguration.

AVCaptureSessionMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The constructor.

AVCaptureSessionMBS.inputs as AVCaptureInputMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The capture session's inputs. (read-only)

The array contains instances of subclasses of AVCaptureInput.

AVCaptureSessionMBS.isRunning as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Indicates whether the receiver is running. (read-only)

You can observe the value of this property using key-value observing.

AVCaptureSessionMBS.outputs as AVCaptureOutputMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The capture session's outputs. (read-only)

The array contains instances of subclasses of AVCaptureOutput.

AVCaptureSessionMBS.removeConnection(connection as AVCaptureConnectionMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes a capture connection from the session.

connection: The capture connection to remove from the session.
You can invoke this method while the session is running.

AVCaptureSessionMBS.removeInput(connection as AVCaptureInputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes a given input.

input: An input to remove from the receiver.
You can invoke this method while the session is running.

Some examples using this method:

AVCaptureSessionMBS.removeOutput(connection as AVCaptureOutputMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes a given output.

output: An output to remove from the receiver.
You can invoke this method while the session is running.

AVCaptureSessionMBS.sessionPreset as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
A constant value indicating the quality level or bitrate of the output.

You use this property to customize the quality level or bitrate of the output. For possible values of sessionPreset, see AVFoundationMBS. The default value is AVCaptureSessionPresetHigh.

You can set this value while the session is running.
You can only set a preset if canSetSessionPreset: returns true for that preset.
(Read and Write computed property)

Some examples using this property:

AVCaptureSessionMBS.startRunning

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Tells the receiver to start running.

startRunning and stopRunning are asynchronous operations. If an error occurs occur during a capture session, you receive an AVCaptureSessionRuntimeErrorNotification.

Some examples using this method:

AVCaptureSessionMBS.stopRunning

Type Topic Plugin Version macOS Windows Linux iOS Targets
method AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Tells the receiver to stop running.

startRunning and stopRunning are asynchronous operations. If an error occurs occur during a capture session, you receive an AVCaptureSessionRuntimeErrorNotification.

Some examples using this method:

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...