---
title: "CMClosedCaptionFormatDescriptionCopyAsBigEndianClosedCaptionDescriptionBlockBuffer(allocator:closedCaptionFormatDescription:flavor:blockBufferOut:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmclosedcaptionformatdescriptioncopyasbigendianclosedcaptiondescriptionblockbuffer(allocator:closedcaptionformatdescription:flavor:blockbufferout:)"
---

# CMClosedCaptionFormatDescriptionCopyAsBigEndianClosedCaptionDescriptionBlockBuffer(allocator:closedCaptionFormatDescription:flavor:blockBufferOut:)

Copies the contents of a closed caption format description to a buffer in big-endian byte order.

## Declaration

```swift
func CMClosedCaptionFormatDescriptionCopyAsBigEndianClosedCaptionDescriptionBlockBuffer(allocator: CFAllocator?, closedCaptionFormatDescription: CMClosedCaptionFormatDescription, flavor: CMClosedCaptionDescriptionFlavor?, blockBufferOut: UnsafeMutablePointer<CMBlockBuffer?>) -> OSStatus
```

## Parameters

- `allocator`: Allocator to use for allocating the CMBlockBuffer object. May be NULL.
- `closedCaptionFormatDescription`: The CMClosedCaptionFormatDescription to be copied.
- `flavor`: Reserved for future use. Pass NULL for QuickTime Movie or ISO flavor.
- `blockBufferOut`: Receives new CMBlockBuffer containing ClosedCaptionDescription 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 Closed Captioning Descriptions

- [CMClosedCaptionDescriptionFlavor](coremedia/cmclosedcaptiondescriptionflavor.md)
- [CMClosedCaptionFormatDescriptionCreateFromBigEndianClosedCaptionDescriptionBlockBuffer(allocator:bigEndianClosedCaptionDescriptionBlockBuffer:flavor:formatDescriptionOut:)](coremedia/cmclosedcaptionformatdescriptioncreatefrombigendianclosedcaptiondescriptionblockbuffer(allocator:bigendianclosedcaptiondescriptionblockbuffer:flavor:formatdescriptionout:).md)
- [CMClosedCaptionFormatDescriptionCreateFromBigEndianClosedCaptionDescriptionData(allocator:bigEndianClosedCaptionDescriptionData:size:flavor:formatDescriptionOut:)](coremedia/cmclosedcaptionformatdescriptioncreatefrombigendianclosedcaptiondescriptiondata(allocator:bigendianclosedcaptiondescriptiondata:size:flavor:formatdescriptionout:).md)
- [CMSwapHostEndianClosedCaptionDescriptionToBig(_:_:)](coremedia/cmswaphostendianclosedcaptiondescriptiontobig(_:_:).md)
- [CMSwapBigEndianClosedCaptionDescriptionToHost(_:_:)](coremedia/cmswapbigendianclosedcaptiondescriptiontohost(_:_:).md)
