Class: AVCaptureSession
Overview
You use an AVCaptureSession object to coordinate the flow of data from AV input devices to outputs.
Instance Attribute Summary (collapse)
-
- inputs
readonly
The capture session’s inputs.
-
- interrupted
readonly
Indicates whether the receiver has been interrupted.
-
- outputs
readonly
The capture session’s outputs.
-
- running
readonly
Indicates whether the receiver is running.
-
- sessionPreset
A constant value indicating the quality level or bitrate of the output.
Instance Method Summary (collapse)
-
- addInput:
Adds a given input to the session.
-
- addOutput:
Adds a given output to the session.
-
- beginConfiguration
Indicates the start of a set of configuration changes to be made atomically.
-
- canAddInput:
Returns a Boolean value that indicates whether a given input can be added to the session.
-
- canAddOutput:
Returns a Boolean value that indicates whether a given output can be added to the session.
-
- canSetSessionPreset:
Returns a Boolean value that indicates whether the receiver can use the given preset.
-
- commitConfiguration
Commits a set of configuration changes.
-
- removeInput:
Removes a given input.
-
- removeOutput:
Removes a given output.
-
- startRunning
Tells the receiver to start running.
-
- stopRunning
Tells the receiver to stop running.
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.
- (Boolean) interrupted (readonly)
Indicates whether the receiver has been interrupted. (read-only) You can observe the value of this property using key-value observing.
- (Array) outputs (readonly)
The capture session’s outputs. (read-only) The array contains instances of subclasses of AVCaptureOutput.
- (Boolean) running (readonly)
Indicates whether the receiver is running. (read-only) You can observe the value of this property using key-value observing.
- (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.
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.
- (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.
- (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.
- (Boolean) canAddInput(input)
Returns a Boolean value that indicates whether a given input can be added to the session.
- (Boolean) canAddOutput(output)
Returns a Boolean value that indicates whether a given output can be added to the session.
- (Boolean) canSetSessionPreset(preset)
Returns a Boolean value that indicates whether the receiver can use the given preset.
- (Object) commitConfiguration
Commits a set of configuration changes. For discussion, see beginConfiguration.
- (Object) removeInput(input)
Removes a given input. You can invoke this method while the session is running.
- (Object) removeOutput(output)
Removes a given output. You can invoke this method while the session is running.
- (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.
- (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.