Private Track Formats with AVAssetWriterInput assetWriterInputWithMediaType possible?

Hello


I am attempting to set up and write custom sample buffer data to a custom track type with AVFoundation (known as a private track ids as I understand it). This is supported by the MPEG4 standard and is how many non standard streams (as defined by the MPEG4 standard) are able to be written to an MP4 container. For example, Ogg Vorbis and Ogg Theora, Apple's Lossless Audio, etc.


Is it possible to define your own CMFormatDescription and pass your own FourCC to AVAssetWriterInput assetWriterInputWithMediaType, and have an AVAssetWriter canAddInput Return YES?


So far, I am able to :


* create a custom CMFormatDescrption
* create a AVassetWriteInput with a mediaType that is my own FourCC string

I am unable to add this assetWriterInput to an existing assetWriter - canAddInput fails.


Is it possible to declare your own FourCC for use with assetWriterInputWithMediaType? Am I forced to use an exisitng media type, say Vide, Soun or Meta?
Is it possible to create a custom media type that is a subtype of Boxed to declare your own track type / sample buffer type, so that clients that dont expect that media type ignore it, but who do, can decode?


Thank you for any information.