Class

AVSampleBufferRenderSynchronizer

An object used to synchronize multiple queued sample buffers to a single timeline.

Declaration

class AVSampleBufferRenderSynchronizer : NSObject

Overview

This class synchronizes multiple objects that conform to AVQueuedSampleBufferRendering to a single timeline.

Topics

Working with Time Observers

func addBoundaryTimeObserver(forTimes: [NSValue], queue: DispatchQueue?, using: () -> Void) -> Any

Requests invocation of a block when specified times are traversed during normal rendering.

func addPeriodicTimeObserver(forInterval: CMTime, queue: DispatchQueue?, using: (CMTime) -> Void) -> Any

Requests invocation of a block during rendering at specified time intervals.

func removeTimeObserver(Any)

Cancels the specified time observer.

Working with Renderers

var renderers: [AVQueuedSampleBufferRendering]

An array of queued sample buffer renderers currently attached to the synchronizer.

func addRenderer(AVQueuedSampleBufferRendering)

Adds a renderer to the list of renderers under the synchronizer's control.

Accessing Time Information

var timebase: CMTimebase

The synchronizer's rendering timebase, which governs how timestamps are interpreted.

func setRate(Float, time: CMTime)

Set's the timebase's rate and time.

var rate: Float

The current playback rate.

class let rateDidChangeNotification: NSNotification.Name

The synchronizer's rendering rate changed.

func currentTime() -> CMTime

Returns the current time of the synchronizer.

Relationships

Inherits From

Conforms To

See Also

Media Playback

class AVPlayer

An object that provides the interface to control the player’s transport behavior.

class AVQueuePlayer

A player used to play a number of items in sequence.

class AVPlayerLayer

An object that manages a player's visual output.

class AVPlayerItem

An object used to model the timing and presentation state of an asset played by the player.

class AVPlayerItemMetadataCollector

An object used to capture the date range metadata defined for an HTTP Live Streaming asset.

class AVPlayerItemTrack

An object used to modify the presentation state of an asset track being presented by a player.

class AVSynchronizedLayer

An object used to synchronize with a specific player item.

class AVPlayerMediaSelectionCriteria

An object that specifies the preferred languages and media characteristics for a player.

class AVSampleBufferAudioRenderer

An object used to decompress audio and play compressed or uncompressed audio.

class AVSampleBufferDisplayLayer

An object that displays compressed or uncompressed video frames.

class AVRouteDetector

An object that detects the presences of media playback routes.