AVAssetResourceLoader Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iOS 6.0 and later. |
| Declared in | AVAssetResourceLoader.h |
Overview
An AVAssetResourceLoader object mediates resource requests from an AVURLAsset object with a delegate object that you provide. When a request arrives, the resource loader asks your delegate if it is able to handle the request and reports the results back to the asset.
You do not create resource loader objects yourself. Instead, you retrieve a resource loader from the resourceLoader property of an AVURLAsset object and use it to assign your custom delegate object.
The delegate you associate with this object must adopt the AVAssetResourceLoaderDelegate protocol. For more information, see AVAssetResourceLoaderDelegate Protocol Reference.
Tasks
Accessing the Delegate
-
– setDelegate:queue: -
delegateproperty
Getting the Dispatch Queue
-
delegateQueueproperty
Properties
delegate
The delegate object to use when handling resource requests. (read-only)
Discussion
The delegate object is responsible for indicating whether or not it is able to handle a resource request. And for those requests it does handle, the delegate object must initiate the loading of the requested resource.
Availability
- Available in iOS 6.0 and later.
Declared In
AVAssetResourceLoader.hdelegateQueue
The dispatch queue to use when handling resource requests. (read-only)
Discussion
Resource requests are processed synchronously on the specified dispatch queue.
Availability
- Available in iOS 6.0 and later.
Declared In
AVAssetResourceLoader.hInstance Methods
setDelegate:queue:
Sets the delegate and dispatch queue to use with the resource loader.
Parameters
- delegate
The delegate object to query when handling resource requests. You may specify
nilif you want to clear the delegate object. The resource loader does not store a strong reference to the delegate object.- delegateQueue
The dispatch queue on which to execute resource requests. If the delegate parameter is not
nil, this parameter must also not beniland must contain a valid dispatch queue. However, if delegate isnil, this parameter may also benil.The resource loader maintains a strong reference to the dispatch queue you specify.
Discussion
You use this method to specify the object to use when handling resource requests and the dispatch queue on which to process those requests. Resource requests are processed synchronously on the dispatch queue you provide.
Availability
- Available in iOS 6.0 and later.
Declared In
AVAssetResourceLoader.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)