One Logo Pool Ball
CoreMedia · IOS API REFERENCE

CMFormatDescription.Extensions

struct · iOS 13.0+ · SDK 27.1

struct Extensions

Extensions are a collection of `Key`/`Value` pairs They can be created using the set of known keys, and the key-specific `Value` factory, or using the underlying representation of `CFString` and `CFPropertyList`: var extensions = CMFormatDescription.Extensions() extensions[.cleanAperture] = .cleanAperture( width: 320, height: 240, horizontalOffet: 10, verticalOffset: 20) is equivalent to: let extensions = CMFormatDescription.Extensions(base: [kCMFormatDescriptionExtension_CleanAperture: [ kCMFormatDescriptionKey_CleanApertureWidth: 320, kCMFormatDescriptionKey_CleanApertureHeight: 240, kCMFormatDescriptionKey_CleanApertureHorizontalOffset: 10, kCMFormatDescriptionKey_CleanApertureVerticalOffset: 20, ] as AnyObject])

Members (8)

get · iOS 13.0+

startIndex

TypeScript
get startIndex(): CMFormatDescription_Extensions_Index
Swift declaration
var startIndex: CMFormatDescription.Extensions.Index { get }

The position of the first element in a nonempty collection. If the collection is empty, `startIndex` is equal to `endIndex`.

init · iOS 13.0+

init

TypeScript
static initBase(base?: (NativeMap<_CoreFoundation_CFString, unknown>) | null): CMFormatDescription_Extensions
Swift declaration
init(base: [CFString : CFPropertyList]?)

Creates an `Extensions` structure with existing values.

method · iOS 13.0+

index

TypeScript
index(i: CMFormatDescription_Extensions_Index): CMFormatDescription_Extensions_Index
Swift declaration
func index(after i: CMFormatDescription.Extensions.Index) -> CMFormatDescription.Extensions.Index

Returns the position immediately after the given index. The successor of an index must be well defined. For an index `i` into a collection `c`, calling `c.index(after: i)` returns the same index every time. - Parameter i: A valid index of the collection. `i` must be less than `endIndex`. - Returns: The index value immediately after `i`.

get · iOS 13.0+

endIndex

TypeScript
get endIndex(): CMFormatDescription_Extensions_Index
Swift declaration
var endIndex: CMFormatDescription.Extensions.Index { get }

The collection's "past the end" position---that is, the position one greater than the last valid subscript argument. When you need a range that includes the last element of a collection, use the half-open range operator (`..<`) with `endIndex`. The `..<` operator creates a range that doesn't include the upper bound, so it's always safe to use with `endIndex`. For example: let numbers = [10, 20, 30, 40, 50] if let index = numbers.firstIndex(of: 30) { print(numbers[index ..< numbers.endIndex]) } // Prints "[30, 40, 50]" If the collection is empty, `endIndex` is equal to `startIndex`.

init · iOS 13.0+

init

TypeScript
static init(): CMFormatDescription_Extensions
Swift declaration
init()

Creates an empty `Extensions` structure.

subscript · iOS 13.0+

subscript

TypeScript
subscript(key: CMFormatDescription_Extensions_Key): (CMFormatDescription_Extensions_Value) | null
Swift declaration
subscript(key: CMFormatDescription.Extensions.Key) -> CMFormatDescription.Extensions.Value? { get set }

Accesses values using a predefined `Key`

subscript · iOS 13.0+

subscript

TypeScript
subscript1459(position: CMFormatDescription_Extensions_Index): { "key": _CoreFoundation_CFString; "value": unknown }
Swift declaration
subscript(position: CMFormatDescription.Extensions.Index) -> (key: CFString, value: CFPropertyList) { get }

Accesses the element at the specified position. The following example accesses an element of an array through its subscript to print its value: var streets = ["Adams", "Bryant", "Channing", "Douglas", "Evarts"] print(streets[1]) // Prints "Bryant" You can subscript a collection with any valid index other than the collection's end index. The end index refers to the position one past the last element of a collection, so it doesn't correspond with an element. - Parameter position: The position of the element to access. `position` must be a valid index of the collection that is not equal to the `endIndex` property. - Complexity: O(1)

subscript · iOS 13.0+

subscript

TypeScript
subscript43355(key: _CoreFoundation_CFString): (unknown) | null
Swift declaration
subscript(key: CFString) -> CFPropertyList? { get set }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CMFormatDescription.Extensions.Key

The iOS SDK compiler rejected this binding: type 'CMFormatDescription.Extensions.Key' does not conform to protocol 'OneSDKNamedConstants'

All CoreMedia types →