replaceFormatDescription(_:with:)
Replaces the track’s format description with a new format description.
Declaration
func replaceFormatDescription(_ formatDescription: CMFormatDescription, with newFormatDescription: CMFormatDescription)Parameters
- formatDescription:
The Cmformatdescription object to be replaced.
- newFormatDescription:
The Cmformatdescription object to replacing the specified format description.
Discussion
Use this method to change a track’s format descriptions, such as adding format description extensions to a format description or changing the audio channel layout of an audio track. Format description can have extensions of type kCMFormatDescriptionExtension_VerbatimSampleDescription and kCMFormatDescriptionExtension_VerbatimISOSampleEntry. If you modify a copy of a format description, delete those extensions from the copy or your changes might be ignored.