iOS Developer Library

Developer

AVFoundation Framework Reference AVPlayerItemOutput Class Reference

Options
Deployment Target:

On This Page
Language:

AVPlayerItemOutput

The AVPlayerItemOutput class is an abstract class that defines the common interface for moving samples from an asset to an AVPlayer object. You do not create instances of this class directly but instead use one of the concrete subclasses that manage specific types of assets. More...

Conforms To


Import Statement


import AVFoundation @import AVFoundation;

Availability


Available in iOS 6.0 and later.
  • Converts a host time (specified in seconds) to the item’s timebase.

    Declaration

    Swift

    func itemTimeForHostTime(_ hostTimeInSeconds: CFTimeInterval) -> CMTime

    Objective-C

    - (CMTime)itemTimeForHostTime:(CFTimeInterval)hostTimeInSeconds

    Parameters

    hostTimeInSeconds

    A host time value, specified in seconds. For example, you might specify the time value returned by the CACurrentMediaTime function or the timestamp from a CADisplayLink object for this parameter.

    Return Value

    The equivalent time in the item’s timebase.

    Discussion

    The timestamp associated with a CADisplayLink object represents the time of the most recent screen refresh, which is usually a time in the past. If you want to find the time associated with the next screen refresh, you need to increment the timestamp by the value in the display link’s duration property.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.

  • Converts a Mach host time to the item’s timebase.

    Declaration

    Swift

    func itemTimeForMachAbsoluteTime(_ machAbsoluteTime: Int64) -> CMTime

    Objective-C

    - (CMTime)itemTimeForMachAbsoluteTime:(int64_t)machAbsoluteTime

    Parameters

    machAbsoluteTime

    The Mach host time to convert. You typically retrieve this value using the mach_absolute_time function.

    Return Value

    The equivalent time in the item’s timebase.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.

  • A Boolean indicating whether the player object renders the receiver’s output.

    Declaration

    Swift

    var suppressesPlayerRendering: Bool

    Objective-C

    @property(nonatomic, readwrite) BOOL suppressesPlayerRendering

    Discussion

    When the value of this property is NOfalse (the default), the player object handles the rendering of the receiver’s associated output. You can change the value of this property to YEStrue if you want to suppress the rendering of the media data associated with this object.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.