One Logo Pool Ball
AVFoundation · IOS API REFERENCE

AVSampleBufferVideoRenderer.Receiver

class · iOS 27.0+ · SDK 27.1

class Receiver

Members (5)

method · iOS 27.0+

enqueueImmediately

TypeScript
enqueueImmediately(sampleBuffer: _CoreMedia_CMReadySampleBuffer<_CoreMedia_CMSampleBuffer_DynamicContent>): AVSampleBufferVideoRenderer_Receiver_EnqueueResult
Swift declaration
func enqueueImmediately(_ sampleBuffer: CMReadySampleBuffer<CMSampleBuffer.DynamicContent>) -> AVSampleBufferVideoRenderer.Receiver.EnqueueResult

Enqueues a sample buffer in order to render its contents, without waiting for the renderer to become ready for more media data. - Parameter sampleBuffer: The sample buffer to enqueue. - Returns: The result of the enqueue operation.

get · iOS 27.0+

renderingEventsAfterFinishedEnqueuing

TypeScript
get renderingEventsAfterFinishedEnqueuing(): (SDKHandle) & (SDKHandle)
Swift declaration
var renderingEventsAfterFinishedEnqueuing: some Sendable & AsyncSequence<AVSampleBufferVideoRenderer.Receiver.RenderingEvent, Never> { get }

A sequence of events that may occur when rendering after enqueuing samples has finished. After enqueuing samples, iterate over this sequence to discover any issues that may occur while the renderer continues rendering. Break out of the iteration when done monitoring rendering events.

method · iOS 27.0+

flush

TypeScript
flushRemovingDisplayedImage(removeDisplayedImage: boolean): Promise<void>
Swift declaration
nonisolated(nonsending) func flush(removingDisplayedImage removeDisplayedImage: Bool) async

Instructs the receiver to discard pending enqueued sample buffers and call the provided block when complete. This method suspends until the flush is complete. - Parameter removeDisplayedImage: Set to true to remove any currently displayed image, false to preserve any current image. A flush resets decoder state. The next frame passed to enqueueSampleBuffer: should be an IDR frame (also known as a key frame or sync sample).

method · iOS 27.0+

flush

TypeScript
flush(): void
Swift declaration
func flush()

Instructs the receiver to discard pending enqueued sample buffers. Additional sample buffers can be appended after `flush()`. - Note: For video, it is not possible to determine which sample buffers have been decoded, so the next frame passed to enqueueSampleBuffer: should be an IDR frame (also known as a key frame or sync sample).

method · iOS 27.0+

enqueue

TypeScript
enqueue(sampleBuffer: _CoreMedia_CMReadySampleBuffer<_CoreMedia_CMSampleBuffer_DynamicContent>): Promise<AVSampleBufferVideoRenderer_Receiver_EnqueueResult>
Swift declaration
nonisolated(nonsending) func enqueue(_ sampleBuffer: CMReadySampleBuffer<CMSampleBuffer.DynamicContent>) async throws -> AVSampleBufferVideoRenderer.Receiver.EnqueueResult

Suspends until the receiver is ready for more media data, then enqueues a sample buffer in order to render its contents. - Parameter sampleBuffer: The sample buffer to enqueue. - Returns: The result of the enqueue operation. - Throws: `CancellationError` if the Task was cancelled.

Skipped declarations

No declarations were skipped in this snapshot.

All AVFoundation types →