TechnologiesVideo, Photos & Camera

CoreVideo

iOSmacOStvOSwatchOSvisionOS

CoreVideo provides a pipeline model for digital video, managing the pixel buffers and image buffers that carry frame data and the display-synchronized timing that drives playback. You allocate and recycle frames through CVPixelBufferPool, lock pixel access with CVPixelBufferLockFlags, and describe planar layouts using CVPlanarPixelBufferInfo and its YCbCr variants, while CVDisplayLink delivers callbacks tied to CVTimeStamp and CVTime for frame-accurate scheduling. For GPU work, CVMetalTextureCache and CVMetalBufferCache bridge buffers into Metal, and types such as CVImageColorPrimaries, CVImageAlphaChannelMode, and CVAttachmentMode let you carry color, alpha, and metadata attachments alongside each CVBuffer.

Buffers 6

The core buffer types that carry frame and image data through the video pipeline.

  • Cl
    CVBuffer
    @typedef CVBufferRef
  • Cl
    CVReadOnlyPixelBufferiOS 26.0+
    CVReadOnlyPixelBuffer provides an immutable view of the pixel data held by the pixel buffer.
  • St
    CVMutablePixelBufferiOS 26.0+
    CVMutablePixelBuffer provides read-write access to the pixel data and attachments.
  • Pr
    CVBufferRepresentableiOS 26.0+
    CVBufferRepresentable protocol is a sealed protocol intended to be implemented by the
  • Pr
    CVImageBufferRepresentableiOS 26.0+
    CVImageBufferRepresentable protocol is a sealed protocol intended to be implemented by the
  • Pr
    CVPixelBufferRepresentableiOS 26.0+
    CVPixelBufferRepresentable protocol is a sealed protocol intended to be implemented by the

Pixel Buffer Pools 5

Types that allocate and recycle pixel buffers for efficient frame reuse.

  • Cl
    CVPixelBufferPool
    An object that allocates and recycles pixel buffers to reuse frame memory efficiently.
  • St
    CVPixelBufferPoolFlushFlags
    @enum CVPixelBufferPoolFlush flags
  • St
    CVPixelBufferLockFlags
    @enum Pixel Buffer Locking Flags
  • St
    CVPixelBufferCreationAttributesiOS 26.0+
    Attributes needed for creating a pixel buffer.
  • Cl
    CVOpenGLBufferPool
    An object that allocates and recycles OpenGL-backed buffers for video frames.

Metal and OpenGL Interop 3

Caches that bridge CoreVideo buffers into Metal and OpenGL textures and buffers.

  • Cl
    CVMetalTextureCache
    @typedef CVMetalTextureCacheRef
  • Cl
    CVMetalBufferCache
    An object that bridges CoreVideo buffers into Metal buffers for GPU processing.
  • Cl
    CVOpenGLTextureCache
    @typedef CVOpenGLTextureCacheRef

Display Timing 5

Display-synchronized timing types that drive frame-accurate scheduling and playback.

  • Cl
    CVDisplayLink
    An object that delivers display-synchronized callbacks for scheduling video frames at the refresh rate.
  • St
    CVTime
    A structure that represents a time value, which may be indefinite, used in display timing.
  • St
    CVTimeFlags
    A structure of flags that describe the state of a CVTime value.
  • St
    CVTimeStamp
    @struct CVTimeStamp
  • St
    CVTimeStampFlags
    A structure of flags that indicate which fields of a timestamp are valid.

SMPTE Time 3

Structures and enumerations that represent SMPTE timecode for video frames.

  • St
    CVSMPTETime
    @struct CVSMPTETime
  • St
    CVSMPTETimeFlags
    @enum SMPTE State Flags
  • En
    CVSMPTETimeType
    @enum SMPTE Time Types

Planar Pixel Layouts 5

Structures that describe the planar memory layout of pixel buffer formats.

  • St
    CVPlanarComponentInfo
    A structure describing the offset and row bytes of a single plane in a pixel buffer.
  • St
    CVPlanarPixelBufferInfo
    A structure describing the layout of planes in a planar pixel buffer.
  • St
    CVPlanarPixelBufferInfo_YCbCrPlanar
    A structure describing the plane layout of a fully planar YCbCr pixel buffer.
  • St
    CVPlanarPixelBufferInfo_YCbCrBiPlanar
    A structure describing the plane layout of a biplanar YCbCr pixel buffer.
  • St
    CVFillExtendedPixelsCallBackData
    A structure carrying data for the callback that fills a pixel buffer's extended edge pixels.

Pixel Formats 5

Types that identify and describe the pixel formats a buffer can carry.

  • St
    CVPixelFormatTypeiOS 26.0+
    Identifier for a pixel format type
  • St
    CVPixelFormatDescriptioniOS 26.0+
    Defines a pixel format which can be used to create custom pixel buffer types.
  • St
    CVProResRawMetadataiOS 27.0+
    Metadata associated with ProRes RAW images.
  • St
    CVSenselSitingOffsetsiOS 27.0+
    Siting offsets, relative to pixel center, of individual sensels/components constituting each pixel.
  • En
    CVSenselArrayPatterniOS 27.0+
    Pattern indicating sensel arrangement.

Color and Image Metadata 11

