Class: AVCaptureMetadataOutput

Inherits:
AVCaptureOutput show all

Overview

An AVCaptureMetadataOutput object intercepts metadata objects emitted by its associated capture connection and forwards them to a delegate object for processing. You can use instances of this class to process specific types of metadata included with the input data. You use this class like you do other output objects, typically by adding it as an output to an AVCaptureSession object.

Instance Attribute Summary (collapse)

Attributes inherited from AVCaptureOutput

#connections

Instance Method Summary (collapse)

Methods inherited from AVCaptureOutput

#connectionWithMediaType:, #transformedMetadataObjectForMetadataObject:connection:

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) availableMetadataObjectTypes (readonly)

An array of strings identifying the types of metadata objects that can be captured. (read-only) Each string in the array corresponds to a possible value in the type property of the AVMetadataObject objects reported by the receiver. The available types are dependent on the capabilities of the AVCaptureInputPort to which the receiver’s connection is attached.

Returns:

- (dispatch_queue_t) metadataObjectsCallbackQueue (readonly)

The dispatch queue on which to execute the delegate’s methods. (read-only) To set the dispatch queue, you must use the setMetadataObjectsDelegate:queue: method.

Returns:

  • (dispatch_queue_t)

- (Object) metadataObjectsDelegate (readonly)

The delegate of the receiver. (read-only) The delegate object must conform to the AVCaptureMetadataOutputObjectsDelegate protocol. The object in this property is used to process all metadata objects captured from the receiver’s connection. To set the delegate object, you must use the setMetadataObjectsDelegate:queue: method.

Returns:

- (Array) metadataObjectTypes

An array of strings identifying the types of metadata objects that you want to process. Each string in the array corresponds to a possible value in the type property of the AVMetadataObject objects reported by the receiver. You can use this property to filter the metadata objects reported by the receiver. Only metadata objects whose type matches one of the strings in this property are actually forwarded to the delegate for processing. Assigning an empty array to this property removes any filters and allows all objects to be processed.When assigning a new array to this property, the type strings in the array must match the type strings reported by the availableMetadataObjectTypes property. If you specify a type string that is not in the availableMetadataObjectTypes array, the receiver raises an exception.

Returns:

Instance Method Details

- (Object) setMetadataObjectsDelegate(objectsDelegate, queue:objectsCallbackQueue)

Sets the delegate and dispatch queue to use handle callbacks. When new metadata objects are captured from the receiver’s connection, they are vended to the delegate object. All delegate methods are executed on the dispatch queue specified in the objectsCallbackQueue parameter. To ensure that metadata objects are processed in a timely manner and not dropped, you should specify a dispatch queue dedicated to processing the objects or that is otherwise not busy.

Parameters:

  • objectsDelegate (Object)

    The delegate object to notify when new metadata objects become available. This object must conform to the AVCaptureMetadataOutputObjectsDelegate protocol.

  • objectsCallbackQueue (dispatch_queue_t)

    The dispatch queue on which to execute the delegate’s methods. This queue must be a serial queue to ensure that metadata objects are delivered in the order in which they were received. If the objectsDelegate parameter is nil, you may specify nil for this parameter too; otherwise, you must specify a valid dispatch queue.

Returns: