<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTSessionCopyProperty(_:key:allocator:valueOut:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@F@VTSessionCopyProperty"
  },
  "title" : "VTSessionCopyProperty(_:key:allocator:valueOut:)"
}
-->

# VTSessionCopyProperty(_:key:allocator:valueOut:)

Retrieves a property on a Video Toolbox session.

```
func VTSessionCopyProperty(_ session: VTSession, key propertyKey: CFString, allocator: CFAllocator?, valueOut propertyValueOut: UnsafeMutableRawPointer?) -> OSStatus
```

## Parameters

`session`

A Video Toolbox session object.

`propertyKey`

The key for the property to retrieve.

`allocator`

An allocator suitable for use when copying property values.

`propertyValueOut`

Points to a variable to receive the property value, which must be a CF-registered type – the caller may call <doc://com.apple.documentation/documentation/CoreFoundation/CFGetTypeID(_:)> on it to identify which specific type. The caller must release the this property value.

## Return Value

`noErr` if successful; [`kVTPropertyNotSupportedErr`](/documentation/VideoToolbox/kVTPropertyNotSupportedErr) for unrecognized or unsupported properties.

## Discussion

> Note: For most types of properties, the returned values should be considered immutable. In particular, for CFPropertyList types, sharing of mutable property value objects between the client, session and codec should be avoided. However, some properties will be used for exchanging service objects that are inherently mutable (eg, CVPixelBufferPool).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)