TechnologiesVideo, Photos & Camera

CoreMedia

iOSmacOStvOSwatchOSvisionOS

CoreMedia provides the low-level primitives that audio and video frameworks share across iOS, macOS, tvOS, watchOS, and visionOS. You represent media time with CMTime, CMTimeRange, and CMTimeMapping, carry samples through CMSampleBuffer, CMBlockBuffer, and queues such as CMBufferQueue and CMSimpleQueue, and describe their layout with CMFormatDescription types like CMVideoDimensions. You synchronize playback and capture against CMClock and CMTimebase, and attach metadata to buffers through the CMAttachmentBearerProtocol. Specialized descriptors and enums—including CMProjectionType, CMPackingType, CMStereoViewComponents, and CMCameraIntrinsicMatrix—cover stereoscopic, projected, and camera-intrinsic media.

Media Time 6

Value types that represent timestamps, durations, ranges, and time remapping in the media pipeline.

  • St
    CMTimeiOS 4.0+
    @typedef CMTime
  • St
    CMTimeRangeiOS 4.0+
    @typedef CMTimeRange
  • St
    CMTimeMappingiOS 4.0+
    @typedef CMTimeMapping
  • St
    CMTimeFlagsiOS 4.0+
    @enum CMTimeFlags
  • En
    CMTimeRoundingMethodiOS 4.0+
    @enum CMTimeRoundingMethod
  • St
    CMSampleTimingInfoiOS 4.0+
    @typedef CMSampleTimingInfo

Clocks and Synchronization 5

Reference clocks and timebases used to synchronize playback, capture, and presentation.

  • Cl
    CMClockiOS 6.0+
    @typedef CMClock
  • Cl
    CMTimebaseiOS 6.0+
    @typedef CMTimebase
  • St
    CMSynciOS 13.0+
    A structure that groups operations for comparing and converting between clocks and timebases.
  • Pr
    CMSyncProtocoliOS 13.0+
    A protocol adopted by clocks and timebases that participate in media synchronization.
  • St
    CMCustomNotificationInfoiOS 27.0+
    Holds custom userInfo for notification sent for a buffer event.

Sample Buffers 5

Containers that carry media samples together with their timing and format information.

  • Cl
    CMSampleBufferiOS 4.0+
    @typedef CMSampleBufferRef
  • St
    CMReadySampleBufferiOS 26.0+
    Buffer carrying readily available samples of media data.
  • St
    CMSampleDataReferenceiOS 26.0+
    References sample data in at a URL.
  • En
    CMSampleBufferAttachmentKeyDefinitionsiOS 27.0+
    A namespace for sample buffer attachment keys.
  • En
    CMDroppedFrameReasoniOS 27.0+
    Constants that specify why a frame was dropped from the media pipeline.

Block Buffers and Memory 7

Reference-counted byte buffers and the memory pool used to back media sample data.

  • Cl
    CMBlockBufferiOS 4.0+
    @typedef CMBlockBufferRef
  • Pr
    CMBlockBufferProtocoliOS 13.0+
    Methods that operate on a range of a `CMBlockBuffer` uses
  • St
    CMMutableDataBlockBufferiOS 26.0+
    A block buffer that provides read-write access to a range of bytes.
  • St
    CMReadOnlyDataBlockBufferiOS 26.0+
    A block buffer that provides read-only access to the a range of bytes.
  • St
    CMBlockBufferCustomBlockSourceiOS 4.0+
    @typedef CMBlockBufferCustomBlockSource
  • En
    CMBlockBufferAttachmentKeyDefinitionsiOS 27.0+
    A namespace for block buffer attachment keys.
  • Cl
    CMMemoryPooliOS 6.0+
    @header CMMemoryPool.h

Buffer Queues 3

FIFO queues that move buffers through the media pipeline with configurable callbacks.

  • Cl
    CMBufferQueueiOS 4.0+
    @typedef CMBufferQueueRef
  • Cl
    CMSimpleQueueiOS 5.0+
    @typedef CMSimpleQueueRef
  • St
    CMBufferCallbacksiOS 4.0+
    @typedef CMBufferCallbacks

