When trying to create a 32 bits RGBA CVPixelBuffer, I constantly get errors.
Most notably error -6680 which means: "The buffer does not support the specified pixel format."
This is the code fragment: (Width and height are specified as 256*256)
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
// [NSNumber numberWithBool:YES], kCVPixelBufferCGBitmapContextCompatibilityKey,
// [NSNumber numberWithBool:YES], kCVPixelBufferCGImageCompatibilityKey,
// [NSNumber numberWithBool:YES], kCVPixelBufferOpenGLCompatibilityKey,
nil];
CVPixelBufferRef pxbuffer = NULL;
CVReturn status = CVPixelBufferCreate(kCFAllocatorDefault, WIDTH,
HEIGHT, kCVPixelFormatType_32RGBA, (CFDictionaryRef) options,
&pxbuffer);
NSParameterAssert(status == kCVReturnSuccess && pxbuffer != NULL);
Can anyone give a hint as to what I'm doing wrong?