Enumerations describing the color, alpha, and field characteristics carried with image buffers.

  • En
    CVImageColorPrimariesiOS 27.0+
    Color primaries describe the gamut used for the rendering intent of an image.
  • En
    CVImageTransferFunctioniOS 27.0+
    The transfer function describes the tonality of an image for use in color matching operations.
  • En
    CVImageLogTransferFunctioniOS 27.0+
    Identifies the specific log curve transfer function or gamma of the content.
  • En
    CVImageYCbCrMatrixiOS 27.0+
    Indicates color matrix used for converting image buffer from YCbCr to RGB.
  • En
    CVImageAlphaChannelModeiOS 27.0+
    Constants that specify how an image buffer's alpha channel is interpreted.
  • En
    CVImageFieldDetailiOS 27.0+
    Constants that specify the field ordering of an interlaced image buffer.
  • St
    CVImageChromaFieldiOS 27.0+
    Information about chroma field in the 2VUY format image data.
  • En
    CVImageBufferOriginPositioniOS 26.0+
    Constants that specify the origin position of an image buffer's coordinate space.
  • St
    CVImageSizeiOS 26.0+
    Size of image buffer expressed as pixel count.
  • St
    CVImageDisplayMaskRectangleiOS 27.0+
    Specifies the rectangular display area within the image.
  • St
    CVImageStereoDisplayMaskRectangleiOS 27.0+
    Specifies the rectangular display area within a view of stereo image.

Attachments 12

Types that define and propagate the metadata attachments associated with a buffer.

  • En
    CVAttachmentMode
    Constants that specify whether and how an attachment propagates between buffers.
  • Pr
    CVAttachmentModePreferenceiOS 27.0+
    Defines preferred mode for an attachment key.
  • En
    CVAttachmentModePreferenceShouldPropagateiOS 27.0+
    Sets preferred mode for attachment to should propagate
  • En
    CVAttachmentModePreferenceShouldNotPropagateiOS 27.0+
    Sets preferred mode for attachment to should not propagate
  • Pr
    CVAttachmentValueRepresentableiOS 27.0+
    Allows Swift types to be used as buffer attachment value.
  • St
    CVAttachmentRawValueiOS 27.0+
    A lightweight wrapper around raw attachment values.
  • Pr
    CVAttachmentKeyDefinitionsiOS 27.0+
    Marks a type as a collection of attachment keys for an attachment bearer.
  • St
    CVAttachmentKeyDefinitioniOS 27.0+
    Associates a raw attachment key with a value type and preferred propagation mode.
  • St
    CVAttachmentKeyDefinitionWithDefaultiOS 27.0+
    Associates a raw attachment key with a default value and preferred propagation mode.
  • St
    CVAttachmentCompositeKeyDefinitioniOS 27.0+
    Associates a set of raw attachment keys with a value type and preferred propagation mode.
  • Pr
    CVImageBufferAttachmentKeyDefinitionsiOS 27.0+
    A namespace for image buffer attachment keys.
  • En
    CVPixelBufferAttachmentKeyDefinitionsiOS 27.0+
    A namespace for pixel buffer attachment keys.

Structures 8

  • St
    CVAttachmentAccessiOS 27.0+
    Provides access to the attachments of a buffer.
  • St
    CVAttachmentContaineriOS 27.0+
    Provides storage for buffer attachments independent of the buffer lifetime
  • St
    CVErroriOS 26.0+
    `CVError` wraps `CVReturn` values to present them as Swift Error values. This type is
  • St
    CVImageCleanApertureiOS 27.0+
    An image’s clean aperture is a region of video to display.
  • St
    CVImagePixelAspectRatioiOS 27.0+
    Aspect ratio of each pixel in the image buffer.
  • St
    CVPixelBufferAttributesiOS 26.0+
    A partial set of pixel buffer creation attributes. This struct is useful for conveying partial requirements for
  • St
    CVPixelBufferPaddingiOS 26.0+
    Padding pixels around the CVPixelBuffer
  • St
    CVPixelBufferPlanePropertiesiOS 26.0+
    Properties of a plane of pixels in pixel buffer

Type Aliases 13

  • Ty
    CVOptionFlags
    @typedef CVOptionFlags
  • Ty
    CVDisplayLinkOutputCallback
  • Ty
    CVDisplayLinkOutputHandler
  • Ty
    CVImageBuffer
    @typedef CVImageBufferRef
  • Ty
    CVMetalBuffer
    @typedef CVMetalBufferRef
  • Ty
    CVMetalTexture
    @typedef CVMetalTextureRef
  • Ty
    CVOpenGLBuffer
  • Ty
    CVOpenGLTexture
    @typedef CVOpenGLTextureRef
  • Ty
    CVPixelBuffer
    @typedef CVPixelBufferRef
  • Ty
    CVPixelBufferReleaseBytesCallback
  • Ty
    CVPixelBufferReleasePlanarBytesCallback
  • Ty
    CVFillExtendedPixelsCallBack
  • Ty
    CVReturn
    @enum CVReturn

Extends 26

CGSizeRawRepresentableCGColorSpaceCGRectArraySetDictionaryBoolIntInt8Int16Int32Int64UIntUInt8UInt16UInt32UInt64FloatDoubleCGFloatURLDateStringDataUUID
← Video, Photos & Camera