Format Descriptions 8

Descriptors of media sample layout for video, sound, text, captions, time code, and metadata.

  • Cl
    CMFormatDescriptioniOS 4.0+
    @typedef CMFormatDescriptionRef
  • St
    CMVideoDimensionsiOS 4.0+
    @typedef CMVideoDimensions
  • St
    CMImageDescriptionFlavoriOS 8.0+
    Constants that identify variants of an image format description.
  • St
    CMSoundDescriptionFlavoriOS 8.0+
    Constants that identify variants of a sound format description.
  • St
    CMTextDescriptionFlavoriOS 8.0+
    Constants that identify variants of a text format description.
  • St
    CMClosedCaptionDescriptionFlavoriOS 8.0+
    Constants that identify variants of a closed-caption format description.
  • St
    CMTimeCodeDescriptionFlavoriOS 8.0+
    Constants that identify variants of a time-code format description.
  • St
    CMMetadataDescriptionFlavoriOS 8.0+
    Constants that identify variants of a metadata format description.

Attachments and Tagging 6

Protocols and types for attaching metadata to buffers and tagging them with typed identifiers.

  • Pr
    CMAttachmentBearerProtocoliOS 13.0+
    A protocol for objects that can carry key-value attachments such as buffers and descriptions.
  • St
    CMAttachmentBearerAttachmentsiOS 13.0+
    A structure that represents the collection of key-value attachments on a bearer.
  • Cl
    CMTagiOS 17.0+
    CMTag is used to label something about a resource or other media construct. A CMTag contains a category and a value to represent a particular tag that might be assigned to or associated with another r
  • Cl
    CMTypedTagiOS 17.0+
    CMTypedTag contains strongly typed categories and values. CMTypedTag enforces the defined data types for specific categories.
  • St
    CMTaggedBufferiOS 17.0+
    CMTaggedBuffer contains an array of CMTags and a buffer.
  • St
    CMTaggedDynamicBufferiOS 26.0+
    Contains a collection of tags associated with a read-only media buffer.

Stereoscopic and Projected Media 6

Descriptors and enumerations that characterize stereo, projected, and camera-intrinsic media.

  • En
    CMProjectionTypeiOS 17.0+
    @abstract Constants used with kCMTagCategory_ProjectionType to signal the nature of a video projection carried in a buffer or channel.
  • En
    CMPackingTypeiOS 17.0+
    @abstract Constants used with kCMTagCategory_PackingType to signal the nature of any packing applied in a buffer or channel.
  • St
    CMStereoViewComponentsiOS 17.0+
    @abstract Flags used with kCMTagCategory_StereoView tags to signal the nature of the stereo views carried in a buffer or channel.
  • St
    CMStereoViewInterpretationOptionsiOS 17.0+
    @abstract Flags used with kCMTagCategory_StereoViewInterpretation tags to signal additional information that may be important to the interpretation of stereo views carried in a buffer or channel.
  • St
    CMCameraIntrinsicMatrixiOS 27.0+
    A matrix that describes the camera's intrinsic properties.
  • En
    CMStillImageLensStabilizationiOS 27.0+
    Constants that specify the lens-stabilization state during still image capture.

Type Aliases 59

  • Ty
    CMAttachmentBearer
  • Ty
    CMAttachmentMode
  • Ty
    CMItemCount
  • Ty
    CMItemIndex
  • Ty
    CMBaseClassVersion
  • Ty
    CMStructVersion
  • Ty
    CMPersistentTrackID
  • Ty
    CMBlockBufferFlags
    @typedef CMBlockBufferFlags
  • Ty
    CMBuffer
    @typedef CMBufferRef
  • Ty
    CMBufferGetTimeCallback
    @typedef CMBufferGetTimeCallback
  • Ty
    CMBufferGetTimeHandler
    @typedef CMBufferGetTimeHandler
  • Ty
    CMBufferGetBooleanCallback
    @typedef CMBufferGetBooleanCallback
  • Ty
    CMBufferGetBooleanHandler
    @typedef CMBufferGetBooleanHandler
  • Ty
    CMBufferCompareCallback
    @typedef CMBufferCompareCallback
  • Ty
    CMBufferCompareHandler
    @typedef CMBufferCompareHandler
  • Ty
    CMBufferGetSizeCallback
    @typedef CMBufferGetSizeCallback
Show 43 more
  • Ty
    CMBufferGetSizeHandler
    @typedef CMBufferGetSizeHandler
  • Ty
    CMBufferQueueTriggerToken
    @typedef CMBufferQueueTriggerToken
  • Ty
    CMBufferQueueTriggerCallback
    @typedef CMBufferQueueTriggerCallback
  • Ty
    CMBufferQueueTriggerHandler
  • Ty
    CMBufferQueueTriggerCondition
    @enum CMBufferQueueTriggerCondition
  • Ty
    CMBufferValidationCallback
    @typedef CMBufferValidationCallback
  • Ty
    CMBufferValidationHandler
    @typedef CMBufferValidationHandler
  • Ty
    CMMediaType
    @enum CMMediaType
  • Ty
    CMAudioCodecType
    @enum CMAudioCodecType
  • Ty
    CMAudioFormatDescription
    @typedef CMAudioFormatDescriptionRef
  • Ty
    CMAudioFormatDescriptionMask
    @enum CMAudioFormatDescriptionMask
  • Ty
    CMVideoFormatDescription
    @typedef CMVideoFormatDescriptionRef
  • Ty
    CMPixelFormatType
    @enum CMPixelFormatType
  • Ty
    CMVideoCodecType
    @enum CMVideoCodecType
  • Ty
    CMTaggedBufferGroupFormatDescription
    @typedef CMTaggedBufferGroupFormatDescriptionRef
  • Ty
    CMTaggedBufferGroupFormatType
    @enum CMTaggedBufferGroupFormatType
  • Ty
    CMMuxedFormatDescription
    @typedef CMMuxedFormatDescriptionRef
  • Ty
    CMMuxedStreamType
    @enum CMMuxedStreamType
  • Ty
    CMClosedCaptionFormatDescription
    @typedef CMClosedCaptionFormatDescriptionRef
  • Ty
    CMClosedCaptionFormatType
    @enum CMClosedCaptionFormatType
  • Ty
    CMTextFormatDescription
    @typedef CMTextFormatDescriptionRef
  • Ty
    CMTextFormatType
    @enum CMTextFormatType
  • Ty
    CMTextDisplayFlags
    @enum CMTextDisplayFlags
  • Ty
    CMTextJustificationValue
    @enum CMTextJustificationValue
  • Ty
    CMSubtitleFormatType
  • Ty
    CMTimeCodeFormatDescription
    @typedef CMTimeCodeFormatDescriptionRef
  • Ty
    CMTimeCodeFormatType
    @enum CMTimeCodeFormatType
  • Ty
    CMMetadataFormatDescription
    @typedef CMMetadataFormatDescriptionRef
  • Ty
    CMMetadataFormatType
    @enum CMMetadataFormatType
  • Ty
    CMSampleBufferMakeDataReadyCallback
    @typedef CMSampleBufferMakeDataReadyCallback
  • Ty
    CMSampleBufferMakeDataReadyHandler
    @typedef CMSampleBufferMakeDataReadyHandler
  • Ty
    CMSampleBufferInvalidateCallback
    @typedef CMSampleBufferInvalidateCallback
  • Ty
    CMSampleBufferInvalidateHandler
    @typedef CMSampleBufferInvalidateHandler
  • Ty
    CMClockOrTimebase
  • Ty
    CMTimeValue
    @typedef CMTimeValue
  • Ty
    CMTimeScale
    @typedef CMTimeScale
  • Ty
    CMTimeEpoch
    @typedef CMTimeEpoch
  • Ty
    CMAttachmentAccess
  • Ty
    CMAttachmentContainer
  • Ty
    CMAttachmentKeyDefinitions
  • Ty
    CMAttachmentPropagationMode
  • Ty
    CMAttachmentRawValue
  • Ty
    CMAttachmentValueRepresentable

Extends 5

SequenceArrayCVBufferNeverCVReadOnlyPixelBuffer
← Video, Photos & Camera