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!
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论