We used to initialize CVPixelBufferRef, as shown below.
CVPixelBufferRef pxbuffer = NULL;
But in Swift we cannot use NULL, so we tried to follow, but, of course, XCODE wants it to be activated in order to use it
let pxbuffer: CVPixelBufferRef
but how?
In Obj_C, we created such a buffer, but, as I tried to explain above when converting to Swift, I was stopped on the first line.
CVPixelBufferRef pxbuffer = NULL;
CVPixelBufferCreate(kCFAllocatorDefault, picGenislik,
frameHeight, kCVPixelFormatType_32ARGB, (__bridge CFDictionaryRef) options,
&pxbuffer);
source
share