---
title: "CMVideoFormatDescriptionCopyAsBigEndianImageDescriptionBlockBuffer(allocator:videoFormatDescription:stringEncoding:flavor:blockBufferOut:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmvideoformatdescriptioncopyasbigendianimagedescriptionblockbuffer(allocator:videoformatdescription:stringencoding:flavor:blockbufferout:)"
---

# CMVideoFormatDescriptionCopyAsBigEndianImageDescriptionBlockBuffer(allocator:videoFormatDescription:stringEncoding:flavor:blockBufferOut:)

Copies the contents of a video format description to a buffer in big-endian byte ordering.

## Declaration

```swift
func CMVideoFormatDescriptionCopyAsBigEndianImageDescriptionBlockBuffer(allocator: CFAllocator?, videoFormatDescription: CMVideoFormatDescription, stringEncoding: CFStringEncoding, flavor: CMImageDescriptionFlavor?, blockBufferOut: UnsafeMutablePointer<CMBlockBuffer?>) -> OSStatus
```

## Parameters

- `allocator`: Allocator to use for allocating the CMBlockBuffer object. May be NULL.
- `videoFormatDescription`: The CMVideoFormatDescription to be copied.
- `stringEncoding`: Pass doc://com.apple.documentation/documentation/CoreFoundation/CFStringGetSystemEncoding() or GetApplicationTextEncoding.
- `flavor`: kCMImageDescriptionFlavor constant or NULL for QuickTimeMovie flavor.
- `blockBufferOut`: Receives a new CMBlockBuffer containing ImageDescription data structure in big-endian byte ordering.

## Discussion

Discussion On return, the caller owns the returned CMBlockBuffer, and must release it when done with it. note: The dataRefIndex field of the SampleDescription is intentionally filled with placeholder values (0xFFFF). The caller must overwrite these values with a valid dataRefIndex if writing the SampleDescription to a QuickTime/ISO file.

## 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)
- [CMVideoFormatDescriptionGetCleanAperture(_:originIsAtTopLeft:)](coremedia/cmvideoformatdescriptiongetcleanaperture(_:originisattopleft:).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)
- [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)
