Class: AVCaptureConnection

Inherits:
NSObject show all

Overview

An AVCaptureConnection object represents a connection between capture input and capture output objects associated with a capture session.

Instance Attribute Summary (collapse)

Method Summary

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (Boolean) active (readonly)

Indicates whether the connection is active. (read-only)

Returns:

  • (Boolean)

- (Array) audioChannels (readonly)

An array of AVCaptureAudioChannel objects. (read-only) This property is only applicable to connections involving audio.

Returns:

- ( (nonatomic) BOOL ) automaticallyAdjustsVideoMirroring

A Boolean value that indicates whether the value of videoMirrored can change based on configuration of the session. For some session configurations, video data flowing through the connection will be mirrored by default. When the value of this property is YES, the value of videoMirrored may change depending on the configuration of the session, for example after switching to a different capture device input.The default value is YES.

Returns:

  • ( (nonatomic) BOOL )

- (Boolean) enabled

Indicates whether the connection is enabled.

Returns:

  • (Boolean)

- (Boolean) enablesVideoStabilizationWhenAvailable

A Boolean value that indicates whether the system should enable video stabilization when it is available. The default value of this property is NO. If the supportsVideoStabilization property contains the value YES, you can change the value of this property to YES to enable video stabilization for the connection. You can only enable video stabilization for connections that operate on video. Even so, not all source formats and video resolutions are supported. Enabling video stabilization may also introduce additional latency into the video capture pipeline. To detect when video stabilization is in use, use the videoStabilizationEnabled property.

Returns:

  • (Boolean)

- (Array) inputPorts (readonly)

The connection’s input ports. (read-only) Input ports are instances of AVCaptureInputPort.

Returns:

- (AVCaptureOutput) output (readonly)

The connection’s output port. (read-only)

Returns:

- (Boolean) supportsVideoMaxFrameDuration (readonly)

A Boolean value that indicates whether the connection supports setting the videoMaxFrameDuration property. (read-only) This property is only applicable to connections involving video.

Returns:

  • (Boolean)

- (Boolean) supportsVideoMinFrameDuration (readonly)

A Boolean value that indicates whether the connection supports setting the videoMinFrameDuration property. (read-only) This property is only applicable to connections involving video.

Returns:

  • (Boolean)

- (Boolean) supportsVideoMirroring (readonly)

A Boolean value that indicates whether the connection supports video mirroring. (read-only)

Returns:

  • (Boolean)

- (Boolean) supportsVideoOrientation (readonly)

A Boolean value that indicates whether the connection supports changing the orientation of the video. (read-only)

Returns:

  • (Boolean)

- (Boolean) supportsVideoStabilization (readonly)

A Boolean value that indicates whether this connection supports video stabilization. (read-only) Video stabilization is supported only for video connection types. And even for video connections, it might not be available at all resolutions.

Returns:

  • (Boolean)

- (CMTime) videoMaxFrameDuration

The maximum time interval between which the receiver should output consecutive video frames. The value of this property specifies the maximum duration of each video frame output by the connection, placing an upper bound on the amount of time that should separate consecutive frames. The value is equivalent to the reciprocal of the minimum frame rate.A value of kCMTimeZero or kCMTimeInvalid indicates an unlimited minimum frame rate.The default value is kCMTimeInvalid.You can only set this value if supportsVideoMaxFrameDuration is YES.

Returns:

  • (CMTime)

- (Float) videoMaxScaleAndCropFactor (readonly)

The maximum video scale and crop factor by the connection. (read-only) The value specifies the maximum value that you can use when setting the videoScaleAndCropFactor property.This property is only applicable to connections involving video.

Returns:

- (CMTime) videoMinFrameDuration

The minimum time interval between which the receiver should output consecutive video frames. The value of this property specifies the minimum duration of each video frame output by the connection, placing a lower bound on the amount of time that should separate consecutive frames. The value is equivalent to the reciprocal of the maximum frame rate.A value of kCMTimeZero or kCMTimeInvalid indicates an unlimited maximum frame rate.The default value is kCMTimeInvalid.You can only set this value if supportsVideoMinFrameDuration is YES.

Returns:

  • (CMTime)

- (Boolean) videoMirrored

A Boolean value that indicates whether the video flowing through the connection should be mirrored about its vertical axis.. This property is only applicable to connections involving video.if the value of supportsVideoMirroring is YES, you can set videoMirrored to YES to flip the video about its vertical axis and produce a mirror-image effect.

Returns:

  • (Boolean)

- (Object) videoOrientation

The orientation of the video. This property is only applicable to connections involving video.If the value of supportsVideoOrientation is YES, you can set videoOrientation to rotate the video buffers being consumed by the connection’s output. Setting videoOrientation does not necessarily result in a physical rotation of video buffers. For example, a video connection to an AVCaptureMovieFileOutput object handles orientation using a Quicktime track matrix; using an AVCaptureStillImageOutput object, orientation is handled using Exif tags.

Returns:

- (Object) videoPreviewLayer (readonly)

The video preview layer associated with the connection. (read-only) This property is the set if you initialized the connection using initWithInputPort:videoPreviewLayer: or connectionWithInputPort:videoPreviewLayer:.

Returns:

- (Float) videoScaleAndCropFactor

The current video scale and crop factor in use by the receiver. This property is only applicable to connections involving video.You can set this property to a value in the range of 1.0 to the value of videoMaxScaleAndCropFactor. At a factor of 1.0, the image is its original size. At a factor greater than 1.0, the image is scaled by the factor and center-cropped to its original dimensions.

Returns:

- (Boolean) videoStabilizationEnabled (readonly)

A Boolean value that indicates whether video stabilization is active for the connection. (read-only) If video stabilization is supported for the current connection type, and you enable it using the enablesVideoStabilizationWhenAvailable property, this property reports when stabilization is actively in use for the connection. You can monitor this property using key-value observing if you want to detect when video stabilization is being applied to the video data.

Returns:

  • (Boolean)