I'm trying to implement a vidoestream for a multipeer connectivity app. The captured frame will be compressed by VTCompressionSession and my callback is being called.
Now my CMSamplebuffer contains a CMBlockBuffer and i could extract the NALUs etc. like mentioned in this answer How to use VideoToolbox to decompress H.264 video stream but i'm searching for a different way to do it.
Is it possible to write the whole bytes of a CMSampleBuffer to an UInt8 Array? I'm able to get the Pointer of the CMSampleBuffer but how can i figure out the length?
Sorry for my bad english and let me know if anythings wrong, it´s my first post. Thank You
Here is the code I used