开发者

Cocoa QTKit resolution problem

Based on a lot of online references, the way to change resolution is using the following code.

NSDictionary * pixelBufferAttr = [NSDictionary dictionaryWithObjectsAndKeys:
     [NSNumber numberWithInt:320], kCVPixelBufferWidthKey,
     [NSNumber numberWithInt:240], kCVPixelBufferHeightKey,
     [NSNumbernumberWithBool:YES], 
                  (id)kCVPixelBufferOpenGLCompatibilityKey,
     [NSNumber 
        numberWithUnsignedInt:kCVPixelFormatType_422YpCbCr8],
                  (id)kCVPixelBufferPixelFormatTypeKey,
                                        nil];

NSArray *outputsConnected = [mCaptureSession outputs];

QTCaptureVideoPreviewOutput * previewOutput = [outputsConnected objectAtIndex:1];

[previewOutput setDelegate:self];

[previewOutput setPixelBufferAttributes:pixelBufferAttr];

But after changing the resolution, the captureView can se开发者_如何转开发e the different, but using code to check the resolution is incorrect.

Does anyone know how to change the device resolution?

Thanks ALL!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