Skip to content

Latest commit

 

History

History
339 lines (328 loc) · 49.5 KB

CoreVideo.md

File metadata and controls

339 lines (328 loc) · 49.5 KB

CoreVideo

Symbols: 12.0% of Apple's iOS API (106 of 883, exact) · Rows: 10: 6 ✅ 1 🟡 3 ❌ · iOS: 4.0+

Area: Graphics & text · Apple: Core Video · Issues: area:graphics

How isim implements it

  • Adapted: CVPixelBuffer and pools in main memory (isim/swift/overlays/CoreVideo.swift). Rows for the Swift API: CoreMedia.
  • C interface: CoreVideo.framework (<CoreVideo/CoreVideo.h>, headers in isim/sdk-src/Frameworks/CoreVideo) re-exports the overlay; its functions are @_cdecl wrappers in isim/swift/overlays/CoreVideo+CInterface.swift and its keys CFSTR constants in isim/frameworks/CoreVideo. A CVPixelBufferRef is the Swift CVPixelBuffer, so C, Swift, AVFoundation and Vision share buffers.

API

API / feature Status iOS Notes
CVPixelBufferCreate, CVPixelBufferCreateWithBytes, getters (width, height, pixel format, bytes per row, data size, planes), CVPixelBufferRetain / Release, CVPixelBufferGetTypeID, from C ✅ 4.0 adapted: main memory, no IOSurface; pixelBufferAttributes ignored on create; CVPixelBufferCreateWithBytes wraps any single-plane format given its row stride (packed Y'CbCr such as 2vuy or v216 too, used by vImage: #693). Tested (HelloQuartzCoreObjC)
CVPixelBufferLockBaseAddress / UnlockBaseAddress, CVPixelBufferGetBaseAddress(OfPlane) ✅ 4.0 adapted: the memory is always mapped; locking only checks its argument. Tested (HelloQuartzCoreObjC: write rows, read back)
CVPixelBufferCreateWithPlanarBytes (Swift and C) ✅ 4.0 bi-planar formats (420v, 420f) over the caller's planes; the release callback gets the plane addresses. Tested (HelloQuartzCoreObjC)
CVBufferSetAttachment / GetAttachment / CopyAttachment / HasAttachment / RemoveAttachment / RemoveAllAttachments, CVBufferGetAttachments / CopyAttachments / SetAttachments, CVBufferPropagateAttachments, CVAttachmentMode (Swift and C) ✅ 4.0 adapted: kept with the buffer; propagation copies the shouldPropagate ones. kCVImageBuffer… colour keys and values. Tested (HelloQuartzCoreObjC)
CVPixelBufferPoolCreate, CVPixelBufferPoolCreatePixelBuffer, GetAttributes, GetPixelBufferAttributes, Retain / Release, Flush (C) ✅ 4.0 adapted: every buffer is new (no reuse; Flush does nothing); width and height are required. Tested (HelloQuartzCoreObjC)
CVReturn codes, pixel format constants (with TwoComponent8, TwoComponent16Half and TwoComponent32Float, Vision's optical flow), kCVPixelBuffer…Key ✅ 4.0 the same values as Apple's. Tested (HelloQuartzCoreObjC)
CVReadOnlyPixelBuffer (init(unsafeBuffer:), withUnsafeBuffer(_:)) 🟡 26.0 adapted: a wrapper of the CVPixelBuffer it was made from (issue #852, for Vision's PixelBufferObservation.pixelBuffer). Missing: CVMutablePixelBuffer and init(_:) from one. Unverified (no test yet)
Types not yet in isim (iOS 17 and earlier) ❌ ≤17 not implemented, found by the 2026-10 sweep: CVFillExtendedPixelsCallBackData, CVMetalBufferCache, CVMetalTextureCache, CVOpenGLESTextureCache, CVPlanarComponentInfo, CVPlanarPixelBufferInfo, CVPlanarPixelBufferInfo_YCbCrBiPlanar, CVPlanarPixelBufferInfo_YCbCrPlanar, CVSMPTETime, CVSMPTETimeFlags, CVSMPTETimeType, CVTime, CVTimeFlags, CVTimeStamp, CVTimeStampFlags (15 types; with their members under "Not yet in isim")
Types not yet in isim (iOS 26) ❌ 26.0 not implemented, found by the 2026-10 sweep: CVBufferRepresentable, CVError, CVImageBufferOriginPosition, CVImageBufferRepresentable, CVImageSize, CVMutablePixelBuffer, CVPixelBufferAttributes, CVPixelBufferCreationAttributes, CVPixelBufferPadding, CVPixelBufferPlaneProperties, CVPixelBufferRepresentable, CVPixelFormatDescription, CVPixelFormatType (13 types; with their members under "Not yet in isim")
Types not yet in isim (iOS 27) ❌ 27.0 not implemented, found by the 2026-10 sweep: CVAttachmentAccess, CVAttachmentCompositeKeyDefinition, CVAttachmentContainer, CVAttachmentKeyDefinition, CVAttachmentKeyDefinitions, CVAttachmentKeyDefinitionWithDefault, CVAttachmentModePreference, CVAttachmentModePreferenceShouldNotPropagate, CVAttachmentModePreferenceShouldPropagate, CVAttachmentRawValue, CVAttachmentValueRepresentable, CVImageAlphaChannelMode, CVImageBufferAttachmentKeyDefinitions, CVImageChromaField, CVImageCleanAperture, CVImageColorPrimaries, CVImageDisplayMaskRectangle, CVImageFieldDetail, CVImageLogTransferFunction, CVImagePixelAspectRatio, CVImageStereoDisplayMaskRectangle, CVImageTransferFunction, CVImageYCbCrMatrix, CVPixelBufferAttachmentKeyDefinitions, CVProResRawMetadata, CVSenselArrayPattern, CVSenselSitingOffsets (27 types; with their members under "Not yet in isim")

Not yet in isim

777 symbols Apple documents for iOS that isim does not have (exact; Apple snapshot 2026-10-14). Each links to Apple's documentation.

List