AVAssetResourceLoadingContentInformationRequest Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in iOS 7.0 and later.
Declared in
AVAssetResourceLoader.h

Overview

The AVAssetResourceLoadingContentInformationRequest class represents a query for essential information about a resource referenced by an asset resource loading request.

When a resource loading delegate, which must implement the AVAssetResourceLoaderDelegate protocol, receives an instance of AVAssetResourceLoadingRequest when the resourceLoader:shouldWaitForLoadingOfRequestedResource: is invoked and accepts responsibility for loading the resource it must check whether the contentInformationRequest property of the AVAssetResourceLoadingRequest is not nil. Whenever the value is not nil, the request includes a query for the information that AVAssetResourceLoadingContentInformationRequest encapsulates. In response to such queries, the resource loading delegate should set the values of the content information request's properties appropriately before invoking the AVAssetResourceLoadingRequest method finishLoading.

When finishLoading is invoked, the values of the properties of its contentInformationRequest property will, in part, determine how the requested resource is processed. For example, if the requested resource’s URL is the URL of an AVURLAsset and contentType is set by the resource loading delegate to a value that the underlying media system doesn’t recognize as a supported media file type, operations on the AVURLAsset, such as playback, are likely to fail.

Tasks

Getting and Setting Content Information

Properties

byteRangeAccessSupported

A Boolean value that indicates whether random access to arbitrary ranges of bytes of the resource is supported.

@property(nonatomic, getter=isByteRangeAccessSupported) BOOL byteRangeAccessSupported
Discussion

Before finishing loading an AVAssetResourceLoadingRequest instance, if its contentInformationRequest property is not nil, set the value of this property to YES if it supports random access to arbitrary ranges of bytes of the resource.

If this property is not YES for resources that must be loaded incrementally, loading of the resource may fail. Such resources include anything that contains media data.

If byte range access is supported portions of the resource can be requested more than once.

Availability
  • Available in iOS 7.0 and later.
Declared In
AVAssetResourceLoader.h

contentLength

The length, in bytes, of the requested resource.

@property(nonatomic) long long contentLength
Discussion

Before finishing loading an AVAssetResourceLoadingRequest instance, if its contentInformationRequest property is not nil, set the value of the contentLength property to the number of bytes contained by the requested resource.

Availability
  • Available in iOS 7.0 and later.
Declared In
AVAssetResourceLoader.h

contentType

The UTI that specifies the type of data contained by the requested resource.

@property(nonatomic, copy) NSString *contentType
Discussion

Before finishing loading an AVAssetResourceLoadingRequest instance, if its contentInformationRequest property is not nil, set the value of this property to a UTI indicating the type of data contained by the requested resource.

Availability
  • Available in iOS 7.0 and later.
Declared In
AVAssetResourceLoader.h