---
title: "CMVideoFormatDescriptionGetCleanAperture(_:originIsAtTopLeft:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmvideoformatdescriptiongetcleanaperture(_:originisattopleft:)"
---

# CMVideoFormatDescriptionGetCleanAperture(_:originIsAtTopLeft:)

Returns a rectangle that defines the portion of the encoded pixel dimensions that represent the image data that’s valid for displaying.

## Declaration

```swift
func CMVideoFormatDescriptionGetCleanAperture(_ videoDesc: CMVideoFormatDescription, originIsAtTopLeft: Bool) -> CGRect
```

## Parameters

- `videoDesc`: CMVideoFormatDescription being interrogated.
- `originIsAtTopLeft`: Pass true if the CGRect will be used in an environment where (0,0) is at the top-left corner of an enclosing rectangle and y coordinates increase as you go down. Pass false if the CGRect will be used in an environment where (0,0) is at the bottom-left corner of an enclosing rectangle and y coordinates increase as you go up.

## See Also

### Working with Video Descriptions

- [CMImageDescriptionFlavor](coremedia/cmimagedescriptionflavor.md)
- [CMVideoFormatDescriptionCreate(allocator:codecType:width:height:extensions:formatDescriptionOut:)](coremedia/cmvideoformatdescriptioncreate(allocator:codectype:width:height:extensions:formatdescriptionout:).md)
- [CMVideoFormatDescriptionCreateForImageBuffer(allocator:imageBuffer:formatDescriptionOut:)](coremedia/cmvideoformatdescriptioncreateforimagebuffer(allocator:imagebuffer:formatdescriptionout:).md)
- [CMVideoFormatDescriptionGetDimensions(_:)](coremedia/cmvideoformatdescriptiongetdimensions(_:).md)
- [CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers()](coremedia/cmvideoformatdescriptiongetextensionkeyscommonwithimagebuffers().md)
- [CMVideoFormatDescriptionGetPresentationDimensions(_:usePixelAspectRatio:useCleanAperture:)](coremedia/cmvideoformatdescriptiongetpresentationdimensions(_:usepixelaspectratio:usecleanaperture:).md)
- [CMVideoFormatDescriptionMatchesImageBuffer(_:imageBuffer:)](coremedia/cmvideoformatdescriptionmatchesimagebuffer(_:imagebuffer:).md)
- [CMVideoFormatDescriptionCreateFromH264ParameterSets(allocator:parameterSetCount:parameterSetPointers:parameterSetSizes:nalUnitHeaderLength:formatDescriptionOut:)](coremedia/cmvideoformatdescriptioncreatefromh264parametersets(allocator:parametersetcount:parametersetpointers:parametersetsizes:nalunitheaderlength:formatdescriptionout:).md)
- [CMVideoFormatDescriptionCreateFromHEVCParameterSets(allocator:parameterSetCount:parameterSetPointers:parameterSetSizes:nalUnitHeaderLength:extensions:formatDescriptionOut:)](coremedia/cmvideoformatdescriptioncreatefromhevcparametersets(allocator:parametersetcount:parametersetpointers:parametersetsizes:nalunitheaderlength:extensions:formatdescriptionout:).md)
- [CMVideoFormatDescriptionGetH264ParameterSetAtIndex(_:parameterSetIndex:parameterSetPointerOut:parameterSetSizeOut:parameterSetCountOut:nalUnitHeaderLengthOut:)](coremedia/cmvideoformatdescriptiongeth264parametersetatindex(_:parametersetindex:parametersetpointerout:parametersetsizeout:parametersetcountout:nalunitheaderlengthout:).md)
- [CMVideoFormatDescriptionCopyAsBigEndianImageDescriptionBlockBuffer(allocator:videoFormatDescription:stringEncoding:flavor:blockBufferOut:)](coremedia/cmvideoformatdescriptioncopyasbigendianimagedescriptionblockbuffer(allocator:videoformatdescription:stringencoding:flavor:blockbufferout:).md)
- [CMVideoFormatDescriptionCreateFromBigEndianImageDescriptionBlockBuffer(allocator:bigEndianImageDescriptionBlockBuffer:stringEncoding:flavor:formatDescriptionOut:)](coremedia/cmvideoformatdescriptioncreatefrombigendianimagedescriptionblockbuffer(allocator:bigendianimagedescriptionblockbuffer:stringencoding:flavor:formatdescriptionout:).md)
- [CMVideoFormatDescriptionCreateFromBigEndianImageDescriptionData(allocator:bigEndianImageDescriptionData:size:stringEncoding:flavor:formatDescriptionOut:)](coremedia/cmvideoformatdescriptioncreatefrombigendianimagedescriptiondata(allocator:bigendianimagedescriptiondata:size:stringencoding:flavor:formatdescriptionout:).md)
- [CMSwapBigEndianImageDescriptionToHost(_:_:)](coremedia/cmswapbigendianimagedescriptiontohost(_:_:).md)
- [CMSwapHostEndianImageDescriptionToBig(_:_:)](coremedia/cmswaphostendianimagedescriptiontobig(_:_:).md)
