case 1 : 使用CIContext作为全局对象。渲染时一直报错。错误代码如下:
if (ciContext == nil) { kCIContextOutputColorSpace : (__bridge id)rgbColorSpace}];
EAGLContext *eaglContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
ciContext = [CIContext contextWithEAGLContext:eaglContext options:@{kCIContextWorkingColorSpace : [NSNull null]}];
}
[ciContext render:ciImage toCVPixelBuffer:pixelBuffer bounds:cropRect colorSpace:nil];
cicontextError