AVAssetResourceLoadingRequest 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 AVAssetResourceLoadingRequest object encapsulates information about a resource request issued from a resource loader object.
When an AVURLAsset object needs help loading a resource, it asks its AVAssetResourceLoader object to assist. The resource loader encapsulates the request information by creating an instance of this object, which it then hands to its delegate object for processing. The delegate uses the information in this object to perform the request and report on the success or failure of the operation.
Tasks
Accessing the Request Data
-
requestproperty -
finishedproperty -
– streamingContentKeyRequestDataForApp:contentIdentifier:options:error:
Reporting the Result of the Request
Properties
finished
A Boolean value indicating whether loading of the resource has finished. (read-only)
Discussion
The value of this property is NO initially. The value changes to YES when the delegate object handling the request calls the finishLoadingWithResponse:data:redirect: or finishLoadingWithError: method.
Availability
- Available in iOS 6.0 and later.
Declared In
AVAssetResourceLoader.hrequest
The URL request object for the resource. (read-only)
Discussion
Use the value in this property to identify the requested resource and to formulate an appropriate response object.
Availability
- Available in iOS 6.0 and later.
Declared In
AVAssetResourceLoader.hInstance Methods
finishLoadingWithError:
Causes the receiver to handle the failure to load a resource for which a resource loader’s delegate took responsibility.
Parameters
- error
An error object indicating the reason for the failure.
Discussion
When a resource loader’s delegate takes responsibility for loading a resource, it calls this method when a failure occurred when loading the resource. This method marks the loading request as finished and notifies the resource loader object that the resource could not be loaded.
Availability
- Available in iOS 6.0 and later.
Declared In
AVAssetResourceLoader.hfinishLoadingWithResponse:data:redirect:
Causes the receiver to finish loading a resource for which a resource loader’s delegate took responsibility .
Parameters
- response
The response object for the requested resource. Use the request object in the receiver’s
requestproperty to get information about the requested resource.- data
The data of the resource. If no data is available, specify
nil.- redirect
When redirecting a resource request, use this parameter to specify the corresponding
NSURLRequestobject. If you are handling the request and not redirecting it, specifynil.
Discussion
When a resource loader’s delegate takes responsibility for loading a resource, it calls this method to indicate that the resource was loaded successfully. This method marks the loading request as finished and returns the provided data back to the resource loader object for processing.
Availability
- Available in iOS 6.0 and later.
See Also
Declared In
AVAssetResourceLoader.hstreamingContentKeyRequestDataForApp:contentIdentifier:options:error:
Obtains key request data for a specific combination of application and content.
Parameters
- appIdentifier
An opaque content identifier for the application. The value of this identifier depends on the particular system used to provide the decryption key.
- contentIdentifier
An opaque identifier for the content. The value of this identifier depends on the particular system used to provide the decryption key.
- options
Additional information necessary to obtain the key, or
nilif no additional information is required.- outError
On input, a pointer to an error object. If an error occurs while obtaining the streaming content key, the pointer is set to an appropriate error object on output.
Return Value
The key request data that must be transmitted to the key vendor to obtain the content key.
Discussion
Availability
- Available in iOS 6.0 and later.
Declared In
AVAssetResourceLoader.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)