---
title: "VTSessionCopyProperty(_:key:allocator:valueOut:)"
framework: videotoolbox
role: symbol
role_heading: Function
path: "videotoolbox/vtsessioncopyproperty(_:key:allocator:valueout:)"
---

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

Retrieves a property on a Video Toolbox session.

## Declaration

```swift
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

Return Value noErr if successful; kVTPropertyNotSupportedErr for unrecognized or unsupported properties.

## Discussion

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).

## See Also

### Getting Properties

- [VTSessionCopySerializableProperties(_:allocator:dictionaryOut:)](videotoolbox/vtsessioncopyserializableproperties(_:allocator:dictionaryout:).md)
- [VTSessionCopySupportedPropertyDictionary(_:supportedPropertyDictionaryOut:)](videotoolbox/vtsessioncopysupportedpropertydictionary(_:supportedpropertydictionaryout:).md)
- [Supported Property Dictionary Constants](videotoolbox/supported-dictionary-constants.md)
