Contents

SCStreamFrameInfo

An instance that defines metadata keys for a stream frame.

Declaration

struct SCStreamFrameInfo

Overview

Use SCStreamFrameInfo keys to retrieve values from the dictionary of metadata attached to the sample buffers that a stream produces. For example, you can retrieve the display time, content scale, and scaling factor, as shown below:

// A dictionary of attachments for a streamed sample buffer.
let attachments: [SCStreamFrameInfo: Any] = // Retrieve attachments from a sample buffer.

let displayTime = attachments[.displayTime] as? UInt64 ?? 0
let contentScale = attachments[.contentScale] as? Double ?? 0.0
let scaleFactor = attachments[.scaleFactor] as? Double ?? 0.0

Topics

Frame information constants

Initializers

See Also

Output processing