Class: AVCaptureSession

Inherits:
NSObject show all

Overview

You use an AVCaptureSession object to coordinate the flow of data from AV input devices to outputs.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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

- (Array) inputs (readonly)

The capture session’s inputs. (read-only) The array contains instances of subclasses of AVCaptureInput.

Returns:

- (Boolean) interrupted (readonly)

Indicates whether the receiver has been interrupted. (read-only) You can observe the value of this property using key-value observing.

Returns:

  • (Boolean)

- (Array) outputs (readonly)

The capture session’s outputs. (read-only) The array contains instances of subclasses of AVCaptureOutput.

Returns:

- (Boolean) running (readonly)

Indicates whether the receiver is running. (read-only) You can observe the value of this property using key-value observing.

Returns:

  • (Boolean)

- (String) sessionPreset

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 “Video Input Presets.” The default value is AVCaptureSessionPresetHigh.You can set this value while the session is running.You can only set a preset if canSetSessionPreset: returns YES for that preset.

Returns:

Instance Method Details

- (Object) addInput(input)

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

Parameters:

Returns:

- (Object) addOutput(output)

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

Parameters:

Returns:

- (Object) beginConfiguration

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.

Returns:

- (Boolean) canAddInput(input)

Returns a Boolean value that indicates whether a given input can be added to the session.

Parameters:

  • input (AVCaptureInput)

    An input that you want to add to the session.

Returns:

  • (Boolean)

    YES if input can be added to the session, otherwise NO.

- (Boolean) canAddOutput(output)

Returns a Boolean value that indicates whether a given output can be added to the session.

Parameters:

  • output (AVCaptureOutput)

    An output that you want to add to the session.

Returns:

  • (Boolean)

    YES if output can be added to the session, otherwise NO.

- (Boolean) canSetSessionPreset(preset)

Returns a Boolean value that indicates whether the receiver can use the given preset.

Parameters:

  • preset (String)

    A preset you would like to set for the receiver. For possible values, see “Video Input Presets.”

Returns:

  • (Boolean)

    YES if the receiver can use preset, otherwise NO.

- (Object) commitConfiguration

Commits a set of configuration changes. For discussion, see beginConfiguration.

Returns:

- (Object) removeInput(input)

Removes a given input. You can invoke this method while the session is running.

Parameters:

Returns:

- (Object) removeOutput(output)

Removes a given output. You can invoke this method while the session is running.

Parameters:

Returns:

- (Object) startRunning

Tells the receiver to start running. This method is used to start the flow of data from the inputs to the outputs connected to the AVCaptureSession instance that is the receiver. This method is synchronous and blocks until the receiver has either completely started running or failed to start running. If an error occurs during this process and the receiver fails to start running, you receive an AVCaptureSessionRuntimeErrorNotification.

Returns:

- (Object) stopRunning

Tells the receiver to stop running. This method is used to stop the flow of data from the inputs to the outputs connected to the AVCaptureSession instance that is the receiver. This method is synchronous and blocks until the receiver has completely stopped running.

Returns: