AVPlayerItemLegibleOutputPushDelegate Protocol Reference

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

Overview

The AVPlayerItemLegibleOutputPushDelegate protocol extends the AVPlayerItemOutputPushDelegate protocol to provide additional methods specific to attributed string output.

Tasks

Providing Alternate Attributed String Output

Instance Methods

legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:

When invoked allows the delivery of new textual samples.

- (void)legibleOutput:(AVPlayerItemLegibleOutput *)output didOutputAttributedStrings:(NSArray *)strings nativeSampleBuffers:(NSArray *)nativeSamples forItemTime:(CMTime)itemTime
Parameters
output

The AVPlayerItemLegibleOutput source instance.

strings

An array of NSAttributedString objects, each containing both the run of text and the descriptive markup.

nativeSamples

An array of CMSampleBufferRef objects, for media subtypes included in the array passed to the output object’s initWithMediaSubtypesForNativeRepresentation: method.

itemTime

The item time at which the strings should be presented.

Discussion

For each media subtype in the array passed in to the output object’s initWithMediaSubtypesForNativeRepresentation: method, the delegate receives sample buffers carrying data in its native format via the nativeSamples parameter if there is media data of that subtype in the media resource.

For all other media subtypes present in the media resource, the delegate receives attributed strings in a common format via the strings parameter. See CMTextMarkup Reference for the string attributes keys and values that are used in the attributed strings.

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